Skip to content

Commit

Permalink
collage handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Aug 2, 2019
1 parent 4369492 commit 17d29ad
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions imxml2django.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
# Time-stamp: <2019-07-31 14:46:18 (kthoden)>
# Time-stamp: <2019-08-02 16:25:56 (kthoden)>

"""
Create an XML file that can be inserted into the Django database
Expand Down Expand Up @@ -416,7 +416,7 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid
else:
xmlEOAfigure.set("file", strImageFileDir + strImageFileName)

if figure_type == "hionly" or figure_type == "hionlycollage":
if figure_type == "hionly":# or figure_type == "hionlycollage":
logging.debug(f"Found hyperimage figure ({figure_type}), no need for caption and size information.")
pass
else:
Expand All @@ -426,10 +426,11 @@ def djangoParseObject(xmlElement, indent=False, listtype=None, listnumber=0, uid
xmlResult.append(xmlEOAfigure)
intObjectNumber += 1
# Insert visual Number and uid
strFigureNumber = dictFigures[xmlElement.find(".//anchor").get("id")]
xmlEOAfigure.set("number", strFigureNumber)
strFigureUID = xmlElement.find(".//anchor").get("id")
xmlEOAfigure.set("id", strFigureUID)
if figure_type != "hionlycollage":
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"]

Expand Down

0 comments on commit 17d29ad

Please sign in to comment.