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 07-05-2020, 05:23 PM   #4276
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,986
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2020-07-05
- Fix for recursion in add_genre_when_multi_category caching bad value.

Quote:
Originally Posted by ownedbycats View Post
Hm, I can't seem to get that code working, same fic I tested before. Are there any mistakes I did when putting it in?
Probably needs the fix I forgot to upload first.
JimmXinu is offline   Reply With Quote
Old 07-05-2020, 06:48 PM   #4277
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: 11,023
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Hm, I'm still having trouble getting it to work. Does it matter that I'm testing by updating from saved metadata instead of the website?

Last edited by ownedbycats; 07-05-2020 at 07:15 PM.
ownedbycats is offline   Reply With Quote
Old 07-05-2020, 08:22 PM   #4278
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,986
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2020-07-05
- Fix for recursion in add_genre_when_multi_category caching bad value.
- Add add_category_when_multi_category option.

I give up. Tear out all the crosscat nonsense. Use new setting:
Code:
## Add this category if there's more than one category(before this is added).
## Applied *after* category replace_metadata/include/exclude_metadata
add_category_when_multi_category: Crossover
JimmXinu is offline   Reply With Quote
Old 07-05-2020, 09:33 PM   #4279
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: 11,023
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
It's working now! Thank you. Sorry for all the problems with this thing.

Now that it's working I'm trying to figure out the include/exclude metadata thing.

I managed to get it to remove other tagcategories if it detects crossovers and that's working but now I'm stuck on this.

Here's the replace_metadatas used (I took out all the non-relevant ones):

Code:
replace_metadata: 
 site=>www.fanfiction.net=>FanFiction.net
 site=>archiveofourown.org=>Archive of Our Own
 category=>(\(Video Game\)|\([0-9]+\))=>
 tagscategory=>^(?!.*(Half-Life|Portal|Mass Effect|Crossover)).*$=>Other
 tagscategory=>^(.*)$=>Fanfiction.\1
 tagscategory=>(Portal|Half-Life)=>Half-Life & Portal

include_metadata_post:
 tagscategory==Crossover&&category==Crossover

exclude_metadata_post:
 category==Crossover&&category_LIST==Half-Life, Portal
I have this fic, and I'm trying to get it to result in:
Categories: Half-Life, Portal
Tags: Fanfiction.Half-Life & Portal

But instead it results in this:
Categories: Crossover, Half-Life, Portal
Tags: none

Furthermore, this also resulted in no tag whatsoever on other crossover fics that has either Half-Life or Portal in its category, e.g. this one. Crossovers that contain neither of them still work as expected.

Changing either/both of the _post to _pre results in the Fanfiction.Crossover tag appearing in both test fics.

Changing the exclude (post) to tagscategory results in missing tags on both fics.

I noticed in the crossover thing it said this:
## Applied *after* category replace_metadata/include/exclude_metadata

So I wonder if that might be why it doesn't work.

Any suggestions?

EDIT: As well, I just noticed that a fanfic from AO3 categorized as both "Mass Effect - All Media Types" and "Mass Effect Trilogy" got the Crossover category, even though I have a replace_metadata to transform it into a singular category.

Code:
 category=>(^(?=.*Mass.Effect)(?!.*Mass Effect Trilogy).*|Mass Effect - All Media Types)=>Mass Effect Trilogy
(yes it's pretty kludgey-looking but it keeps me from getting "Mass Effect Trilogy Trilogy" as a category)

Confusing because the comment about replace_metadata indicates that this shouldn't happen.

Last edited by ownedbycats; 07-06-2020 at 02:02 AM.
ownedbycats is offline   Reply With Quote
Old 07-06-2020, 07:16 AM   #4280
Vindemiatrix
Junior Member
Vindemiatrix began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2019
Device: iPhone, Kindle Fire
Quote:
Originally Posted by duska3419 View Post
Hi, I'm new to all this, and not very savvy, so I apologize if this is a stupid question. I've read the wiki/faq but there's a couple things I want to ask that I didn't see answers to in there.

1. Is there a basic user set up guide somewhere? I've tried searching this thread as well.

2. Is it possible to use FFF to download my entire bookmarks + history off AO3, and if so, how do I do that/is there a guide/instructions somewhere? I *think* I've managed the personal dot ini set up by putting my ao3 info under overrides (and the adult thing) but that is as far as I can figure out I'm afraid.

3. I have a gmail that I use primarily (though not solely) for story updates from AO3, I would love to use this feature, but I haven't got a half a clue what an IMAP server is. The FAQ mentions gmail specifically, but I'm afraid of breaking something. Do I just put google dot com as the IMAP server and then my log in details for that account? Will it be a problem that I've got some order confirmations in that inbox?
Extremely belatedly: I haven't updated it in a few months, and it glosses past some features I don't use, but I wrote this guide to setting up Calibre with FanFicFare a while back (and it never occurred to me to link it here): https://jadislefeu.dreamwidth.org/7810.html
Vindemiatrix is offline   Reply With Quote
Old 07-06-2020, 07:37 AM   #4281
Vindemiatrix
Junior Member
Vindemiatrix began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2019
Device: iPhone, Kindle Fire
I'm looking through the personal.ini defaults and the wiki on github, and I can't find anything--is there a way to add something to one (already extant) metadata category based on a value in another metadata category? I'm not seeing any examples in the add_to_replace_metadata documentation that indicate that it's possible, much less how, but I'd really like to. (Specifically what I want to do is add a specific tag to all works by a given set of authors.)

If there's not, I guess I can do it with a custom column instead, probably...
Vindemiatrix is offline   Reply With Quote
Old 07-06-2020, 11:00 AM   #4282
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,986
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2020-07-06
- New site: chireads.com -- Thanks, Kolbo!
JimmXinu is offline   Reply With Quote
Old 07-06-2020, 12:32 PM   #4283
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,986
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Vindemiatrix View Post
I'm looking through the personal.ini defaults and the wiki on github, and I can't find anything--is there a way to add something to one (already extant) metadata category based on a value in another metadata category? I'm not seeing any examples in the add_to_replace_metadata documentation that indicate that it's possible, much less how, but I'd really like to. (Specifically what I want to do is add a specific tag to all works by a given set of authors.)

If there's not, I guess I can do it with a custom column instead, probably...
Here's a basic example of one way:

Code:
add_to_replace_metadata:
 genre=>(.*)=>\1\,A Special Genre Value&&author==Author Name
Note this only works if there is at least one genre value. Depending on site, that may or may not matter. There are other ways without that limitation, but they are more complex.

The conditional (author) can be changed to a regexp to match more than one author value. Use author_LIST if you mean stories with the same set of multiple authors.
JimmXinu is offline   Reply With Quote
Old 07-06-2020, 05:09 PM   #4284
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: 11,023
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Hi,

I was doing some more testing of that crossover thing. (Kind of reminds me a bit of this xkcd comic.).

I'm a bit confused on when exactly the add_category_when_multi_category is supposed to apply. The comment says it applies after all the replaces/include/exclude that affect categories, but in that case I'm not sure why it still applies when the regex results in just one category.

As well, the exclude_metadata thing I was trying to do seems to not work because of the crossover adding itself again after crossover category was excluded. Either that, or it not properly detecting the category_list.

Is there any debug thing I can run to see how exactly the metadata is processing?

EDIT: I ran Calibre in debug mode to see what would happen. The log said something something about infinite recursion so I think I might've set the exclude metadata wrong. I've attached the log.
Attached Files
File Type: txt tmphz8b2q.txt (7.7 KB, 151 views)

Last edited by ownedbycats; 07-06-2020 at 05:51 PM.
ownedbycats is offline   Reply With Quote
Old 07-06-2020, 05:55 PM   #4285
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,986
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2020-07-06
- New site: chireads.com -- Thanks, Kolbo!
- Move add_category_when_multi_category after dedup'ing so consolidated category values don't count.

Quote:
Originally Posted by ownedbycats View Post
I'm a bit confused on when exactly the add_category_when_multi_category is supposed to apply. The comment says it applies after all the replaces/include/exclude that affect categories, but in that case I'm not sure why it still applies when the regex results in just one category.
This was a legitimate problem. I've moved add_category_when_multi_category after dedup'ing now.

Quote:
Originally Posted by ownedbycats View Post
As well, the exclude_metadata thing I was trying to do seems to not work because of the crossover adding itself again after crossover category was excluded. Either that, or it not properly detecting the category_list.
Functioning as intended. add_category_when_multi_category is applied after replace/include/exclude, so naturally you can't use exclude on category to filter out what was added.

You now, after all of this, want to remove Crossover from some combinations of multiple categories? Whatever.

You might experiment with a) operating on category_LIST to replace those specific multiple category combos with one string; or b) creating a new metadata entry that includes category--probably more than one with .NOREPL versions to separate far enough to not be recursive--and use that instead of category.

Regardless, it's a bridge too far for me; I'm done helping with that.

Quote:
Originally Posted by ownedbycats View Post
Is there any debug thing I can run to see how exactly the metadata is processing?
No. I add debug output when I want it and 99.9% of the time it's so overfull from all the recursive metadata processing that even I can't follow it.

Quote:
Originally Posted by ownedbycats View Post
ANOTHER EDIT: I ran it again on my first test fic. The log gave me something about infinite recursion. I've attached the log.
Code:
... Skipping exclude_metadata_pre key(category) value(Half-Life) line(category==Crossover&&category_LIST==Half-Life, Portal) to prevent infinite recursion.
... Skipping exclude_metadata_pre key(category) value(Portal (Video Game)) line(category==Crossover&&category_LIST==Half-Life, Portal) to prevent infinite recursion.
Functioning as intended. A category affecting line can't have a conditional that uses category or any other value derived from category (excepting category.NOREPL) because it would cause an infinite recursion and error out the entire download.
JimmXinu is offline   Reply With Quote
Old 07-06-2020, 06:03 PM   #4286
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: 11,023
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Ok that's understandable. I'll just manually fix those ones when they come up.

Also: Would it be possible to disable the Count Pages plugin only for metadata updates? Since the ePub itself isn't being changed it seems a little redundant.
ownedbycats is offline   Reply With Quote
Old 07-06-2020, 06:24 PM   #4287
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,986
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
Also: Would it be possible to disable the Count Pages plugin only for metadata updates? Since the ePub itself isn't being changed it seems a little redundant.
Generated Cover injected into epub calls that assumption into question.

Also calls into question not auto-converting for the same reason. Or allowing cover generation during metadata-only update? Or only epub injecting cover?

Not a can of worms I'm going to open right now. No more non-bug-fix changes until after the next release.
JimmXinu is offline   Reply With Quote
Old 07-06-2020, 06:30 PM   #4288
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: 11,023
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Ok I didn't think of that.
ownedbycats is offline   Reply With Quote
Old 07-07-2020, 06:20 AM   #4289
vcovas
Junior Member
vcovas began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2020
Location: Lisbon, Portugal
Device: Kobo Libra H2O
Hi!

i'm using "update EPUB if new chapters" and then uploading the fic to my KOBO Libra. The issue is that the chapter index of the stories remains unchanged, for example despite the story already having 10 ch (and you can read it running through the pages) on the index it goes only until ch 8. What I'm doing wrong?

thank you for your help!
vcovas is offline   Reply With Quote
Old 07-07-2020, 10:20 AM   #4290
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,986
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by vcovas View Post
i'm using "update EPUB if new chapters" and then uploading the fic to my KOBO Libra. The issue is that the chapter index of the stories remains unchanged, for example despite the story already having 10 ch (and you can read it running through the pages) on the index it goes only until ch 8. What I'm doing wrong?
If you attach your KOBO to your computer and look at the file (from your computer), does it show all 10 chapters?

It's been a few years now, but I bought a KOBO once and returned it because it was designed to assume that once loaded an ebook would not later change thus ignoring updates, causing the same kind of problem you're seeing.
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 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 12:54 AM.


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