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 02-16-2025, 03:07 PM   #10366
ThreeLizards
Junior Member
ThreeLizards began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2025
Device: Kindle Paperwhite 2024
I did it!

I got the title page looking all nice and fancy!
Spoiler:
Code:
# Add HTML to format the title page

titlepage_entries: rating,warnings,ao3categories,fandoms,ships,characters,freeformtags,language,collections,numWords,chapterslashtotal,description

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"/>
 <meta name="calibre-html-render-data"/>
 </head>
 <body>
 <div class="title">
 <a href="${storyUrl}">${title}</a> by ${authorHTML}
 </div>
 <dl class="titlepagelist">

titlepage_entry:
 <dt><b>${label}:</b></dt> <dd>${value}</dd>

## When using tables, make these span both columns.
wide_titlepage_entries: 

## ${id}, ${label}, ${value}
## Used with entries listed in wide_titlepage_entries, typically description, storyUrl, authorUrl
titlepage_wide_entry:
 <span><b>${label}:</b> ${value}</span>&nbsp;&nbsp;

## metadata
titlepage_end:
## <dl class="stats">
## </dl>
 </dl>
 <hr style="border: .75px solid #999; width: 90%%; margin: 10px auto;" />
 <br />
 <div class="tag-summary-content" style="margin-top: 10px;">
 <div style="text-align: left; font-weight: bold; margin-bottom: 5px;">Stats:</div>
   <div class="inline" style="display: flex; justify-content: space-between; margin-bottom: 8px;">
     <span>Published: ${datePublished}</span>
     <span>Updated: ${dateUpdated}</span>
     <span>Status: ${status}</span>
   </div>
   <div class="inline" style="display: flex; justify-content: space-between; margin-bottom: 8px;">
     <span>Kudos: ${kudos}</span>
     <span>Hits: ${hits}</span>
     <span>Bookmarks: ${bookmarks}</span>
   </div>
 </body>
 </html>

[archiveofourown.org]
freeformtags_label:Additional Tags
freefromtags_label:Additional Tags
ao3categories_label:Category
chapterslashtotal_label:Chapters
description_label: Summary


And I added the code tag! (Didn't know about it, sorry)

(Just so flipping happy that I got that pretty looking title page.)

okay, so could I have your help again please? I noticed that sometimes the author's notes in a story can like bleed through, like there's not a clear delineation of when the note ends and the chapter begins. Is there a way I could add a horizontal line break between them?

Here is an example story that has an author's note, I chose something with a general rating https://archiveofourown.org/works/63...ters/161700646

I checked through the default.ini for it and all I found was this
Spoiler:

## AO3 chapters can include several different types of notes. We've
## traditionally included them all in the chapter text, but this allows
## you to customize which you include. Copy this parameter to your
## personal.ini and list the ones you don't want.
#exclude_notes:authorheadnotes,chaptersummary,chap terheadnotes,chapterfootnotes,authorfootnotes,insp iredlinks


and I noticed that in custom output there was a thing for epub chapter, so like it looked like there was a place that a line break could be inserted
Spoiler:
Code:
[epub]
## ${number}, ${index04}("%04d"%${number}), ${chapter}
chapter_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>${chapter}</title>
 <link href="stylesheet.css" type="text/css" charset="UTF-8" rel="stylesheet"/>
 <meta name="chapterurl" content="${url}"></meta>
 <meta name="chapterorigtitle" content="${origchapter}"></meta>
 <meta name="chaptertoctitle" content="${tocchapter}"></meta>
 <meta name="chaptertitle" content="${chapter}"></meta>
 </head>
 <body class="fff_chapter">
 <h3 class="fff_chapter_title">${chapter}</h3>

## ${number}, ${index04}("%04d"%${number}), ${chapter}
chapter_end:
 </body>
 </html>
Attached Thumbnails
Click image for larger version

Name:	i did it.png
Views:	53
Size:	73.0 KB
ID:	213727  
ThreeLizards is offline   Reply With Quote
Old 02-16-2025, 07:55 PM   #10367
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,702
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by ThreeLizards View Post
okay, so could I have your help again please? I noticed that sometimes the author's notes in a story can like bleed through, like there's not a clear delineation of when the note ends and the chapter begins. Is there a way I could add a horizontal line break between them?
Only with CSS.

If you open the resulting epub, there are classes applied to the tags wrapping the various notes. You can tweak appearance by adding CSS to output_css targeting those tags.
JimmXinu is offline   Reply With Quote
Old 02-16-2025, 07:59 PM   #10368
watani
Enthusiast
watani began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Oct 2014
Device: Kindle Fire HD
Quote:
Originally Posted by JimmXinu View Post
I don't recall hearing anything about an image problem. If the page is loaded, in theory the images should be cached. Unless the image site specifies no-cache or limited cache time.

Browser Cache is able to get cover/author images from ffnet...

Example story?
While I was citing Ao3 since I thought that was the reason why people were having issues getting images in their Ao3 fics when downloading from cache, the website I was thinking of was actually Fimfiction.

For example, in this story most chapters have small pictures used as section separators:
https://www.fimfiction.net/story/550...puppy-season-7

These images do not appear to get cached, so they fail to get downloaded when getting the story from cache.

Complicating matters is that embedded external images get their URLs "camouflaged", but it should be possible to extract the original image URL from the actual URL since they seem to follow the same general structure:

Example:
https://camo.fimfiction.net/XyZqEwTY...%2FmzLp1ln.png

where the original image URL is: https://i.ibb.co/8xvNY6K/mzLp1ln.png

Last edited by watani; 02-16-2025 at 08:10 PM.
watani is offline   Reply With Quote
Old 02-16-2025, 11:24 PM   #10369
TaviCalderon
Enthusiast
TaviCalderon began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Dec 2023
Device: Kindle Scribe
Quote:
Originally Posted by JimmXinu View Post
I'd also change the first #multiseries in custom_columns_settings to 'r' mode to clear the pre-existing value on update. Otherwise, since it's a text column, you might end up with duplicates. (Depending on the custom column type. A 'tags' type text column could mask that.)

Code:
custom_columns_settings:
 series00=>#multiseries,r
 series01=>#multiseries,a
 series02=>#multiseries,a
 series03=>#multiseries,a
 series04=>#multiseries,a

this worked like a charm, thank you so much!!! i didn't realize i'd need to specify series00,series01,etc. instead of just using a generic "series" for replace_metadata lines...but in retrospect, duh. i knew it was something simple i just wasn't seeing. it always is, lol. clearing include_in_series also made things stop being wonky--i'm not sure where i even got that line from, but thank you for pointing that out.

noted, about the =~ for exclude_metadata_pre! i did not realize that was the prefered seperator, but i've fixed it for all of the other exclude_metadata_pre lines i have now.
i removed the Recommended Reading Order line from this section anyway, since i think your renaming convention under replace_metadata is a great idea. if i run into another series with a recommended reading order series tag and it does somehow manage to interfere/cause issues in the multiseries column, i'm sure i'll be circling back here anyway for assistance.

as for your final comment about the custom_columns_settings--this multiseries column i made is actually set up as a comma seperated text column, like tags, shown in the tag browser. i haven't seen duplicates like you're describing to date, even after fixing my ini and updating everything; i assume that's because i have it set up as a tags-type column. but do you think i should just keep it as "series00=>#multiseries,r" anyway? since clearing out pre-existing values on update is likely a good move regardless?? if you think so, i'll just keep it as ,r. let me know.

you're the best!! as always, thanks for the help!
TaviCalderon is offline   Reply With Quote
Old 02-16-2025, 11:46 PM   #10370
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,702
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by TaviCalderon View Post
but do you think i should just keep it as "series00=>#multiseries,r" anyway? since clearing out pre-existing values on update is likely a good move regardless?? if you think so, i'll just keep it as ,r. let me know.
A 'tags' like text column will automatically de-dup. I noticed it because I was testing with a non-tags like text column and got duplicates immediately.

Depends on what you want. If using 'a' for all of them, if you manually add a value to the column, it will be preserved. OTOH, if the story changes from "Series [1]" to "Series [2]", you end up with both on update.
JimmXinu is offline   Reply With Quote
Old 02-17-2025, 12:21 AM   #10371
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,702
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by watani View Post
For example, in this story most chapters have small pictures used as section separators:
https://www.fimfiction.net/story/550...puppy-season-7

These images do not appear to get cached, so they fail to get downloaded when getting the story from cache.

Complicating matters is that embedded external images get their URLs "camouflaged", but it should be possible to extract the original image URL from the actual URL since they seem to follow the same general structure:

Example:
https://camo.fimfiction.net/XyZqEwTY...%2FmzLp1ln.png

where the original image URL is: https://i.ibb.co/8xvNY6K/mzLp1ln.png
If you don't set use_browser_cache_only:true, the BC feature will attempt to go to network for anything it doesn't find in cache. OTOH, that implicitly turns off open_pages_in_browser.

The Flaresolverr proxy code has a separate option for directimage, but that's because Flaresolverr doesn't download images at all anymore. And it looks like it's getting 403 blocked on direct images, too. So a direct download with Browser Cache wouldn't work, either.

Our code for images from xenforoforums (SB/SV/QQ/etc) stories can use the <img> tags' data-src or data-url attr.

The story you linked has a similar looking data-source attr. But I need a bigger sample set of stories with images to look at before I can confidently make that change for fimf. Hint-hint.

Also looks like the cover image download is broken--will try to fix.
JimmXinu is offline   Reply With Quote
Old 02-17-2025, 10:33 PM   #10372
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,702
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version Posted

2025-02-17
- adapter_fimfictionnet: Fix cover images and use data-source attr for img src.

watani got me some more story URLs to test with and my changes worked with them.

But only using Flaresolverr proxy with use_flaresolverr_proxy:directimages.

watani originally asked about browser cache--that still doesn't work. I'm not hugely interested in trying to figure out why not if Flaresolverr proxy works.
JimmXinu is offline   Reply With Quote
Old 02-19-2025, 05:42 AM   #10373
Anyssia
Enthusiast
Anyssia has met Morla.Anyssia has met Morla.Anyssia has met Morla.Anyssia has met Morla.Anyssia has met Morla.Anyssia has met Morla.Anyssia has met Morla.Anyssia has met Morla.Anyssia has met Morla.Anyssia has met Morla.Anyssia has met Morla.
 
Anyssia's Avatar
 
Posts: 25
Karma: 19112
Join Date: Aug 2012
Device: Kobo Libra2
Quote:
Originally Posted by JimmXinu View Post
Re: CloudFlare

Originally Posted by Anyssia View Post
It works for chaptered fics, but does anyone knows if there is a way to force Calibre/FFF to make a ToC even for one-shot fanfics, please?



FFF only writes a TOC if there's more than one chapter--that's currently hard coded.

I could add an option to force TOC generation if that's something that's useful to people. I'd need to review what it might do to epub update and anthology generation.

yes, I would like that, if it's possible, thank you
Anyssia is offline   Reply With Quote
Old 02-19-2025, 12:21 PM   #10374
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,702
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version Posted

2025-02-17
- Add include_tocpage:always option.
- adapter_fimfictionnet: Further cover fix

Quote:
Originally Posted by Anyssia View Post
yes, I would like that, if it's possible, thank you
Yes, you already said. I was asking more if anyone else would find it useful.

But it's a fairly small change that doesn't appear to affect anything else, so I went ahead with it.

Code:
## epub carries the TOC in metadata.
## mobi generated from epub by calibre will have a TOC at the end.
include_tocpage: false
## When set to 'true', tocpage is only included if there is more than
## one chapter in the story.  If set to 'always', tocpage will be
## included even if the story only has one chapter.
#include_tocpage: always
Note that:
  1. Anthologies (and EpubMerge) reduces the anthology/merge ToC entry for single FFF chapter stories down to one entry, even if they have cover, title page and/or log page. It will not do that if there's a tocpage. If you've forced it on, I assume you want more ToC entries.
  2. add_chapter_numbers still doesn't add a chapter number when there's only one chapter.
JimmXinu is offline   Reply With Quote
Old 02-20-2025, 09:32 PM   #10375
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,702
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version Posted

2025-02-20
- adapter_literotica: Get more story urls. #1159 Thanks, dbhmw
JimmXinu is offline   Reply With Quote
Old Yesterday, 02:46 PM   #10376
agumon1123
Member
agumon1123 began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jan 2016
Device: none
FFN chapters keep disappearing and reappearing when i use the normal URLs but when i use the old version of URLs without the story title i can always see the chapter. is there any way for Fanficfare to use the URLs without the story title in them as default like it used to? that way i don't have to check every 5 mins to see if the URL works or it stops working in the middle of downloading the story.

with story title:
https://www.fanfiction.net/s/1444077...ctly-Unplanned
https://www.fanfiction.net/s/1138615...We-Are-Revised

without story title:
https://www.fanfiction.net/s/14440772/1/
https://www.fanfiction.net/s/11386159/31/

Last edited by agumon1123; Yesterday at 02:50 PM.
agumon1123 is offline   Reply With Quote
Old Yesterday, 04:19 PM   #10377
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,702
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by agumon1123 View Post
FFN chapters keep disappearing and reappearing when i use the normal URLs but when i use the old version of URLs without the story title i can always see the chapter. is there any way for Fanficfare to use the URLs without the story title in them as default like it used to? that way i don't have to check every 5 mins to see if the URL works or it stops working in the middle of downloading the story.
Maybe?

FFF keeps the story title in the chapter URLs because that's how they're linked on the pages. The intention is for users to be able to pre-cache the chapter pages by just clicking through the chapters.

If we strip off the story title off chapter URLs, you become reliant on open_pages_in_browser--or manually removing the story title in browser.

And, as you say, it's random. /s/11386159/31/All-We-Are-Revised started working again as I was looking at this.

Is it possible that non-titled URLs can also fail and you just didn't bump into any?
JimmXinu is offline   Reply With Quote
Reply

Tags
fanfiction


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Open With kiwidude Plugins 404 Yesterday 06:42 AM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 506 02-14-2025 10:52 PM
[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 03:54 AM.


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