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-16-2024, 05:31 PM   #9376
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: 9,064
Karma: 62040591
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JimmXinu View Post
I highly recommend downloading to epub and converting to other formats as needed. That's what I do, and I use a Kindle with azw3 as my primary reader.
Action Chains may be of some use here.
ownedbycats is offline   Reply With Quote
Old 03-16-2024, 09:06 PM   #9377
marshie250
Enthusiast
marshie250 began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Jun 2019
Device: Kobo
Quote:
Originally Posted by JimmXinu View Post
Can you also confirm the new test version works with Background metadata for you?
Yes, it does! Sorry, must have not seen this message before.
marshie250 is online now   Reply With Quote
Advert
Old 03-18-2024, 08:36 PM   #9378
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,451
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version Posted

2023-03-18
- syosetu: make numeric metadata robust against wording changes - thanks praschke
JimmXinu is online now   Reply With Quote
Old 03-19-2024, 03:06 PM   #9379
w4tchdoge
Member
w4tchdoge began at the beginning.
 
w4tchdoge's Avatar
 
Posts: 22
Karma: 10
Join Date: Jul 2023
Device: Calibre
Question Addition to [base_xenforoforum] broke removal of tags from title

Recently I started experimenting with manually defining a titlepage for works hosted on XenForo based forums and added the following to [base_xenforoforum]

Spoiler:
Code:
add_to_extra_valid_entries:,normalized_storyUrl
include_in_normalized_storyUrl:storyUrl

add_to_replace_metadata:
 normalized_storyUrl=>(https?:\/\/forums?\..*?\.com\/(threads|posts)\/)(.*\.)?(\d+\/)(\?post.\d+.*\D(\d+))?=>\1\4\5

titlepage_start:<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>${title} by ${author}</title>
 <link href="stylesheet.css" type="text/css" charset="UTF-8" rel="stylesheet"/>
 </head>
 <body class="fff_titlepage">
 <div class="title">
 <h3><a href="${normalized_storyUrl}">${title}</a> by ${authorHTML}</h2>
 </div>
 <hr/>

titlepage_entry:
 <b>${label}:</b> ${value}<br />

titlepage_end:
 </div>
 </body>
 </html>


At the time [base_xenforoforum] contained the following:

Spoiler:
Code:
add_to_exclude_metadata_pre:
 prefix_tags=~Commission

legend_spoilers:true

add_to_extratags:,From CrW Forums

add_to_custom_columns_settings:
 dateUpdated=>#fff_dateupdated
 numChapters=>#fff_chapter_count
 status=>#fff_status
 numWords=>#fff_words


After making changes to [base_xenforoforum] I tried updating a few works using Overwrite Always to test whether my titlepage was generated correctly, and I noticed some of them had titles where the tags in the title were not removed. Some of the ones I noticed this behaviour on are this work, this work, and also this work.

I then tried adding the ini settings to [base_xenforo2forum] instead of [base_xenforoforum] which fixed the tags from title issue but I'd rather not have it in [base_xenforo2forum] as QQ is as of yet not on XF2.

I'm currently running FanFicFare version 4.32.3

I'd appreciate any help in figuring out what's going wrong/what I'm doing wrong.

Last edited by w4tchdoge; 03-19-2024 at 03:09 PM.
w4tchdoge is offline   Reply With Quote
Old 03-19-2024, 03:38 PM   #9380
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,451
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by w4tchdoge View Post
Recently I started experimenting with manually defining a titlepage for works hosted on XenForo based forums and added the following to [base_xenforoforum]
...
You're bumping into a weird interaction that happens with complex INI config. From the INI wiki page add_to_ section:
Quote:
There's another non-intuitive complication in the interaction between defaults.ini/personal.ini and add_to_: Because of the way the INI parser is used, each keyword in each section of personal.ini overwrites the same keyword in the same section of defaults.ini.
So your add_to_replace_metadata is replacing the one in defaults.ini [base_xenforoforum] instead of adding to it.

If you put it in any other section in the chain instead, it will work. Put all your titlepage settings under [base_xenforoforum:epub] and you'll be fine.
JimmXinu is online now   Reply With Quote
Advert
Old 03-19-2024, 03:47 PM   #9381
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,451
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by w4tchdoge View Post
I then tried adding the ini settings to [base_xenforo2forum] instead of [base_xenforoforum] which fixed the tags from title issue but I'd rather not have it in [base_xenforo2forum] as QQ is as of yet not on XF2.
FYI, QQ is running an XF2 testbed as we speak.

Initial testing shows FFF's XF2 support works on it as-is, but adapter_forumquestionablequestingcom will require a code change to switch.
JimmXinu is online now   Reply With Quote
Old 03-19-2024, 04:30 PM   #9382
w4tchdoge
Member
w4tchdoge began at the beginning.
 
w4tchdoge's Avatar
 
Posts: 22
Karma: 10
Join Date: Jul 2023
Device: Calibre
Quote:
Originally Posted by JimmXinu View Post
Put all your titlepage settings under [base_xenforoforum:epub] and you'll be fine.
Thanks for that! Not having any issues with tags in title now.

Quote:
Originally Posted by JimmXinu View Post
FYI, QQ is running an XF2 testbed as we speak.

Initial testing shows FFF's XF2 support works on it as-is, but adapter_forumquestionablequestingcom will require a code change to switch.
I will admit that I don't use QQ as much but it'll be nice to see the site updated to have (I assume) feature parity with SB and SV.
w4tchdoge is offline   Reply With Quote
Old 03-19-2024, 06:04 PM   #9383
Da Man
Enthusiast
Da Man began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Jun 2018
Device: none
Seems the slow_down_sleep_time in personal.ini stopped working as intended. I noticed the requests going through unexpectedly quick, to test this I set the sleep time even higher:

slow_down_sleep_time:99

Then I checked a bunch of fics from the same site for updates and had the following time periods (in s) between requests sent to flaresolverr: 24, 16, 25, 17, 28, 28, 27, 19

With 99 it should be between 50 and 150, so something is clearly wrong here.
Da Man is offline   Reply With Quote
Old 03-19-2024, 06:37 PM   #9384
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,451
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by Da Man View Post
Seems the slow_down_sleep_time in personal.ini stopped working as intended.
It's working as intended for me. And that code hasn't been touched recently.

A number of [<site>] sections have a slow_down_sleep_time setting in defaults.ini.

If you put slow_down_sleep_time under [defaults] in personal.ini, those [<site>] sections in defaults.ini will take precedence over [defaults] in personal.ini.

Set it in personal.ini under the specific [<site>] section or [overrides] instead.

Alternatively, since the numbers you quote are larger than site's default, I would you have more than one slow_down_sleep_time setting, possibly in more than one copy of the same [<section>] that are conflicting.

If you run in debug mode, each fetch will explicitly state it's sleep time like:
Code:
FFF: DEBUG: 2024-03-19 17:19:15,288: decorators.py(123): random sleep(49.50-148.50):139.64
JimmXinu is online now   Reply With Quote
Old 03-19-2024, 07:13 PM   #9385
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: 9,064
Karma: 62040591
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question:

How would I take the contents of calibre_cust_seriesdesc (composite column containing HTML) and insert that on just the title page to look like part the description? Note that most of the time, the column will just be blank.

Additional context: Since Calibre added metadata notes, I've been moving my series descriptions from the book comments to the series-specific notes. Before, I used replace_metadata to prepend the series description to the book comments but since #seriesdesc also displays that text in book details it'd be duplicated.


EDIT:

Code:
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,ao3chaps,numWords,publisher,calibre_cust_seriesdesc,description
This works. However, how do I move the "Summary" label above the seriesdesc?

Last edited by ownedbycats; 03-19-2024 at 07:25 PM.
ownedbycats is offline   Reply With Quote
Old 03-19-2024, 07:23 PM   #9386
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,451
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by ownedbycats View Post
How would I take the contents of calibre_cust_seriesdesc (composite column containing HTML) and insert that on just the title page to look like part the description?
Something like:
Code:
add_to_titlepage_entries:,calibre_cust_seriesdesc
Or more probably you'll want to replace titlepage_entries outright to set the order as you prefer it. Possibly put <div>,calibre_cust_seriesdesc,</div> if it doesn't already have a wrapping tag.
JimmXinu is online now   Reply With Quote
Old 03-19-2024, 07:33 PM   #9387
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: 9,064
Karma: 62040591
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Here's what I tried. This is under the AO3 section.

Code:
## Titlepage including ao3chaps and series description
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,ao3chaps,numWords,publisher,calibre_cust_seriesdesc,description
description_label:
calibre_cust_seriesdesc_label:
This removes the label entirely.

However, I've also got a <br /> and between seriesdesc and description. resulting in a weird-looking gap. I've attached the book I was testing with. Any ideas?
Attached Files
File Type: epub bgmeta-u_az5iqi.epub (293.9 KB, 20 views)
ownedbycats is offline   Reply With Quote
Old 03-19-2024, 08:53 PM   #9388
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,451
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
EPUB Title Page Custom Output Wiki Page

The <br /> tag comes from default titlepage_entry which is effectively:
Code:
titlepage_entry:
 <b>${label}:</b> ${value}<br />
You could experiment with removing <br /> from titlepage_entry and instead building it into titlepage_entries or each individual X_label.

Code:
## Note that this version will *not* remove <br /> tags when a metadata is empty.
titlepage_entries: seriesHTML,<br />,category,<br />,genre,<br />,language,<br />,characters,<br />,ships,<br />,status,<br />,datePublished,<br />,dateUpdated,<br />,dateCreated,<br />,rating,<br />,warnings,<br />,numChapters,<br />,numWords,<br />,publisher,<br />,description

## Or maybe:
title_label:<br />Title
storyUrl_label:<br />Story URL
## ...
Or remove the <br /> tags, put <div>s & <span>s or and apply some smarter CSS instead of the brute force 90s formatting my brain still defaults to.

Example:
Code:
titlepage_entry:
 <div class='titlepage_entry' id='${id}'><span class='label'>${label}:</span> <span class='value'>${value}</span></div>

# otherwise description uses titlepage_wide_entry
wide_titlepage_entries:

add_to_output_css:
 .titlepage_entry .label { font-weight: bold;}
 #description > .label { display: none; }
This version has significant advantages if you are CSS savvy. You can adjust the CSS in Edit book and see what the output looks like without need to run FFF updates. Then update your output_css setting.
JimmXinu is online now   Reply With Quote
Old 03-20-2024, 01:43 AM   #9389
culytera
Zealot
culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.
 
Posts: 114
Karma: 290364
Join Date: Jul 2021
Device: iPhone
With my current personal.ini I get these results. <attached> I manually put the series description into the epub's metadata then updated it again through FFF to add the series description to the title page, not sure if that's your process as well since I'm not familiar with this. I also put the composite column in titlepage_entries just to demonstrate what it'd look like if added there.

I have the series description and summary on my titlepage_end instead of titlepage_entries.
Code:
titlepage_end:
 </dl>
 <div class="flex-parent display-on-cover">
   <div class="flex-child-edge"></div>
   <div class="flex-child-text stats"><span>${rating}</span> ${icons} ${numWords} ◈ ${chapterslashtotal}</div>
   <div class="flex-child-edge"></div>
 </div>
 <div class="flex-parent display-on-reader">
   <div class="flex-child-edge"></div>
   <div class="flex-child-text">${icons}</div>
   <div class="flex-child-edge"></div>
 </div>
 <div class="tag-summary-content">${calibre_cust_seriesdesc}${description}</div>
 </body>
 </html>
And the relevant css for the tag-summary-content class
Code:
 .fff_titlepage .tag-summary-content p {
  margin-top: 0;
 }
Attached Thumbnails
Click image for larger version

Name:	with_series_desc.jpg
Views:	43
Size:	1.12 MB
ID:	207016   Click image for larger version

Name:	no_series_desc.jpg
Views:	41
Size:	911.2 KB
ID:	207017  
culytera is offline   Reply With Quote
Old 03-20-2024, 07:23 AM   #9390
w4tchdoge
Member
w4tchdoge began at the beginning.
 
w4tchdoge's Avatar
 
Posts: 22
Karma: 10
Join Date: Jul 2023
Device: Calibre
Question More site-specific Cover Generation settings?

I've started fiddling with cover generation settings since my current setup (image) means that the covers on stories hosted on XenForo forums get set as the Calibre cover when I'd rather use the Generate Covers plugin to make covers for them.

I tried changing the settings to this (image) and this got the results I wanted but also meant that the same would apply to works from Scribble Hub and Royal Road, and since
  1. I use Scribble Hub and Royal Road a lot more than I do XenForo sites
  2. The number of XenForo works with covers I want to GC in my library is much smaller than the number of SH/RR works with covers I want to keep.
having the Generate Calibre Covers setting set to Always isn't what I would consider a solution.

I reverted to my original settings (image) and tried adding the following to my ini.

Spoiler:
Code:
[forums.spacebattles.com]
generate_cover_settings:
 ${cover_image} => (specific|first|default|force|old) => SpaceBattles

[forums.sufficientvelocity.com]
generate_cover_settings:
 ${cover_image} => (specific|first|default|force|old) => SufficientVelocity

[forum.questionablequesting.com]
generate_cover_settings:
 ${cover_image} => (specific|first|default|force|old) => QuestionableQuesting

But that didn't trigger the GC plugin on XenForo works that did have covers. I'm assuming this is because the ini setting does not override the Generate Calibre Covers setting in the main FanFicFare Plugin settings.

Would it be possible to have the generate_cover_settings ini setting override the "Yes, unless FanFicFare found a cover image" Generate Calibre Covers setting? Or perhaps have a new ini setting where you can override the Generate Calibre Covers setting from the FanFicFare Plugin settings?

To clarify, my desired outcome is to be able to:
  • Always have the original cover from the website embedded in the EPUB.
  • Always have the original cover from the website be replaced by a GC generated Calibre Cover if the work is from a XenForo forum.
  • Always have the original cover from the website as the Calibre Cover if the work is not from a XenForo forum.

I would greatly appreciate any help (in case there is an ini setting for this and I've missed it) or answers on whether this feature might be implemented (I recognize that this is sort of a very roundabout way of asking for a feature that—to my knowledge at least—doesn't exist)
w4tchdoge 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 494 05-18-2024 02:34 AM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 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:01 PM.


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