diff --git a/src/imxml2django.py b/src/imxml2django.py index f859a90..046d740 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-09-04 19:15:08 (kthoden)> +# Time-stamp: <2020-09-07 10:28:32 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -319,7 +319,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid arg2 = OUTPUT_DIR / "images/embedded" / (strImageFileDir + strImageFileName), ) - # strCommand = GM_PATH + " convert " + os.getcwd() + "/" + strImageFileString + " -resize 250x250\\> " + os.getcwd() + "/CONVERT/django/images/embedded/" + strImageFileDir + strImageFileName + listArguments = shlex.split(strCommand) subprocess.check_output(listArguments, shell=False) tmpStrTail = xmlFigure.tail @@ -357,6 +357,9 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid PUBLICATION_DIR / strImageFileString, OUTPUT_DIR / "images" / (strImageFileDir + strImageFileName) ) + style_attribute = xmlElement.get("style") + if style_attribute is not None: + xmlEOAfigure.set("style", style_attribute) xmlEOAfigure.set("file", strImageFileDir + strImageFileName) xmlEOAfigure.set("width", xmlElement.find(".//width").text + "px;") xmlEOAfigure.set("order", str(intObjectNumber))