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 03-21-2025, 07:19 PM   #10486
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: 11,432
Karma: 81357187
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JimmXinu View Post
For what it matters, check_next_chapter and meta_from_last_chapter didn't work. I eventually got it though, just keep trying and hope you get lucky.
ownedbycats is offline   Reply With Quote
Old 03-21-2025, 09:36 PM   #10487
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: 7,196
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by MondSemmel View Post
I really like the epub output for Royal Road (some tools struggled to preserve e.g. italicized text formatting), but I'd like to preserve an author's center-aligned text, and none of my attempts so far have worked.

Example from this chapter): text with a dynamically generated class and a style="text-align: center" CSS attribute.
That story is using an inline style attribute to set the text-align--and a bunch of other stuff. Certain programs, typically word processors, use very brute force methods to apply appearance on HTML export.
Code:
<p class="cnM1MmYxOGU4ZjBiNjQzNTBiMTEwYjJkNjA2MzYzMDMz" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: center; text-indent: 0; text-transform: none; word-spacing: 0; text-decoration: none; margin: 0 0 12px; font-stretch: normal; font-family: Charter"><span style="font-family: &quot;Open Sans&quot;, sans-serif">Lexi</span></p>
Instead of align, you need to keep the style attr:
Code:
[www.royalroad.com]
add_to_keep_html_attrs:,style

## or by story:
[https://www.royalroad.com/fiction/63759]
add_to_keep_html_attrs:,style
And I don't have any good way to keep part of an in-line style.

Quote:
Originally Posted by MondSemmel View Post
PS: Any time I want to test a change to personal.ini, I currently delete and then redownload the entire fic. Is there a way to test settings, e.g. by downloading a single chapter, rather than an entire fic?
You can put a chapter number range after the URL when downloading by URL, or a single chapter. The example above would be:

https://www.royalroad.com/fiction/63759[197]

(Note that FFF's chapter number doesn't always line up if the author had a prologue or something.)

But you have to do download by URL every time. There are undocumented settings first_chapter and last_chapter you can put in personal.ini for a specific story that will act as if you'd used the chapter range.
JimmXinu is offline   Reply With Quote
Advert
Old 03-21-2025, 09:38 PM   #10488
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: 7,196
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
For what it matters, check_next_chapter and meta_from_last_chapter didn't work. I eventually got it though, just keep trying and hope you get lucky.
That's true.

What check_next_chapter and meta_from_last_chapter do in that case is give you 1 or 2 additional chances by letting you look at different chapters for the metadata.
JimmXinu is offline   Reply With Quote
Old 03-22-2025, 06:28 PM   #10489
Clem2605
Connoisseur
Clem2605 began at the beginning.
 
Posts: 60
Karma: 10
Join Date: May 2020
Device: Kobo H2O, Kobo Libra H2O, Boox Tab Ultra C
Quote:
Originally Posted by JimmXinu View Post

I haven't tested it, but something like this maybe?
Code:
 characters,ships,ships_CHARS=>(?i)(Adrien Agreste)?( \| )?(Chat Noir)?=>Adrien
Be careful, in my experience, this should also pick up the places where there are strings of 'nothing' so, for example, 'zzz' would become something like 'AdrienzAdrienzAdrienzAdrien', because every part is rendered optional by the '?'

Code:
characters,ships,ships_CHARS=>(?i)^Adrien Agreste \| Chat Noir$|^Adrien Agreste$|^Chat Noir$=>Adrien
or
Code:
characters=>(?i).*Adrien Agreste.*|.*Chat Noir.*=>Adrien
Would be better solutions.

| without the '\' is an 'OR' which means that it will match any of the options on either side if it detect them.

^ and $ match the beginning and the end of a tag, this solution wouldn't match anything else than the three tags 'Adrien Agreste \| Chat Noir', 'Adrien Agreste' and 'Chat Noir'.

.* will match any and all characters before and after the names, which means that both '.*Adrien Agreste.*' and '.*Chat Noir.*' should match the full canonical tag and respectively match any character tag that contains those words.
You shouldn't use that with the ships though because it will match the whole ship tag, not just one side of the '/'.

Use
Code:
characters,ships,ships_CHARS=>(?i)[^\/&amp;]*Adrien Agreste[^\/&amp;]*|[^\/&amp;]*Chat Noir[^\/&amp;]*=>Adrien
If you want to also apply the second solution to the ships metadata.
[^\/&amp;]* will match any and all characters that aren't '/' or '&'. The 'amp;' part is here for FFF to recognize that it is a '&' and not a special character, leaving it out will result in bugs in FFF's code.

Last edited by Clem2605; 03-22-2025 at 06:35 PM.
Clem2605 is offline   Reply With Quote
Old 03-23-2025, 03:09 PM   #10490
booster-t
Enthusiast
booster-t knows what time it isbooster-t knows what time it isbooster-t knows what time it isbooster-t knows what time it isbooster-t knows what time it isbooster-t knows what time it isbooster-t knows what time it isbooster-t knows what time it isbooster-t knows what time it isbooster-t knows what time it isbooster-t knows what time it is
 
booster-t's Avatar
 
Posts: 38
Karma: 2464
Join Date: Dec 2020
Location: Vancouver, Canada
Device: iPad, Mac Mini M4 Pro
FFN again

Well, here's a new problem, sort of, as it is starting to happen more and more. FFN refuses to download. Please see attached image. It's a 403 error.

Stephen
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2025-03-23 at 11.04.56 AM.png
Views:	98
Size:	40.2 KB
ID:	214596  
booster-t is offline   Reply With Quote
Advert
Old 03-24-2025, 03:39 PM   #10491
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: 7,196
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2025-03-24
- Improve logpage updating
- Implementing Timed One Time Password(TOTP) 2FA Exception and collection

I noticed logpage wasn't correctly updating when description contained <span> tags. This should fix it in most cases, including with custom logpage_entry.

dbhmw suggested a way to handle TOTP 2FA on the CLI mailing list; and while I didn't implement it the way they suggested, I have added TOTP 2FA for:
  • storiesonline.net
  • finestories.com
  • scifistories.com
  • alternatehistory.com
  • QQ
  • SV
  • SB
  • the-sietch.com
Those sites all share only two code bases. Any other supported site that can allow TOTP 2FA will need to be considered and implemented separately.

You can still have username/password in personal.ini and only enter the TOTP code as needed.

Note that you *cannot* use the Background Metadata update option with TOTP.
JimmXinu is offline   Reply With Quote
Old 03-25-2025, 12:54 AM   #10492
k7oamam0t0
Junior Member
k7oamam0t0 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2020
Device: laptop
okay i tried the browser cache for ao3 on https://archiveofourown.org/series/3138789

and got Error in FFF 'Page not found or expired in Browser Cache (see FFF setting browser_cache_age_limit)'(428) URL:'https://archiveofourown.org/users/login'

with this in the full
Spoiler:


calibre, version 8.0.1
ERROR: Unhandled exception: <b>HTTPErrorFFF</b>:HTTP Error in FFF 'Page not found or expired in Browser Cache (see FFF setting browser_cache_age_limit)'(428) URL:'https://archiveofourown.org/users/login'

calibre 8.0.1 embedded-python: True
Windows-10-10.0.26100-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.26100')
Python 3.11.5
Windows: ('10', '10.0.26100', 'SP0', 'Multiprocessor Free')
Interface language: None
EXE path: C:\Program Files\Calibre2\calibre.exe
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 22, 0) && Package KFX (from KFX Input) (2, 22, 0) && EpubMerge (3, 2, 0) && FanFicFare (4, 43, 0) && KFX metadata reader (from KFX Input) (2, 22, 0) && From KFX (2, 22, 0) && KFX Input (2, 22, 0)
Traceback (most recent call last):
File "calibre_plugins.fanficfare_plugin.fff_plugin" , line 991, in update_anthology
File "calibre_plugins.fanficfare_plugin.fff_plugin" , line 733, in get_urls_from_page
File "C:\Users\Owner\AppData\Roaming\calibre\plugins\Fa nFicFare.zip\fanficfare\geturls.py", line 44, in get_urls_from_page
File "C:\Users\Owner\AppData\Roaming\calibre\plugins\Fa nFicFare.zip\fanficfare\adapters\base_adapter.py", line 474, in get_urls_from_page
File "C:\Users\Owner\AppData\Roaming\calibre\plugins\Fa nFicFare.zip\fanficfare\adapters\base_otw_adapter. py", line 608, in before_get_urls_from_page
File "C:\Users\Owner\AppData\Roaming\calibre\plugins\Fa nFicFare.zip\fanficfare\adapters\base_otw_adapter. py", line 122, in performLogin
File "C:\Users\Owner\AppData\Roaming\calibre\plugins\Fa nFicFare.zip\fanficfare\requestable.py", line 102, in post_request
File "C:\Users\Owner\AppData\Roaming\calibre\plugins\Fa nFicFare.zip\fanficfare\fetchers\base_fetcher.py", line 124, in post_request
File "C:\Users\Owner\AppData\Roaming\calibre\plugins\Fa nFicFare.zip\fanficfare\fetchers\cache_basic.py", line 122, in fetcher_do_request
File "C:\Users\Owner\AppData\Roaming\calibre\plugins\Fa nFicFare.zip\fanficfare\fetchers\decorators.py", line 102, in fetcher_do_request
File "C:\Users\Owner\AppData\Roaming\calibre\plugins\Fa nFicFare.zip\fanficfare\fetchers\cache_browser.py" , line 110, in fetcher_do_request
fanficfare.exceptions.HTTPErrorFFF: HTTP Error in FFF 'Page not found or expired in Browser Cache (see FFF setting browser_cache_age_limit)'(428) URL:'https://archiveofourown.org/users/login'



what am i doing wrong here?

Last edited by theducks; 03-25-2025 at 01:28 AM. Reason: SPOILER LOG files
k7oamam0t0 is offline   Reply With Quote
Old 03-25-2025, 11:04 AM   #10493
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: 7,196
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by k7oamam0t0 View Post
okay i tried the browser cache for ao3 on https://archiveofourown.org/series/3138789

and got Error in FFF 'Page not found or expired in Browser Cache (see FFF setting browser_cache_age_limit)'(428) URL:'https://archiveofourown.org/users/login'
Turn off setting always_login. POST requests aren't cached and can't work with BrowserCache.
JimmXinu is offline   Reply With Quote
Old 03-26-2025, 11:44 PM   #10494
texasnightowl
Guru
texasnightowl ought to be getting tired of karma fortunes by now.texasnightowl ought to be getting tired of karma fortunes by now.texasnightowl ought to be getting tired of karma fortunes by now.texasnightowl ought to be getting tired of karma fortunes by now.texasnightowl ought to be getting tired of karma fortunes by now.texasnightowl ought to be getting tired of karma fortunes by now.texasnightowl ought to be getting tired of karma fortunes by now.texasnightowl ought to be getting tired of karma fortunes by now.texasnightowl ought to be getting tired of karma fortunes by now.texasnightowl ought to be getting tired of karma fortunes by now.texasnightowl ought to be getting tired of karma fortunes by now.
 
Posts: 819
Karma: 2873645
Join Date: Jul 2008
Location: Texas
Device: PW5, Oasis 3, K4B(NT), K3/KK
since this is fanficfare related, I'm going to ask here...in regards to AO3...what seems to give the better result...FanFicFare or using AO3's entire work > download epub option? Thoughts? I haven't done an in depth study so far. Curious if anyone has.
texasnightowl is offline   Reply With Quote
Old 03-27-2025, 05:33 AM   #10495
XRoverMaelstromX
Junior Member
XRoverMaelstromX began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2021
Device: MoonReader+ (Android App)
Quote:
Originally Posted by texasnightowl View Post
since this is fanficfare related, I'm going to ask here...in regards to AO3...what seems to give the better result...FanFicFare or using AO3's entire work > download epub option? Thoughts? I haven't done an in depth study so far. Curious if anyone has.
It depends on your priorities, under normal circumstances. Currently, with Ao3's server issues, FFF is struggling a little with it's normal functionality, so I've been downloading using Ao3's download option for things I'm especially worried about losing a copy of, but as soon as the servers are updated I'm going to re-download everything through FFF.

FFF, in it's totally unmodified form, if you do nothing to customize it and just install the plugin and run with it, creates a totally readable ebook but the metadata can be kind messy both in how it populates into Calibre and how it generates on the title page of the ebook. So, if you prioritize not having to mess around with customizing FFF and Calibre above everything else, just using Ao3's download option will give you a better result because that option lays out the title page like it looks on Ao3 and is therefore neater.

However, if you prioritize having the metadata for the fic show up automatically in Calibre, having the workskin stay attached to the epub, being able to download more than one story at a time (either individually or automatically bundling several into a single epub), and probably other things that I'm not thinking of just off the top of my head, then FFF is hands down the better option under normal circumstances.

If you're struggling with customizing it I wrote up a guide that walks you step by step through what I've done with mine, which I'm happy to link if there's interest, or there's this thread, the r/Calibre subreddit, the GitHub FAQ, and a spinoff thread here on MobileRead specifically about the replace metadata function as resources to help you get it sorted out so that downloaded fics come out to your liking.
XRoverMaelstromX is offline   Reply With Quote
Old 03-27-2025, 10:37 AM   #10496
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: 7,196
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
All I would add is that last I checked, AO3's download doesn't include images and FFF's does--except cases where the image hosting site prevents it (notably imgur).
JimmXinu is offline   Reply With Quote
Old 03-27-2025, 11:56 AM   #10497
wildfire070
Connoisseur
wildfire070 is on a distinguished road
 
Posts: 62
Karma: 72
Join Date: May 2012
Device: Kindle Oasis, Scribe, Paperwhite // Boox Palma, Tab Mini // Supernote
Speaking of image downloads via FFF, are the images embedded into the epub itself? I haven't been using the "polish" function on calibre, but one of the options is for it to download external resources:
Quote:
Download external resources such as images, stylesheets, etc. that point to URLs instead of files in the book. All such resources will be downloaded and added to the book so that the book no longer references any external resources.
Does FFF already do that with downloaded fics or do I need to start implementing the "polish" function into my workflow to prevent losing images from authors taking it down or broken URLs?

Another question: I'm currently trying the browser cache workaround to download from AO3. Should I have "use_view_full_work:true" enabled or disabled?
wildfire070 is offline   Reply With Quote
Old 03-27-2025, 02:00 PM   #10498
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: 7,196
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by wildfire070 View Post
Does FFF already do that with downloaded fics or do I need to start implementing the "polish" function into my workflow to prevent losing images from authors taking it down or broken URLs?

Another question: I'm currently trying the browser cache workaround to download from AO3. Should I have "use_view_full_work:true" enabled or disabled?
Yes, FFF downloads images and puts them in the epub. By default, it also processes images to convert to jpg and resize (keeping aspect) down to image_max_size: 580, 725. (Put image_max_size under[epub] if you want to change it.)

I use use_view_full_work:true

Personally, I've been having good luck with new testing feature use_archive_transformativeworks_org:true
JimmXinu is offline   Reply With Quote
Old 03-27-2025, 02:44 PM   #10499
wildfire070
Connoisseur
wildfire070 is on a distinguished road
 
Posts: 62
Karma: 72
Join Date: May 2012
Device: Kindle Oasis, Scribe, Paperwhite // Boox Palma, Tab Mini // Supernote
Quote:
Originally Posted by JimmXinu View Post
Yes, FFF downloads images and puts them in the epub. By default, it also processes images to convert to jpg and resize (keeping aspect) down to image_max_size: 580, 725. (Put image_max_size under[epub] if you want to change it.)

I use use_view_full_work:true

Personally, I've been having good luck with new testing feature use_archive_transformativeworks_org:true
Thank you! I'll give the test version and feature a try. Does it work for locked fics where you need to log in to view the fic?
wildfire070 is offline   Reply With Quote
Old 03-27-2025, 02:50 PM   #10500
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: 7,196
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by wildfire070 View Post
Thank you! I'll give the test version and feature a try. Does it work for locked fics where you need to log in to view the fic?
No. POST and login doesn't work with archive.transformativeworks.org in browser either.

BrowserCache should work with those if you log in manually in the browser.
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 527 08-15-2025 02:36 PM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 06:42 AM
[GUI Plugin] Marvin XD Philantrop Plugins 126 01-29-2017 01:48 PM
[GUI Plugin] KiNotes -axel- Plugins 0 07-14-2013 07:39 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


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


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