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)