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 12-13-2025, 10:49 AM   #11521
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,183
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Amalthia View Post
This is my logpage code: listed under the [epub] section of my persional.ini.

Code:
include_logpage: smart
logpage_entries: numChapters,numWords
logpage_at_end: true
Originally, words_added could only appear in logpage. So the code only calculates it if words_added is also in logpage_entries.
Code:
        ## words_added is only used in logpage because it's the only
        ## place we know the previous version's word count.
        if 'words_added' in (self.getConfigList("logpage_entries") + self.getConfigList("extra_logpage_entries")):
            new_words = self.story.getMetadata('numWords')
            old_words = oldvalues.get('numWords',None)
            if new_words and old_words:
                self.story.setMetadata('words_added',commaGroups(unicode(int(new_words.replace(',',''))-int(old_words.replace(',','')))))
I can't immediately see any reason not to remove that check, but I want to think about it a minute. I never considered that someone might want it without putting it in logpage...
JimmXinu is online now   Reply With Quote
Old 12-14-2025, 02:58 AM   #11522
Amalthia
Wizard
Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.
 
Amalthia's Avatar
 
Posts: 1,204
Karma: 1000000
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by JimmXinu View Post
Originally, words_added could only appear in logpage. So the code only calculates it if words_added is also in logpage_entries.
Code:
        ## words_added is only used in logpage because it's the only
        ## place we know the previous version's word count.
        if 'words_added' in (self.getConfigList("logpage_entries") + self.getConfigList("extra_logpage_entries")):
            new_words = self.story.getMetadata('numWords')
            old_words = oldvalues.get('numWords',None)
            if new_words and old_words:
                self.story.setMetadata('words_added',commaGroups(unicode(int(new_words.replace(',',''))-int(old_words.replace(',','')))))
I can't immediately see any reason not to remove that check, but I want to think about it a minute. I never considered that someone might want it without putting it in logpage...
Based off what you said, it looks like I need to change my logpage entries from:

Code:
logpage_entries: numChapters,numWords
to this:
Code:
logpage_entries: numChapters,numWords,words_added
I did review the logpage_entries settings in the "View Defaults (plugin-defaults.ini)"

However the only entries listed are these ones:
Code:
logpage_entries: dateCreated,datePublished,dateUpdated,numChapters,numWords,status,series,title,author,description,category,genre,rating,warnings
I didn't realize you could use "words_added" even if it wasn't listed as a logpage_entry.

Thanks,
Amalthia


I was never opposed to adding words_added to the logpage entries.
Amalthia is offline   Reply With Quote
Old 12-14-2025, 06:35 PM   #11523
Amalthia
Wizard
Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.
 
Amalthia's Avatar
 
Posts: 1,204
Karma: 1000000
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Hi,

Just an update, after adding "words_added" to the logpage_entries, the word count is now showing up in my custom column.

That was the last missing piece to making this work.

Thanks again for all your help and patience in answering my questions.

Amalthia
Amalthia is offline   Reply With Quote
Old Today, 07:24 AM   #11524
CaptainSully
Junior Member
CaptainSully began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2025
Device: Kobo Aura One
Question...
Getting a slightly annoying issue with a story where this:

"This world was merely modeled<em> </em>after the game she knew, not identical to it."

ends up removing that em tag completely when downloaded through FFF, so the words don't have a space between them.

Is there a way to prevent this?
CaptainSully is offline   Reply With Quote
Old Today, 11:27 AM   #11525
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,183
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by CaptainSully View Post
Question...
Getting a slightly annoying issue with a story where this:

"This world was merely modeled<em> </em>after the game she knew, not identical to it."

ends up removing that em tag completely when downloaded through FFF, so the words don't have a space between them.

Is there a way to prevent this?
For that story, you can do:
Code:
add_to_keep_empty_tags:,em
From defaults.ini:
Code:
## By default, empty tags are removed as part of cleaning up the
## source HTML.  However, a few tags should be kept even if empty.
## (Whitespace only, including &nbsp; is considered empty.)  This
## setting can adjust which tags are kept.
keep_empty_tags:p,td,th
JimmXinu is online now   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 01:46 PM.


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