Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 09-29-2020, 11:52 AM   #1486
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
Anyone who won't take the credit for something they do is usually hoping they won't be blamed when said something goes belly up
Well, that wasn't my reason but in the end you aren't wrong. TBH I don't want to see this plugin again.
chaley is offline   Reply With Quote
Old 09-29-2020, 12:07 PM   #1487
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by chaley View Post
Well, that wasn't my reason but in the end you aren't wrong. TBH I don't want to see this plugin again.

We both know if you put your name down as credit that the saying "no good deed goes unpunished" will certainly come back around at a later date. Like helping out a family member or friend with a computer issue. Every issue with that computer after that "good deed" comes back to you.
DoctorOhh is online now   Reply With Quote
Old 09-29-2020, 12:37 PM   #1488
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by chaley View Post
V1.5.9 that fixes the black diamonds and, I hope, broke nothing else.
Am I overlooking the link?
Rev. Bob is offline   Reply With Quote
Old 09-29-2020, 12:39 PM   #1489
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Rev. Bob View Post
Am I overlooking the link?
It is there now. I probably did what I often do, forgot to press the "upload" button after adding the attachment.
chaley is offline   Reply With Quote
Old 09-29-2020, 01:54 PM   #1490
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,587
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by chaley View Post
TBH I don't want to see this plugin again.
Tar baby; dude, you're stuck with it.
hobnail is offline   Reply With Quote
Old 09-29-2020, 02:09 PM   #1491
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by hobnail View Post
Tar baby; dude, you're stuck with it.
Then I will make the plugin change every sentence in the book to "Please don't throw me in the briar patch," then change my email address.
chaley is offline   Reply With Quote
Old 09-29-2020, 02:15 PM   #1492
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by chaley View Post
It is there now. I probably did what I often do, forgot to press the "upload" button after adding the attachment.
Got it. What I've done so far is take two random ebooks - one short story, one novel - and first save them untouched, then clone two copies of each and run my standard script under 1.4.1 and 1.5.9, both under calibre 4.23 on Win10/32. So, as close to identical conditions as I could get. Once I had those, I unpacked the modified ebooks into separate folders and ran a DOS file comparison on the lot, both in binary mode and the looser text mode.

Results, short form:

In this environment, 1.5.9 saves its modified text files with CRLF EOLs, while calibre's editor and 1.4.1 both use CR EOLs. This constitutes a very minor bug, but it is nonetheless a difference in behavior.

Results, long form:

1.4.1 saved the modified files with UNIX EOLs (CR only), while 1.5.9 saved them with DOS EOLs (CRLF). One of the short story sections displayed a phantom text-comparison difference that looked like an extra linefeed, but bringing both modified copies into Notepad++ and changing the 1.5.9 version to use UNIX EOLs made them byte-identical. The same behavior showed up in the longer book as well, and I don't see a pattern. Some chapters display several instances, while others show none at all.

I should note that in the case of at least one file for each book, this extends to a known-static file which my copy of calibre custom-generates: titlepage.xhtml. (I use different stock cover page code, but it's a calibre source file mod; it doesn't come from the books.)

It turns out that loading the beta book into the calibre editor, making and undoing a minimal change to an affected file, resaving the book, and extracting that file results in its EOLs being changed to the CR format, which is why I conclude that this is a quite minor bug in 1.5.9.
Rev. Bob is offline   Reply With Quote
Old 09-29-2020, 02:26 PM   #1493
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Rev. Bob View Post
1.4.1 saved the modified files with UNIX EOLs (CR only), while 1.5.9 saved them with DOS EOLs (CRLF). One of the short story sections displayed a phantom text-comparison difference that looked like an extra linefeed, but bringing both modified copies into Notepad++ and changing the 1.5.9 version to use UNIX EOLs made them byte-identical. The same behavior showed up in the longer book as well, and I don't see a pattern. Some chapters display several instances, while others show none at all.
FWIW: UNIX EOL is LF. IIRC Mac is CR, but that might be outdated info. DOS (Windows) is CRLF. This BS has been causing me headaches for nigh-on 45 years.

I am not surprised at the difference. The last change I made was to take out all guesswork about modifying the files. Reason: in calibre V4.3 the system method not only corrected line endings but sometimes changed to encoding to 8-bit ASCII, which broke everything. Taking it out made calibre V5 leave use the "system" line ending. I suspect if you ran the plugin on Linux or Mac you would get slightly different behaviour.

This can be fixed if we are willing to fork.
Quote:
I should note that in the case of at least one file for each book, this extends to a known-static file which my copy of calibre custom-generates: titlepage.xhtml. (I use different stock cover page code, but it's a calibre source file mod; it doesn't come from the books.)
The plugin pays special attention to that file.
Quote:
It turns out that loading the beta book into the calibre editor, making and undoing a minimal change to an affected file, resaving the book, and extracting that file results in its EOLs being changed to the CR format, which is why I conclude that this is a quite minor bug in 1.5.9.
HTML is supposed to ignore EOL differences. I think the rule is any of CR, CRLF, or LF are treated as a space. The line ending should make no difference at all in what the reader app displays.

That said, I am willing to back the changes out if you are willing to support a fork.
chaley is offline   Reply With Quote
Old 09-29-2020, 02:47 PM   #1494
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,206
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Rev. Bob View Post
1.4.1 saved the modified files with UNIX EOLs (CR only), while 1.5.9 saved them with DOS EOLs (CRLF). One of the short story sections displayed a phantom text-comparison difference that looked like an extra linefeed, but bringing both modified copies into Notepad++ and changing the 1.5.9 version to use UNIX EOLs made them byte-identical. The same behavior showed up in the longer book as well, and I don't see a pattern. Some chapters display several instances, while others show none at all.
Minor nit. The UNIX EOL is a LF not a CR. Apple used CR for an EOL up to Mac OS X where they switched to using a LF.
DNSB is offline   Reply With Quote
Old 09-29-2020, 02:49 PM   #1495
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I just tested 1.5.9 with 4.23 and no errors and no funny characters in the editor. Everything seems good.

I'll give 5.0.1 a test and report back.
JSWolf is offline   Reply With Quote
Old 09-29-2020, 02:50 PM   #1496
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by chaley View Post
FWIW: UNIX EOL is LF. IIRC Mac is CR, but that might be outdated info. DOS (Windows) is CRLF. This BS has been causing me headaches for nigh-on 45 years.
In my defense, I’ve been awake several hours too long.

As to the rest: It’s a very minor thing, one which as far as I can tell is completely cosmetic, so I have no problem leaving it as is. I simply found it and thought, “he might want to know about that.”
Rev. Bob is offline   Reply With Quote
Old 09-29-2020, 02:53 PM   #1497
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
In my defense, I’ve been awake several hours too long.

As to the rest: It’s a very minor thing, one which as far as I can tell is completely cosmetic, so I have no problem leaving it as is. I simply found it and thought, “he might want to know about that.”
As for 4.23, it has no bother with the editor under Windows 10.
JSWolf is offline   Reply With Quote
Old 09-29-2020, 02:56 PM   #1498
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by JSWolf View Post
As for 4.23, it has no bother with the editor under Windows 10.
Yeah, I reported as much:

Quote:
Originally Posted by Rev. Bob View Post
It turns out that loading the beta book into the calibre editor, making and undoing a minimal change to an affected file, resaving the book, and extracting that file results in its EOLs being changed to the CR format, which is why I conclude that this is a quite minor bug in 1.5.9.
Basically, if the calibre editor has flagged a file as changed, then it converts its EOLs to UNIX format when saving the book.
Rev. Bob is offline   Reply With Quote
Old 09-29-2020, 04:13 PM   #1499
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,587
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by DNSB View Post
Minor nit. The UNIX EOL is a LF not a CR. Apple used CR for an EOL up to Mac OS X where they switched to using a LF.
My recollection was that Macs used CRLF (and Windows used LFCR as chaley points out). I remember opening Mac files on my Unix system and having CRs at the end of each line (and Windows files had a CR at the beginning of each line). If it was only CR then it would be one long line with no line breaks.

But then I was using emacs and maybe it was doing something reasonable/smart about the end of lines.
hobnail is offline   Reply With Quote
Old 09-29-2020, 04:23 PM   #1500
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I just tested 1.5.9 with 5.0.1 and no errors and no funny characters in the editor. Everything seems good with both 5.0.1 and 4.23 with version 1.5.9. Unless anyone else finds something wrong, I think we are good to go.
JSWolf is offline   Reply With Quote
Reply

Tags
modify epub


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1251 07-07-2025 09:13 PM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 AM
[GUI Plugin] Manage Series kiwidude Plugins 167 07-28-2024 03:07 PM
Modify ePub plugin dev thread kiwidude Development 346 09-02-2013 05:14 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 12:58 AM.


MobileRead.com is a privately owned, operated and funded community.