diff --git a/plugins/python/comics_project_management_tools/comics_exporter.py b/plugins/python/comics_project_management_tools/comics_exporter.py --- a/plugins/python/comics_project_management_tools/comics_exporter.py +++ b/plugins/python/comics_project_management_tools/comics_exporter.py @@ -146,15 +146,17 @@ # Export acbf metadata. if export_success: - title = self.configDictionary["projectName"] - if "title" in self.configDictionary.keys(): - title = self.configDictionary["title"] + if "CBZ" in sizesList.keys(): + title = self.configDictionary["projectName"] + if "title" in self.configDictionary.keys(): + title = self.configDictionary["title"] - self.acbfLocation = str(exportPath / "metadata" / str(title + ".acbf")) + self.acbfLocation = str(exportPath / "metadata" / str(title + ".acbf")) - locationStandAlone = str(exportPath / str(title + ".acbf")) + locationStandAlone = str(exportPath / str(title + ".acbf")) - export_success = exporters.ACBF.write_xml(self.configDictionary, self.acbfPageData, self.pagesLocationList["CBZ"], self.acbfLocation, locationStandAlone, self.projectURL) + export_success = exporters.ACBF.write_xml(self.configDictionary, self.acbfPageData, self.pagesLocationList["CBZ"], self.acbfLocation, locationStandAlone, self.projectURL) + print("CPMT: Exported to ACBF", export_success) # Export and package CBZ and Epub. if export_success: @@ -294,6 +296,9 @@ projection.waitForDone() qApp.processEvents() # resize appropriately + else: + cropx = 0 + cropy = 0 res = page.resolution() listScales = [projection.width(), projection.height(), res, res] projectionOldSize = [projection.width(), projection.height()] diff --git a/plugins/python/comics_project_management_tools/exporters/CPMT_ACBF_XML_Exporter.py b/plugins/python/comics_project_management_tools/exporters/CPMT_ACBF_XML_Exporter.py --- a/plugins/python/comics_project_management_tools/exporters/CPMT_ACBF_XML_Exporter.py +++ b/plugins/python/comics_project_management_tools/exporters/CPMT_ACBF_XML_Exporter.py @@ -135,7 +135,7 @@ bookGenre.setAttribute("match", str(genreMatch)) bookInfo.appendChild(bookGenre) else: - extraGenres.appendChild(genre) + extraGenres.append(genre) annotation = document.createElement("annotation") if "summary" in configDictionary.keys(): paragraphList = str(configDictionary["summary"]).split("\n") @@ -277,7 +277,7 @@ license = str(configDictionary.get("license", "")) if license.isspace() is False and len(license) > 0: publishLicense = document.createElement("license") - publishLicense.appendChild(license) + publishLicense.appendChild(document.createTextNode(license)) publisherInfo.appendChild(publishLicense) meta.appendChild(publisherInfo) diff --git a/plugins/python/comics_project_management_tools/exporters/CPMT_EPUB_exporter.py b/plugins/python/comics_project_management_tools/exporters/CPMT_EPUB_exporter.py --- a/plugins/python/comics_project_management_tools/exporters/CPMT_EPUB_exporter.py +++ b/plugins/python/comics_project_management_tools/exporters/CPMT_EPUB_exporter.py @@ -62,7 +62,10 @@ # copyimages to images pagesList = [] if len(pagesLocationList)>0: - coverNumber = configDictionary["pages"].index(configDictionary["cover"]) + if "cover" in configDictionary.keys(): + coverNumber = configDictionary["pages"].index(configDictionary["cover"]) + else: + coverNumber = 0 for p in pagesLocationList: if os.path.exists(p): shutil.copy2(p, str(imagePath))