Skip to content

Instantly share code, notes, and snippets.

@jamesb93
Created May 20, 2022 10:18
Show Gist options
  • Save jamesb93/c81aaf6e09059a03c975f3f389ce2fcc to your computer and use it in GitHub Desktop.
Save jamesb93/c81aaf6e09059a03c975f3f389ce2fcc to your computer and use it in GitHub Desktop.
import sys
import json
from pathlib import Path
help_file_input = Path(sys.argv[1])
s = ''
with open(help_file_input, 'r') as f:
s = f.read()
s = s.replace('"default_fontsize" : 12.0', '"default_fontsize" : 13.0')
s = s.replace('"gridsize" : [ 15.0, 15.0 ]', '"gridsize" : [ 10.0, 10.0 ]')
s = s.replace('"gridonopen" : 1', '"gridonopen" : 2')
s = s.replace('"gridsnaponopen" : 1', '"gridsnaponopen" : 2')
with open(help_file_input, 'w') as f:
f.write(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment