allow specify input file from commandline
This commit is contained in:
parent
009ad4dba5
commit
c9b5272239
1 changed files with 6 additions and 1 deletions
|
@ -34,6 +34,11 @@ formatter = Formatter(request)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# pages/playground\(2f\)SyntaxReference/revisions/00000001
|
# pages/playground\(2f\)SyntaxReference/revisions/00000001
|
||||||
with open('syntaxreference.txt', 'r') as f:
|
if len(sys.argv) > 1:
|
||||||
|
inputfile = sys.argv[1]
|
||||||
|
else:
|
||||||
|
inputfile = 'syntaxreference.txt'
|
||||||
|
|
||||||
|
with open(inputfile, 'r') as f:
|
||||||
text = f.read()
|
text = f.read()
|
||||||
print moin2doku('test', text)
|
print moin2doku('test', text)
|
||||||
|
|
Loading…
Reference in a new issue