diff options
author | luxagraf <sng@luxagraf.net> | 2021-08-20 20:11:45 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2021-08-20 20:11:45 -0400 |
commit | dc391e4cab612afe0aabe556a59a268ea7539bec (patch) | |
tree | 0d2a7c601a9759860d261f15a8206ce80e36249f /build.py | |
parent | 9999bdb8a6e0678d443e888f521ac0cbd1d547dc (diff) |
lbh: changed father to guitar player, made allusion to italy, where the
first six strings were invented around this time
Diffstat (limited to 'build.py')
-rw-r--r-- | build.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/build.py b/build.py new file mode 100644 index 0000000..dc1788f --- /dev/null +++ b/build.py @@ -0,0 +1,18 @@ +import sys, re + +def remove_comments(source): + """ + Returns 'source' minus docstrings. + """ + comments = re.findall(r"'''[s\S]*?'''", source) + print(comments) + #return out + + +filename = '%s' %(sys.argv[1]) +output = '%s' %(sys.argv[2]) +with open(filename, newline='') as f: + content = f.read() + content = remove_comments(content) + with open(output, 'w') as file_object: + file_object.write(content) |