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-04-2021, 06:09 PM   #5371
FiendfyreSnake
Member
FiendfyreSnake began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Feb 2021
Location: West Coast Canada
Device: None
Can you send the output of an "add_to_extra_valid_entries" item to a non-custom, not-tags column? For example send something arbitrary to the publishers column?
FiendfyreSnake is offline   Reply With Quote
Old 02-04-2021, 07:18 PM   #5372
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,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by FiendfyreSnake View Post
2. I'm trying to automatically sort genres out of the multitude of random tags from ao3 and am unsure what to do.
Probably the best answer: Don't even bother trying to wrangle AO3 freeform tags. Stare into the abyss too long, it stares back at you.

More seriously: Brain fog's rendering me a bit useless at the moment so I'm afraid I can't even figure out what you're trying to do, but perhaps take a look at include/exclude metatata and see if that works better than what you're trying to do now.

AO3 "genres" by default use a combination of freeformtags & ao3categories though I not sure what the latter actually is.

Last edited by ownedbycats; 02-04-2021 at 07:21 PM.
ownedbycats is offline   Reply With Quote
Old 02-04-2021, 07:44 PM   #5373
FiendfyreSnake
Member
FiendfyreSnake began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Feb 2021
Location: West Coast Canada
Device: None
I'll need to play around with it but that link looks like it's what I want. Thank you.
FiendfyreSnake is offline   Reply With Quote
Old 02-04-2021, 07:47 PM   #5374
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 FiendfyreSnake View Post
Can you send the output of an "add_to_extra_valid_entries" item to a non-custom, not-tags column? For example send something arbitrary to the publishers column?
Standard Calibre columns are not nearly as configurable. The assumption is that if you want something custom, you'll use custom columns--you can always hide the standard columns.

In the case of publisher specifically, you can change the value of the publisher metadata entry before it hides Calibre, but you can't assign a different entry to it.
JimmXinu is offline   Reply With Quote
Old 02-04-2021, 07:53 PM   #5375
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,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JimmXinu View Post
Standard Calibre columns are not nearly as configurable. The assumption is that if you want something custom, you'll use custom columns--you can always hide the standard columns.
If you use the same library for fanfics and non-fanfics, I will highly recommend View Manager, which lets you swap column sets.

Quote:
Originally Posted by JimmXinu View Post
In the case of publisher specifically, you can change the value of the publisher metadata entry before it hides Calibre, but you can't assign a different entry to it.
theoretically, could you do a replace_metadata that matches any pattern to put in an arbitrary value? I honestly can't see a purpose to this though.
ownedbycats is offline   Reply With Quote
Old 02-04-2021, 08:42 PM   #5376
FiendfyreSnake
Member
FiendfyreSnake began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Feb 2021
Location: West Coast Canada
Device: None
It was nothing important, I was just curious if it was possible I just wanted to see if it was possible because that would mean I could automatically alter the publisher in Calibre without altering it on the title page of the fic. Really it's extremely minor and not important. With the earlier help using add_to_extra_valid-entries for characters I know either have fanficfare setup of probably know how to set it up to do everything I can think of (for now at least).
FiendfyreSnake is offline   Reply With Quote
Old 02-04-2021, 10:18 PM   #5377
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,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Is page cache supposed to run when using update metadata from column?

Newest test version. I thought I was imagining things so actually loaded up a file monitor and it show calibre.exe reading the cache files. I made sure all the fics already had valid metadata columns. Also it only happens when there's at least one ffnet fanfic in the update batch.

I suspect its just reading the cache regardless of update mode. If I'm guessing right, it may make more sense to have it read the cache only when it needs to fallback to site metadata (or just disable it entirely for that mode, but that's less ideal).

While not critical by any means, I will admit the lag is very annoying when tinkering with metadata. I just turned it off for now.


Last edited by ownedbycats; 02-05-2021 at 04:01 AM.
ownedbycats is offline   Reply With Quote
Old 02-05-2021, 04:14 AM   #5378
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,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Another question: when using category_LIST regex, should I presume that the categories are sorted?

Last edited by ownedbycats; 02-05-2021 at 04:48 AM.
ownedbycats is offline   Reply With Quote
Old 02-05-2021, 09:51 AM   #5379
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
Is page cache supposed to run when using update metadata from column?
Hmm.

The issue is that when 'update meta from column' is called, it can fall back to 'update meta from web site' (if meta column is empty) or even 'Add New' (if called with URLs and if there's no existing matching book).

I have some ideas, but I'll to do some testing. I agree it should be addressed.

Quote:
Originally Posted by ownedbycats View Post
Another question: when using category_LIST regex, should I presume that the categories are sorted?
Yes. Unless you have set keep_in_order_category:true.
JimmXinu is offline   Reply With Quote
Old 02-05-2021, 01:45 PM   #5380
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,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Yeah. My idea would be to try to make it use the column metadata first, and then use the page cache if it needs to fallback. Not sure how difficult that would be to implement though.

Last edited by ownedbycats; 02-05-2021 at 01:48 PM.
ownedbycats is offline   Reply With Quote
Old 02-05-2021, 02:15 PM   #5381
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
New Test Version Posted

2021-02-05
- Load browser cache only on demand -- for Update Meta from Column.
- Only use one BG process instead of one per download--save 1-2 seconds per download.
JimmXinu is offline   Reply With Quote
Old 02-05-2021, 02:21 PM   #5382
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,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Much faster. Thank you
ownedbycats is offline   Reply With Quote
Old 02-05-2021, 02:51 PM   #5383
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,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I think I figured out the crossover issue. here's the fic I used if you want to tinker.

You'll need add_category_when_multi_category: Crossover for this to work.

Code:
## Clumsy solution to the crossover situation in hierarchical character lists - create crossover-specific matches for specific characters first
## Thankfully you only need to do this for characters in crossovers.
## Also, make sure your categories/characters are standardized or the regex may break
 characterlist=>^(Courier|Craig Boone|ED-E|Male Courier|Ulysses)=>Fallout.\1&&category==Crossover
 characterlist=>^(David Anderson|EDI|Female Shepard|Garrus Vakarian)=>Mass Effect.\1&&category==Crossover

## Then add a negative lookaround in category_LIST for "Crossover"
## It's sorted so keep that in mind whether to use a negative lookahead/behind.
## Only need to add a lookaround if the category has crossovers.
 characterlist=>^(.*)$=>Fallout.\1&&category_LIST=~(?<!Crossover).*Fallout
 characterlist=>^(.*)$=>Mass Effect.\1&&category_LIST=~(?<!Crossover).*(Mass Effect: Andromeda|Mass Effect Trilogy)
Unfortunately...it breaks non-crossovers (no prefixes). Not sure what I'm doing wrong here.

EDIT: I had category_list instead of category_LIST. It's case-sensitive. I fixed it and now it works.

Last edited by ownedbycats; 02-05-2021 at 03:29 PM.
ownedbycats is offline   Reply With Quote
Old 02-05-2021, 03:36 PM   #5384
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,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
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.

Last edited by ownedbycats; 02-05-2021 at 05:26 PM.
ownedbycats is offline   Reply With Quote
Old 02-05-2021, 04:23 PM   #5385
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,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
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
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 08:33 AM.


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