Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-21-2025, 02:41 PM   #10486
Tharos
Connoisseur
Tharos began at the beginning.
 
Posts: 65
Karma: 10
Join Date: Jul 2010
Device: Pocketbook InkPad Color 3, Kindle Oasis 2, Moon+ Reader pro
I'm not sure if it's because of the latest test version. But if I only update the metadata of a story via the website, the number of chapters in FFN is ignored and not updated. The number of words, for example, is recorded correctly.

Example 1: https://www.fanfiction.net/s/1420544...nting-Melodies
Example 2: https://www.fanfiction.net/s/14427052/1/Harry-Uchiha

On other pages (tested on AO3) it still works.
Tharos is offline   Reply With Quote
Old 03-21-2025, 04:07 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: 6,798
Karma: 4600429
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
ffnet is broken. The site isn't giving the full list of chapter for some stories. Note that FFF uses the list of chapters, not the number of chapters when counting chapters.

Your first example, the first page only shows 405 chapters and the second example only 1.

To save typing, here's link to the last time it came up.
JimmXinu is offline   Reply With Quote
Old 03-21-2025, 05:23 PM   #10488
MondSemmel
Junior Member
MondSemmel began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2025
Device: none
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.

What I've tried:
1)
Code:
[www.royalroad.com]
add_to_keep_html_attrs:,align
<-> Doesn't work, but then again, it's not an HTML tag.

2)
Code:
[epub]
add_to_output_css:
 p[style*="text-align: center"] { text-align: center !important; }
3)
Code:
## Outright overwrite output_css by removing the "text-align: justify" part from "body":
[epub]
output_css:
 body { background-color: #%(background_color)s;
        margin: 2%%;
	adobe-hyphenate: none; }
 [...]
---
I would be thankful for any advice.
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?
MondSemmel is offline   Reply With Quote
Old 03-21-2025, 06:19 PM   #10489
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,551
Karma: 74000001
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 online now   Reply With Quote
Old 03-21-2025, 08:36 PM   #10490
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,798
Karma: 4600429
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
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
Old 03-21-2025, 08:38 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: 6,798
Karma: 4600429
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
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, 05:28 PM   #10492
Clem2605
Enthusiast
Clem2605 began at the beginning.
 
Posts: 49
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 05:35 PM.
Clem2605 is offline   Reply With Quote
Old 03-23-2025, 02:09 PM   #10493
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: 32
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:	79
Size:	40.2 KB
ID:	214596  
booster-t is offline   Reply With Quote
Old 03-24-2025, 02:39 PM   #10494
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,798
Karma: 4600429
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
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-24-2025, 11:54 PM   #10495
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 12:28 AM. Reason: SPOILER LOG files
k7oamam0t0 is offline   Reply With Quote
Old 03-25-2025, 10:04 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: 6,798
Karma: 4600429
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
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, 10:44 PM   #10497
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: 768
Karma: 2773644
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, 04:33 AM   #10498
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, 09:37 AM   #10499
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,798
Karma: 4600429
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
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, 10:56 AM   #10500
wildfire070
Enthusiast
wildfire070 began at the beginning.
 
Posts: 44
Karma: 10
Join Date: May 2012
Device: Kindle Oasis, Scribe, Paperwhite // Boox Palma
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
Reply

Tags
fanfiction

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 514 03-23-2025 10:26 AM
[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 07:55 AM.


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