Skip to content

Instantly share code, notes, and snippets.

@aninternetian
Created July 30, 2019 10:00
Show Gist options
  • Save aninternetian/45c0142b08b9c97f2e75e7588ea7a320 to your computer and use it in GitHub Desktop.
Save aninternetian/45c0142b08b9c97f2e75e7588ea7a320 to your computer and use it in GitHub Desktop.
some kinda magic
import sys
obj_name = sys.argv[2]
with open(sys.argv[1]) as f:
xml_string = f.read()
xml_string = xml_string.replace('change', obj_name)
with open('output-' + sys.argv[1], 'w') as f:
f.write(xml_string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment