summaryrefslogtreecommitdiff
path: root/makespec.py
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-04 23:11:12 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-04 23:11:12 -0800
commit4720748be8253de6fcf69275620ad65cd0bd0d45 (patch)
tree61e6f4659b7324714925fa9c31ddf523e1573459 /makespec.py
parent04fcb7a24ea4ac179f5033c00f7cb23b8ebb9e35 (diff)
Removed second parameter of makespec.py.
Diffstat (limited to 'makespec.py')
-rw-r--r--makespec.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/makespec.py b/makespec.py
index 07bf453..2361636 100644
--- a/makespec.py
+++ b/makespec.py
@@ -4,14 +4,13 @@ import sys
from subprocess import *
from string import Template
-if len(sys.argv) == 3:
- specfile = sys.argv[1]
- specformat = sys.argv[2]
+if len(sys.argv) == 2:
+ specformat = sys.argv[1]
if not (specformat in ["html", "markdown"]):
sys.stderr.write("Format must be html or markdown\n")
exit(1)
else:
- sys.stderr.write("Usage: makespec.py SPECFILE [html|markdown]\n")
+ sys.stderr.write("Usage: makespec.py [html|markdown]\n")
exit(1)
def toIdentifier(s):
@@ -51,7 +50,7 @@ lastnum = []
finishedMeta = False
yamllines = []
-with open(specfile, 'r', encoding='utf-8') as spec:
+with open('spec.txt', 'r', encoding='utf-8') as spec:
for ln in spec:
if not finishedMeta:
yamllines.append(ln)