diff --git a/src/imxml2django.py b/src/imxml2django.py index 8861c15..30feefd 100755 --- a/src/imxml2django.py +++ b/src/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2020-05-27 13:10:27 (kthoden)> +# Time-stamp: <2020-09-02 13:33:37 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -441,13 +441,14 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid # Transform width of Columns strColumnString = xmlElement.find(".//EOAtablecolumns").text strColumnString = re.sub(r"\|", "", strColumnString) - reMatchObjects = re.findall(r'([L|R|C].*?cm)', strColumnString) + reMatchObjects = re.findall(r'([L|R|C].*?[c|m]m)', strColumnString) intTableWidth = 0 listColumnAlignments = [None] listColumnWidths = [None] intNumberOfColumns = 0 for strColumnDefinition in reMatchObjects: strColumnDefinition = strColumnDefinition.rstrip("cm") + logging.info(strColumnDefinition) strColumnAlignment = strColumnDefinition[0] if strColumnAlignment == "L": strColumnAlignment = "left" diff --git a/src/imxml2epub.py b/src/imxml2epub.py index cc16da8..7c867cd 100755 --- a/src/imxml2epub.py +++ b/src/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2020-05-27 13:09:21 (kthoden)> +# Time-stamp: <2020-09-02 09:13:11 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -1537,14 +1537,13 @@ class FootnoteError(Exception): strColumnString = xmlTable.find(".//EOAtablecolumns").text strColumnString = re.sub(r"\|", "", strColumnString) xmlTable.remove(xmlTable.find(".//EOAtablecolumns")) - reMatchObjects = re.findall(r'([L|R|C].*?cm)', strColumnString) + reMatchObjects = re.findall(r'([L|R|C].*?[c|m]m)', strColumnString) intTableWidth = 0 listColumnAlignments = [None] listColumnWidths = [None] intNumberOfColumns = 0 for strColumnDefinition in reMatchObjects: strColumnDefinition = strColumnDefinition.rstrip("cm") - strColumnDefinition = strColumnDefinition.rstrip("mm") strColumnAlignment = strColumnDefinition[0] if strColumnAlignment == "L": strColumnAlignment = "left"