less copy protection, more size visualization
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

12 lines
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)