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 Yesterday, 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:	28
Size:	73.0 KB
ID:	213727  
ThreeLizards is offline   Reply With Quote
Old Yesterday, 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,698
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 Yesterday, 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; Yesterday at 08:10 PM.
watani is online now   Reply With Quote
Old Yesterday, 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 Yesterday, 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,698
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 Today, 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,698
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
Reply

Tags
fanfiction


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 506 02-14-2025 10:52 PM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 09:39 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 07:35 PM.


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