Open cskemp opened 6 years ago
Hmmm. Sorry I'm six months late, but I'll look into this.
Current hypothesis is that this is effectively the same bug as #6, which I believe is a disagreement between the HTML inputs and the XML schema that EPUBs require. Working on it...
Just for the record: the errors I see in the calibre book editor (calibre->edit book->check book) are below. The issue is likely the downloaded pages being HTML rather than XHTML which requires properly self-closing tags.
Is there a simple way in Node (i.e. a library) to convert the HTML to XHTML? (a series of regexes for HR, BR and IMG may do the trick 90% of the time, but sure would be hacky).
ERROR: Parsing failed: Opening and ending tag mismatch: hr line 39 and div, line 41, column 94 [OEBPF/content/s10.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 27 and center, line 27, column 91 [OEBPF/content/s11.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 29 and a, line 29, column 223 [OEBPF/content/s12.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 59 and center, line 60, column 136 [OEBPF/content/s13.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 26 and p, line 26, column 2292 [OEBPF/content/s14.xhtml]
ERROR: Parsing failed: Specification mandate value for attribute async, line 150, column 24 [OEBPF/content/s15.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 41 and p, line 42, column 82 [OEBPF/content/s18.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 75 and p, line 76, column 207 [OEBPF/content/s19.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 25 and p, line 25, column 2150 [OEBPF/content/s2.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 35 and p, line 36, column 76 [OEBPF/content/s20.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 25 and p, line 25, column 2409 [OEBPF/content/s21.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 26 and p, line 26, column 638 [OEBPF/content/s22.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: hr line 50 and div, line 53, column 124 [OEBPF/content/s23.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 37 and p, line 38, column 74 [OEBPF/content/s25.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 39 and b, line 40, column 12 [OEBPF/content/s26.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 30 and center, line 30, column 95 [OEBPF/content/s27.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 106 and p, line 107, column 29 [OEBPF/content/s28.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 25 and strong, line 25, column 7757 [OEBPF/content/s3.xhtml]
ERROR: Parsing failed: Specification mandate value for attribute async, line 141, column 24 [OEBPF/content/s32.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 244 and p, line 245, column 49 [OEBPF/content/s33.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 86 and p, line 87, column 112 [OEBPF/content/s34.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 37 and p, line 38, column 119 [OEBPF/content/s35.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 40 and p, line 41, column 130 [OEBPF/content/s36.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 42 and center, line 42, column 95 [OEBPF/content/s37.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 31 and center, line 31, column 103 [OEBPF/content/s38.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 29 and p, line 29, column 79 [OEBPF/content/s39.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 29 and p, line 29, column 3127 [OEBPF/content/s4.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 30 and center, line 30, column 93 [OEBPF/content/s40.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 78 and center, line 79, column 167 [OEBPF/content/s41.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 54 and p, line 54, column 437 [OEBPF/content/s42.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 78 and p, line 79, column 27 [OEBPF/content/s44.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 30 and center, line 30, column 93 [OEBPF/content/s45.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 28 and font, line 29, column 14 [OEBPF/content/s46.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 56 and center, line 57, column 113 [OEBPF/content/s47.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 27 and p, line 27, column 874 [OEBPF/content/s48.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 52 and p, line 53, column 218 [OEBPF/content/s49.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 28 and center, line 29, column 218 [OEBPF/content/s50.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 29 and center, line 29, column 98 [OEBPF/content/s55.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 40 and center, line 40, column 112 [OEBPF/content/s56.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 29 and center, line 29, column 102 [OEBPF/content/s57.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 33 and p, line 34, column 19 [OEBPF/content/s58.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 88 and font, line 89, column 25 [OEBPF/content/s61.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 39 and p, line 39, column 1042 [OEBPF/content/s63.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 53 and p, line 53, column 787 [OEBPF/content/s64.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 26 and p, line 26, column 81 [OEBPF/content/s66.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 32 and center, line 32, column 90 [OEBPF/content/s68.xhtml]
ERROR: Parsing failed: Specification mandate value for attribute async, line 64, column 24 [OEBPF/content/s69.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 26 and center, line 26, column 95 [OEBPF/content/s70.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 26 and b, line 27, column 25 [OEBPF/content/s71.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 57 and p, line 57, column 589 [OEBPF/content/s72.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: br line 54 and p, line 55, column 24 [OEBPF/content/s74.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 68 and p, line 68, column 748 [OEBPF/content/s76.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 104 and p, line 104, column 1081 [OEBPF/content/s80.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 55 and center, line 56, column 85 [OEBPF/content/s81.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 25 and i, line 25, column 490 [OEBPF/content/s82.xhtml]
ERROR: Parsing failed: Opening and ending tag mismatch: img line 31 and p, line 31, column 1910 [OEBPF/content/s83.xhtml]
Thanks for creating this repository. I just tried viewing the current epub versions of The Codex and Replacing guilt and found both to be incomplete. For example, the first section of The Codex ("Eight Short Studies on Excuses) has a subtitle ("The clumsy game player") but nothing else.