1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-21 23:28:51 -05:00

Add fast build mode which basically just rebuilds the HTML list of XEPs.

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@3556 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Tobias Markmann 2009-10-20 18:02:44 +00:00
parent a0d1a8f6d9
commit d6aaa478b2

28
gen.py
View File

@ -46,6 +46,7 @@ XEPPATH = "/var/www/vhosts/xmpp.org/extensions"
CONFIGPATH = "/var/local/xsf"
verbose = False
fast = False
last_build = {}
def getText(nodelist):
@ -257,16 +258,17 @@ def buildPDF( file ):
return True
def buildXEP( filename ):
print "Building " + filename + ": ",
if buildXHTML( filename ):
print "XHTML(OK) / ",
else:
print "XHTML(ERROR) / ",
if buildPDF( filename ):
print "PDF(OK)"
else:
print "PDF(ERROR)"
if not fast:
print "Building " + filename + ": ",
if buildXHTML( filename ):
print "XHTML(OK) / ",
else:
print "XHTML(ERROR) / ",
if buildPDF( filename ):
print "PDF(OK)"
else:
print "PDF(ERROR)"
x = XEPTable(CONFIGPATH + "/extensions.xml")
xinfo = XEPInfo(filename)
@ -288,14 +290,16 @@ def usage():
print "Options:"
print "-v Enable verbose output for debugging."
print "-a Build all available XEPs."
print "-f Fast; means no actual compiling is done"
def main(argv):
global verbose
global CONFIGPATH
global fast
buildall = False
try:
options, remainder = getopt.gnu_getopt(argv, "va")
options, remainder = getopt.gnu_getopt(argv, "vaf")
except getopt.GetoptError:
usage()
sys.exit(2)
@ -305,6 +309,8 @@ def main(argv):
verbose = True
elif opt in ('-a'):
buildall = True
elif opt in ('-f'):
fast = True
if len(remainder) > 0:
try: