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-05-2021, 06:32 PM   #5386
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,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
A new question:

At what point exactly does add_category_when_multi_category run?

(I tried to search the thread but it doesn't work.)

Code:
## Add this category if there's more than one category(before this is added).
## Applied *after* category replace_metadata/include/exclude_metadata
I'm not sure whether that also includes the exclude_metadata_post, or whether to take Crossover into account when adding conditionals to other entries.

I have a few categories that I want to treat as not-crossovers but keep as separate entries (e.g. Half-Life and Portal are different games, but share the same universe) so thought that a conditional exclude_metadata_post could strip Crossover from those.

I think I brought up the idea of an ini setting to set certain categories as not-crossovers, but you said no.
Exactly? Here:
https://github.com/JimmXinu/FanFicFa...story.py#L1044
(There appears to be a typo in the comment that refers to genre instead of category.)

It occurs after replace/include/exclude, just like it says. When I say 'replace/include/exclude' I mean replace_metadata and all in/exclude_metadata_pre/post variants.

To the best of my understanding (without testing specific cases) it is part of category when called in conditionals and Crossover (or whatever) will appear.

A exclude_metadata_post can't use category as both the entry to operate on and the conditional key.

I suspect something like:
Code:
replace_metadata:
 category_LIST=>^Crossover, (Half-Life, Portal)$=>\1
...is more appropriate.

I do not believe setting certain category values as "not-crossovers" is as simple as you think it is. You would have to define each set of category values anyway--doing it in regular expression is basically the same thing.

Quote:
Originally Posted by ownedbycats View Post
also, a very minor low-priority QoL thing:

Would it be possible for the syntax highlighter to detect a use of regex after a == and then highlight it as a mistake? I keep using it instead of =~ and breaking things
Basically, no. Where do you draw the line on what is a regexp? Anything with a '.*' in it? What about just '.'? Or '?' Or parens '()' anywhere in it?


And answering this has just taken ~25 minutes out of looking at your email dragging problem. So, trade-offs.
JimmXinu is online now   Reply With Quote
Old 02-05-2021, 07:17 PM   #5387
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,994
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Thank you.

I couldnt remember the reason for saying no on the not-crossover (yeah I agree, clumsy phrasing) thing, either time constraints or a more technical thing.

Also, I guess someone could write a regex to detect a regex, but that's a bit silly.

I'll experiment a bit with the category_LIST replaces. Knowing it's sorted makes it easier to match as an exact string instead of messing with lookarounds.

Last edited by ownedbycats; 02-05-2021 at 07:20 PM.
ownedbycats is offline   Reply With Quote
Advert
Old 02-05-2021, 07:25 PM   #5388
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,994
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
also, may I have permission to add a link to https://regex101.com to the ReplaceMetadata wiki page? I found it useful in testing why regexes aren't matching correctly and thought other users may find it helpful.
ownedbycats is offline   Reply With Quote
Old 02-05-2021, 08:40 PM   #5389
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,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
also, may I have permission to add a link to https://regex101.com to the ReplaceMetadata wiki page? I found it useful in testing why regexes aren't matching correctly and thought other users may find it helpful.
Sure. I would note that FFF uses Python's regexp. The basics are generally the same, but there are some differences between languages in the subtler constructs.
JimmXinu is online now   Reply With Quote
Old 02-05-2021, 08:57 PM   #5390
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,994
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Here's what I added. Feel free to change any wording that's unclear:

Quote:
Using a regex tester such as regex101 can also help with figuring out how to match specific patterns. Note that FanFicFare uses Python as its regexp engine -- while the basics are generally the same, other languages have some subtle differences that may affect things.
ownedbycats is offline   Reply With Quote
Advert
Old 02-06-2021, 01:46 AM   #5391
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,994
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Also, several months ago I mentioned that "update metadata from column" somehow managing to modify the timestamp of bunch of my ePubs.

It happened again, but this time I figured out what happened: content.opf inside the ePub updated with a bunch of my custom columns.

Last edited by ownedbycats; 02-06-2021 at 01:49 AM.
ownedbycats is offline   Reply With Quote
Old 02-06-2021, 10:00 AM   #5392
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,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
The content.opf file inside the library book's directory gets updated, but the epub shouldn't.

Were you looking inside the epub with Calibre's Edit book? Because that has an option for 'Update the metadata embedded in the ebook when opening' that you may have turned on.

Searching around, I've found one option in FFF that does update the epub on 'update meta from column':

Under Cover, if you have the 'Inject/Update the cover inside EPUB' option turned on, it will do exactly that, which does update the epub.
JimmXinu is online now   Reply With Quote
Old 02-06-2021, 11:45 AM   #5393
Ser4nb2LUY6e
Connoisseur
Ser4nb2LUY6e began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Jun 2017
Device: Moon+ Reader Pro on Android
With the changes of how downloading works in the latest testversion (I can now see job messages live as chapters are being downloaded), it should now be possible to make the progress bar in the jobs window work based on chapters instead of of books, right?
Ser4nb2LUY6e is offline   Reply With Quote
Old 02-06-2021, 11:55 AM   #5394
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,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Ser4nb2LUY6e View Post
With the changes of how downloading works in the latest testversion (I can now see job messages live as chapters are being downloaded), it should now be possible to make the progress bar in the jobs window work based on chapters instead of of books, right?
It's on my list to think about.

However, other things on the list would also impact that. Namely, going back to multiple BG processes, but one per site so downloads for different sites could be in parallel or doing the same but with threading.
JimmXinu is online now   Reply With Quote
Old 02-06-2021, 11:59 AM   #5395
Ser4nb2LUY6e
Connoisseur
Ser4nb2LUY6e began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Jun 2017
Device: Moon+ Reader Pro on Android
Quote:
Originally Posted by JimmXinu View Post
However, other things on the list would also impact that. Namely, going back to multiple BG processes, but one per site so downloads for different sites could be in parallel or doing the same but with threading.
Could you create individual jobs per site (not per story)?
That way they can run in parallel (limited and controlled by calibre) without any further work on your part.
Ser4nb2LUY6e is offline   Reply With Quote
Old 02-06-2021, 12:51 PM   #5396
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,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
I did consider that, but they you would get as many 'Update your library?' dialogs as there were sites.

And a user can do that right now manually if they want.
JimmXinu is online now   Reply With Quote
Old 02-06-2021, 01:40 PM   #5397
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,994
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JimmXinu View Post
The content.opf file inside the library book's directory gets updated, but the epub shouldn't.

Were you looking inside the epub with Calibre's Edit book? Because that has an option for 'Update the metadata embedded in the ebook when opening' that you may have turned on.

Searching around, I've found one option in FFF that does update the epub on 'update meta from column':

Under Cover, if you have the 'Inject/Update the cover inside EPUB' option turned on, it will do exactly that, which does update the epub.
It's possible the Edit ePub did affect things. I didnt realize that.

I don't have "Update Cover" checked in the update settings. Would it still inject?

Last edited by ownedbycats; 02-06-2021 at 01:52 PM.
ownedbycats is offline   Reply With Quote
Old 02-06-2021, 03:22 PM   #5398
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,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
I don't have "Update Cover" checked in the update settings. Would it still inject?
"[I]f you have the 'Inject/Update the cover inside EPUB' option turned on, it will do exactly that, which does update the epub."

Yes, it appears that option overrides the 'Update EPUB Cover' option that appears in the Update List/Story URLs dialogs.

'Update EPUB Cover' is one of the oldest options in FFF and is implemented as basically injecting never_make_cover:true under [overrides] in the ini config during the BG job, and doesn't directly effect else.

So it doesn't surprise me that newer options under Calibre Cover tab take precedence.

Whether it should is more debatable. But I feel confident in predicting that if the cover wasn't updated in the epub with the inject option checked, somebody would be unhappy about that, too.
JimmXinu is online now   Reply With Quote
Old 02-06-2021, 03:42 PM   #5399
Tharos
Connoisseur
Tharos began at the beginning.
 
Posts: 67
Karma: 10
Join Date: Jul 2010
Device: Pocketbook InkPad Color 3, Kindle Oasis 2, Moon+ Reader pro
Thumbs up

Thanks for the quick help. I will try to implement them.

Quote:
Originally Posted by JimmXinu View Post
Requests for assistance are almost always easier to help with when example story URLs showing the problem are given.
The stories are not PG. I assumed that these should not be posted.
Tharos is offline   Reply With Quote
Old 02-06-2021, 03:58 PM   #5400
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,994
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
If PMs are enabled for you, you can send them to Jim that way.
ownedbycats 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 523 07-15-2025 06:45 PM
[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 06:48 PM.


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