diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-04 23:11:12 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-04 23:11:12 -0800 |
commit | 4720748be8253de6fcf69275620ad65cd0bd0d45 (patch) | |
tree | 61e6f4659b7324714925fa9c31ddf523e1573459 | |
parent | 04fcb7a24ea4ac179f5033c00f7cb23b8ebb9e35 (diff) |
Removed second parameter of makespec.py.
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | makespec.py | 9 |
2 files changed, 6 insertions, 7 deletions
@@ -188,8 +188,8 @@ spec: spec.html echo "Link to missing anchor #$$link"; \ done -spec.html: spec.txt template.html - python3 makespec.py $< html > $@ +spec.html: spec.txt template.html ${PROG} + python3 makespec.py html > $@ spec.pdf: spec.md template.tex specfilter.hs pandoc -s $< --template template.tex \ 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) |