cmark

Unnamed repository; edit this file 'description' to name the repository.

commit 4720748be8253de6fcf69275620ad65cd0bd0d45
parent 04fcb7a24ea4ac179f5033c00f7cb23b8ebb9e35
Author: John MacFarlane <jgm@berkeley.edu>
Date:   Sun,  4 Jan 2015 23:11:12 -0800

Removed second parameter of makespec.py.

Diffstat:
MMakefile | 4++--
Mmakespec.py | 9++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
@@ -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
@@ -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)