From 51813866055dcc17f14fa587935172a8fb394e5e Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 18 Sep 2019 10:47:58 +0200 Subject: [PATCH] Some more Hyperimage rules --- imxml2django.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/imxml2django.py b/imxml2django.py index 29258b7..84e3323 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-08-02 16:25:56 (kthoden)> +# Time-stamp: <2019-08-06 15:05:17 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -426,13 +426,15 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid xmlResult.append(xmlEOAfigure) intObjectNumber += 1 # Insert visual Number and uid - if figure_type != "hionlycollage": + if figure_type == "hionlycollage" or figure_type == "hionlysub": + pass + else: strFigureNumber = dictFigures[xmlElement.find(".//anchor").get("id")] xmlEOAfigure.set("number", strFigureNumber) strFigureUID = xmlElement.find(".//anchor").get("id") xmlEOAfigure.set("id", strFigureUID) - hi_figure_types = ["hitrue", "hionly", "hionlycollage"] + hi_figure_types = ["hitrue", "hionly", "hionlycollage"]#, "hionlysub"] if figure_type in hi_figure_types: xmlEOAfigure.set("hielement", xmlElement.get("hielement"))