All xml attributes are now added to the etree class in alphabetical order to ensure it writes the same on different versions
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ addons:
|
||||
- python3-pyqt5
|
||||
- python3-pyqt5.qtsvg
|
||||
python:
|
||||
- "3.6"
|
||||
- "3.5"
|
||||
- "3.7"
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
|
||||
+1
-1
@@ -55,8 +55,8 @@ class NWItem():
|
||||
def packXML(self, xParent):
|
||||
xPack = etree.SubElement(xParent,"item",attrib={
|
||||
"handle" : str(self.itemHandle),
|
||||
"parent" : str(self.parHandle),
|
||||
"order" : str(self.itemOrder),
|
||||
"parent" : str(self.parHandle),
|
||||
})
|
||||
xSub = self._subPack(xPack,"name", text=str(self.itemName))
|
||||
xSub = self._subPack(xPack,"type", text=str(self.itemType.name))
|
||||
|
||||
@@ -288,8 +288,8 @@ class NWProject():
|
||||
# Root element and project details
|
||||
logger.debug("Writing project meta")
|
||||
nwXML = etree.Element("novelWriterXML",attrib={
|
||||
"fileVersion" : "1.0",
|
||||
"appVersion" : str(nw.__version__),
|
||||
"fileVersion" : "1.0",
|
||||
"timeStamp" : datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
|
||||
})
|
||||
|
||||
|
||||
@@ -89,9 +89,9 @@ class NWStatus():
|
||||
def packEntries(self, xParent):
|
||||
for n in range(self.theLength):
|
||||
xSub = etree.SubElement(xParent,"entry",attrib={
|
||||
"red" : str(self.theColours[n][0]),
|
||||
"green" : str(self.theColours[n][1]),
|
||||
"blue" : str(self.theColours[n][2]),
|
||||
"green" : str(self.theColours[n][1]),
|
||||
"red" : str(self.theColours[n][0]),
|
||||
})
|
||||
xSub.text = self.theLabels[n]
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user