1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 08:45:04 -05:00

Support ancient python on XSF machines. Remove debugging comment.

This commit is contained in:
Tobias Markmann 2014-03-13 18:18:09 +01:00
parent 9d8722a1aa
commit 9ac65af823

8
gen.py
View File

@ -74,10 +74,10 @@ def serializeInlineImage(output_dir, no, attrValue):
plaindata = base64.b64decode(data) plaindata = base64.b64decode(data)
# Do something smart with mime_type # Do something smart with mime_type
if mime_type in ('image/png'): if mime_type in ('image/png', 'image/jpeg'):
file_ext = mime_type.split('/')[1] file_ext = mime_type.split('/')[1]
with open(output_dir + '/' + 'inlineimage-' + str(no) + '.' + file_ext, 'wb') as f: f = open(output_dir + '/' + 'inlineimage-' + str(no) + '.' + file_ext, 'wb')
f.write(plaindata) f.write(plaindata)
def serializeXEPInlineImages(output_dir, filename): def serializeXEPInlineImages(output_dir, filename):
dom = parse(filename) dom = parse(filename)
@ -418,7 +418,7 @@ def main(argv):
executeCommand("sed -e '1s/<?[^?]*?>//' " + CONFIGPATH + "/extensions.xml > " + XEPPATH + "/../includes/xeplist.txt") executeCommand("sed -e '1s/<?[^?]*?>//' " + CONFIGPATH + "/extensions.xml > " + XEPPATH + "/../includes/xeplist.txt")
#executeCommand("rm -rfd /tmp/xepbuilder") executeCommand("rm -rfd /tmp/xepbuilder")
makeBundle() makeBundle()