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 06-21-2022, 05:52 AM   #7261
sios00
Enthusiast
sios00 began at the beginning.
 
Posts: 31
Karma: 10
Join Date: May 2022
Device: Kobo Libra 2
Quote:
Originally Posted by JimmXinu View Post
Yes. You'll want to use add_to_custom_columns_settings. See the wiki for all the details.
Thank you for this!
sios00 is offline   Reply With Quote
Old 06-23-2022, 01:39 AM   #7262
dysphere
Junior Member
dysphere began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Oct 2019
Device: Kindle Paperwhite 3
Quote:
Originally Posted by JimmXinu View Post
I experimentally downloaded the first 90 chapters, then updated a couple times, first to 91 then to 94 comparing between each--no problems found.

Is it just a change in size, or can you identify text that was lost?

An epub is a zip file. Zip file size depends on how compressed it is, which depends on the contents. Pretty sure I've seen a zip file get smaller before when containing more text if the text happens to be more compressible.

Calibre's Edit book has a "Compare to another book" feature (under Files) that's very useful. If you open an epub in Edit book before updating with FFF, you can then Compare to the updated file on disk (find the epub on disk from the Calibre library with the 'o' hotkey) to see exactly what's changed.

Or if you have the before and after epubs you could post somewhere for me to examine, it may help.
Hmm, it looks like it's removing more divs than necessary, starting on the 22nd file, which causes the location number to change on the kindle, which makes it more difficult for me to find where I was reading last. Epubs attached so you can compare.
dysphere is offline   Reply With Quote
Advert
Old 06-24-2022, 09:00 AM   #7263
watani
Connoisseur
watani began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Oct 2014
Device: Kindle Fire HD
As far as I can tell, when the update mode is set to "Update EPUB if New Chapters" for most sources any manual edits you make to previous chapters get kept and only the new chapters get downloaded and appended. I seem to be encountering an exception to this when updating a story from AO3, however.

There is a specific story on AO3 that has an in-text higher resolution image available than the one that FFF downloads, so I replace it in the EPUB manually (tried with both the original filename and with the FFF filename and format). The next time I update the fic the image gets reverted to the lower resolution FFF downloaded version. Why is this occurring and can I prevent it from happening?
watani is offline   Reply With Quote
Old 06-24-2022, 10:10 AM   #7264
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by watani View Post
There is a specific story on AO3 that has an in-text higher resolution image available than the one that FFF downloads, so I replace it in the EPUB manually (tried with both the original filename and with the FFF filename and format). The next time I update the fic the image gets reverted to the lower resolution FFF downloaded version. Why is this occurring and can I prevent it from happening?
The difference you are seeing is text(html really) vs image, not AO3 vs other sites.

Image processing happens and, by default, ensures that images are jpg and small enough to be visible in ebook readers. There are several settings you can tweak, see plugin-defaults.ini starting here.

You likely want to either increase image_max_size or set no_image_processing:true.
JimmXinu is offline   Reply With Quote
Old 06-24-2022, 11:45 AM   #7265
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by dysphere View Post
Hmm, it looks like it's removing more divs than necessary, starting on the 22nd file, which causes the location number to change on the kindle, which makes it more difficult for me to find where I was reading last. Epubs attached so you can compare.
The only change I see is removing empty div tags (containing only whitespace).

It looks like the author/poster is using p tags in some chapters and div tags--nested in other div tags with nested div tags containing   in-between--in many (but not all) chapters between chapters 22 and 83 to indicate paragraphs.

It's the difference between this:
Code:
<p>The first thought in my mind was: <em>Is he dead?</em></p>
And this:
Code:
<div>
<div>"So let me get this straight," Ran said, lowering her brow.</div>
</div>
<div>
<div>&nbsp;</div>
</div>
p is obviously preferred. Using div tags can work, but it requires some CSS to appear the same--div doesn't have the same spacing by default.

FFF has code to automatically remove most empty(whitespace only) tags because, generally speaking, that's how HTML is meant to work. For most tags, whitespace doesn't matter and an empty tag shouldn't do anything.

By default, the exceptions are p, th, and td tags, but that list can be changed with FFF setting keep_empty_tags.

So as far as I'm concerned, the question isn't why is this happening on update?, the question is why isn't this happening on the initial download?

And the answer is that FFF is removing the whitespace only tags (ie <div>&nbsp;</div>), but that removal leaves it's parent tag, which is now empty(except for whitespace),

This:
Code:
<div>
<div>&nbsp;</div>
</div>
...becomes this:
Code:
<div>

</div>
...and, on update, is itself removed.

So, for dysphere's immediate problem (locations in book reader changing between updates), the solution that's available today is to add div to keep_empty_tags, something like this:
Code:
[https://www.royalroad.com/fiction/28806]
add_to_keep_empty_tags:,div
Change the section to royalroad.com to apply it to all stories on the site.

This is less than ideal as it just keeps the 'empty' tags, but it will stop FFF changing the chapter text across updates.

I'm looking at ways to loop the remove-empty-tags code to also remove newly emptied tags. If I figure out something I'm happy with, there will be test version posted.
JimmXinu is offline   Reply With Quote
Advert
Old 06-24-2022, 11:20 PM   #7266
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question: I seem to recall that there was an option to set a custom URL (or filepath?) of an image for the cover. I'm having trouble finding it in defaults.ini. Am I mistaken?
ownedbycats is offline   Reply With Quote
Old 06-25-2022, 01:10 AM   #7267
labradors
Junior Member
labradors began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2021
Device: none
Hey. First time posting, hope this is the right place to ask this.
I'm trying to add something in the replace_metadata: part of the personal.ini so that for example in the relationship category: Background Person 1/Person 2 becomes Person 1/Person 2 (minor) so removing/replacing the Background part of the tag with (minor) at the end.
labradors is offline   Reply With Quote
Old 06-25-2022, 02:37 AM   #7268
labradors
Junior Member
labradors began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2021
Device: none
Quote:
Originally Posted by labradors View Post
Hey. First time posting, hope this is the right place to ask this.
I'm trying to add something in the replace_metadata: part of the personal.ini so that for example in the relationship category: Background Person 1/Person 2 becomes Person 1/Person 2 (minor) so removing/replacing the Background part of the tag with (minor) at the end.
Sorry, I forgot to put everything I wanted to in the first post and don't see any option to edit so replying to my own post. So yeah, I'm hoping someone can tell me how to do what I detailed in the post above. Thanks a ton
labradors is offline   Reply With Quote
Old 06-25-2022, 09:57 AM   #7269
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
Question: I seem to recall that there was an option to set a custom URL (or filepath?) of an image for the cover. I'm having trouble finding it in defaults.ini. Am I mistaken?
Search in defaults.ini. The setting is default_cover_image. That's for setting a default when there isn't a specific cover. To override story's cover, also set cover_exclusion_regexp to exclude the specific cover.

Quote:
Originally Posted by labradors View Post
I'm trying to add something in the replace_metadata: part of the personal.ini so that for example in the relationship category: Background Person 1/Person 2 becomes Person 1/Person 2 (minor) so removing/replacing the Background part of the tag with (minor) at the end.
Have you seen the wiki page?

Something like this should work:
Code:
add_to_replace_metadata:
 ships=>^Background (.*)$=>\1 (minor)
When asking for help, it works better to give specific examples. Giving a story URL and the exact metadata you want changed to what.
JimmXinu is offline   Reply With Quote
Old 06-25-2022, 04:12 PM   #7270
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2022-06-25
- Refactor code to remove empty tags to also remove now-empty parents by making another pass.
- Collect rating for adapter_libraryofmoriacom, refactor rating from TOC in base_efiction. Closes #859
JimmXinu is offline   Reply With Quote
Old 06-26-2022, 01:04 PM   #7271
penumbria
Member
penumbria began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Location: US
Device: Samsung Tablet & Kindle Fire using Google Play store
When trying to update a story from FFN, I am getting the message: browser cache failed to load with error ‘list index out of range’. I’ve tried it about a dozen times and get the same error message.
Is there another new workaround I am missing to get FFN to work? I don’t have stories get updates from FFN very often. Most have migrated to/cross post to AO3.
I went through and made sure every chapter of the story was in my cache by clicking on each one. And there were 77. And I have the older workarounds about browser cache and whatever in my personal ini.
I’m really not very tech savvy with this kind of stuff but I can follow directions on what to do, I just don’t really grasp the why I am doing it or what it means exactly.
penumbria is offline   Reply With Quote
Old 06-26-2022, 03:43 PM   #7272
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
There's suggestion a couple pages back, found searching thread for 'cache'.

I've also made it into an FAQ now:
I've followed all the instructions in Browser Cache Feature and it isn't working / I'm getting errors--help?
JimmXinu is offline   Reply With Quote
Old 06-26-2022, 09:38 PM   #7273
sandmanwake
Enthusiast
sandmanwake has learned how to buy an e-book online
 
Posts: 26
Karma: 82
Join Date: Aug 2018
Device: none
Quote:
Originally Posted by penumbria View Post
When trying to update a story from FFN, I am getting the message: browser cache failed to load with error ‘list index out of range’. I’ve tried it about a dozen times and get the same error message.
Is there another new workaround I am missing to get FFN to work? I don’t have stories get updates from FFN very often. Most have migrated to/cross post to AO3.
I've had some luck when encountering this problem by changing the "browser_cache_age_limit:" value in the personal.ini file from 4.0 to -1 just to update that one or two story that has issues and then changing it back afterwards for all other stories. Most of the time this works and I've only had maybe one or two instances where I've had to clear the cache entirely.
sandmanwake is offline   Reply With Quote
Old 06-27-2022, 10:31 AM   #7274
firefoxxy
Zealot
firefoxxy began at the beginning.
 
Posts: 105
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Kobo Libra 2
There's an issue that pops up from time to time, that occured only with two stories so far. One is finished by now, so it's a moot point, but the other is not doing what it should do.

FFF is set to "overwrite if newer" as well as "update from email". I received an update email today, and when I tried to download the story, it said the story wasn't newer. When I change the setting to "update", it works and fetches the new chapters.

The story link is:
https://archiveofourown.org/works/37767571

I'm going to switch my settings to "update" instead of "overwrite" (especially because I don't remember why I set it to overwrite in the first place), so it's not an urgent issue.

But I thought I could share the work-around if someone else has the same issue.
firefoxxy is offline   Reply With Quote
Old 06-27-2022, 10:49 AM   #7275
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by firefoxxy View Post
FFF is set to "overwrite if newer" as well as "update from email". I received an update email today, and when I tried to download the story, it said the story wasn't newer. When I change the setting to "update", it works and fetches the new chapters.

The story link is:
https://archiveofourown.org/works/37767571
That story says "Updated: 2022-03-16". On AO3, the author can set the date on each chapter.

So FFF is working as intended in this case.
JimmXinu is offline   Reply With Quote
Reply

Tags
fanfiction


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 523 07-15-2025 06:45 PM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 AM
[GUI Plugin] Marvin XD Philantrop Plugins 126 01-29-2017 12:48 PM
[GUI Plugin] KiNotes -axel- Plugins 0 07-14-2013 06:39 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 02:47 PM.


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