less copy protection, more size visualization
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

12 行
334 B

  1. import sys
  2. import re
  3. from pathlib import Path
  4. for path in Path(sys.argv[1]).rglob('*.svg'):
  5. with open(path, "r") as file:
  6. data = file.read()
  7. if "<g>" not in data:
  8. data = data.replace("</style>", "</style><g>").replace("</svg>", "</g></svg>")
  9. with open(path, "w") as file:
  10. file.write(data)