Add last-generated section to docs
This commit is contained in:
parent
3b52320023
commit
68cb9733f9
@ -17,6 +17,10 @@ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
* Generated
|
||||
|
||||
This file last generated Tuesday, 17 May 2016 05:59PM UTC
|
||||
|
||||
* Glossary
|
||||
** (
|
||||
*** (TM)
|
||||
|
BIN
docs/jargon.1.gz
BIN
docs/jargon.1.gz
Binary file not shown.
@ -15,6 +15,11 @@ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
</p>
|
||||
<H2>Generated</H2>
|
||||
<p>
|
||||
This file last generated Tuesday, 17 May 2016 05:59PM UTC
|
||||
|
||||
</p>
|
||||
<H2>Glossary</H2>
|
||||
<H3>(</H3>
|
||||
|
@ -1,6 +1,7 @@
|
||||
import os
|
||||
import string
|
||||
import operator
|
||||
import os
|
||||
import datetime
|
||||
import string
|
||||
import time
|
||||
|
||||
def jargonParseEntry(filename):
|
||||
@ -75,6 +76,13 @@ def saveLicense(fp, year, publishername):
|
||||
fp.write("A copy of the license is included in the section entitled \"GNU\n")
|
||||
fp.write("Free Documentation License\".\n\n")
|
||||
|
||||
|
||||
def saveGenerated(fp):
|
||||
"""saves the last-generated timestamp"""
|
||||
utcnow = datetime.datetime.utcnow().strftime("%A, %d %B %Y %I:%M%p UTC")
|
||||
fp.write("This file last generated " + utcnow + "\n\n")
|
||||
|
||||
|
||||
def jargonWithDefinitions(text, definitions, isHtml):
|
||||
result = ''
|
||||
prevpos = 0
|
||||
@ -114,6 +122,9 @@ def jargonToManpage(manpageFilename, entries, version, publishername):
|
||||
fp.write(".SH LICENSE\n\n")
|
||||
saveLicense(fp, year, publishername)
|
||||
|
||||
fp.write(".SH GENERATED\n\n")
|
||||
saveGenerated(fp)
|
||||
|
||||
for entry in entries:
|
||||
title = entry[0]
|
||||
text = entry[1]
|
||||
@ -152,6 +163,9 @@ def jargonToOrgMode(orgFilename, entries, version, publishername):
|
||||
fp.write("* License\n\n")
|
||||
saveLicense(fp, year, publishername)
|
||||
|
||||
fp.write("* Generated\n\n")
|
||||
saveGenerated(fp)
|
||||
|
||||
fp.write("* Glossary\n")
|
||||
|
||||
subsection = ''
|
||||
@ -193,6 +207,10 @@ def jargonToHTML(htmlFilename, entries, version, publishername):
|
||||
fp.write(" <p>\n")
|
||||
saveLicense(fp, year, publishername)
|
||||
fp.write(" </p>\n")
|
||||
fp.write(" <H2>Generated</H2>\n")
|
||||
fp.write(" <p>\n")
|
||||
saveGenerated(fp)
|
||||
fp.write(" </p>\n")
|
||||
fp.write(" <H2>Glossary</H2>\n")
|
||||
|
||||
subsection = ''
|
||||
|
Loading…
Reference in New Issue
Block a user