summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--quip-0001.rst11
-rwxr-xr-xscripts/gen-quip-0000.py5
2 files changed, 12 insertions, 4 deletions
diff --git a/quip-0001.rst b/quip-0001.rst
index f201641..23f3e3b 100644
--- a/quip-0001.rst
+++ b/quip-0001.rst
@@ -133,13 +133,20 @@ rendered obsolete by one or several later QUIPs. The newer QUIPs must have a
Replaces header containing the QUIPs that they render obsolete.
+File Naming
+===========
+
+QUIPs must be named ``quip-XXXX[-shortname].rst`` where the -shortname is optional
+to help identifying the right file. shortname must not be a number since that would
+conflict with auxiliary files (see below).
+
Auxiliary Files
===============
QUIPs may include auxiliary files such as diagrams. Such files must be
-named ``quip-XXXX-Y.ext``, where "XXXX" is the QUIP number, "Y" is a
+named ``quip-XXXX-Y[-shortname].ext``, where "XXXX" is the QUIP number, "Y" is a
serial number (starting at 1), and "ext" is replaced by the actual
-file extension (e.g. "png").
+file extension (e.g. "png"). The descriptive shortname is optional.
References and Footnotes
diff --git a/scripts/gen-quip-0000.py b/scripts/gen-quip-0000.py
index 0f2ded9..afc6bc2 100755
--- a/scripts/gen-quip-0000.py
+++ b/scripts/gen-quip-0000.py
@@ -28,11 +28,12 @@ class RootQuip (dict):
del last_name
def quip_entries(self):
- fmt = ' <tr><td>%4s</td><td><a href="quip-%04d.html">%04d</a></td><td>%s</td><td>%s</td></tr>'
+ fmt = ' <tr><td>%4s</td><td><a href="%s.html">%04d</a></td><td>%s</td><td>%s</td></tr>'
for filename in sorted(self):
q = self[filename]
num = int(q['QUIP'])
- yield fmt % (q['Type'][:4], num, num, q['Title'], self.owners(q['Author']))
+ name = os.path.splitext(os.path.basename(filename))[0]
+ yield fmt % (q['Type'][:4], name, num, q['Title'], self.owners(q['Author']))
preamble = """\
QUIP: 0