Bug fixes for the Comic Project Manger exporter

Authored by ragnarb on Mar 6 2018, 11:11 AM.



This patch fixes several minor bugs in the Comic Project Manager Docker T6833 for Krita.

CBZ fails to export if Crop checkbox is not checked, as then cropx and cropy are accessed before being assigned.
Fixed by assigning them to 0, if Crop checkbox is not checked.

Key error when writing out ACBF data when export EPUB, if CBZ is not selected.
Fixed by only exporting ACBF if CBZ is selected, as EPUB doesn't support the ACBF data anyway

Key error when looking for the cover page on EPub export, if the user has not chosen a cover page in the Meta Data dialog.
Fixed by defaulting to page 0, if no cover page has been selected.

Attempts to run .appendChild on extraGenres list in ACBF exporter
Fixed by using .append instead

Attempts to add license string to QDomDocument
Fixed by doing document.createTextNode(license)

As a side note, if you define a Series in the meta data, this gets exported it ACBF, but not EPub. I'm not sure if this is supported by EPub format, but Calibre at least has a field for Series, so it would be good to get it in there too.

I also encountered an interesting issue with the exporter. If you have newer Autosave files of your pages, Krita will pop up a dialog asking if you want to use the Autosave page for every page you export.

Test Plan
  1. Export a comics where you haven't touched the Meta Data
  2. Export a comic where you've edited all the Meta Data
  3. Export a comic as CBZ only, EPub only or Tiff only
  4. Export CBZ with and without crop

Diff Detail

R37 Krita
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
ragnarb requested review of this revision.Mar 6 2018, 11:11 AM
ragnarb created this revision.
ragnarb edited the summary of this revision. (Show Details)Mar 6 2018, 11:13 AM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 6 2018, 11:18 AM
This revision was automatically updated to reflect the committed changes.