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 01-18-2021, 03:15 PM   #5221
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,998
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Here's a screenshot of the location.
Attached Thumbnails
Click image for larger version

Name:	2021-01-18 16_12_44-Customize FanFicFare.png
Views:	290
Size:	51.6 KB
ID:	184817  
ownedbycats is online now   Reply With Quote
Old 01-18-2021, 05:01 PM   #5222
Ascello
Enthusiast
Ascello began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite 4
Quote:
Originally Posted by ownedbycats View Post
Here's a screenshot of the location.
That's what I tried to use, but for some reason returned me a similarly random list of characters instead of error msg. Although I only tested it with one link, so I need to check it out further, to fully understand what I did wrong. What should the error output look like?

Second thing:
Quote:
Originally Posted by JimmXinu View Post
Yes, \, (slash-comma) indicates to replace with separate items.
Code:
## You can 'split' one list item into multiple list entries by using
## \, in the replacement string.
##
## Examples:
replace_metadata:
 category=>Bitextual=>M/M\,F/M
Right, so I tried this and I struggle. So, I got some random fics with single category and then wrote this:
Code:
replace_metadata:
 category=>^.*$=>xx
 category=>^xx$=>yy\,zz
I wanted all the fics to end up with two categories: yy and zz. But I only ended up with single xx. What did I do wrong? Here are the fics I tested it with: 1, 2, 3, 4. Again, that is ALL the code I have in personal.ini, so nothing is interacting.
Ascello is offline   Reply With Quote
Advert
Old 01-18-2021, 09:00 PM   #5223
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,980
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Ascello View Post
That's what I tried to use, but for some reason returned me a similarly random list of characters instead of error msg. Although I only tested it with one link, so I need to check it out further, to fully understand what I did wrong. What should the error output look like?


Characters like ABcd or Harry, Ron, Hermione? One sounds like you are assigning Characters to it, the other sounds like you broke something.

Error output is the same as the messages in the View Log when an update/download finishes.

Quote:
Originally Posted by Ascello View Post
Right, so I tried this and I struggle. So, I got some random fics with single category and then wrote this:
Code:
replace_metadata:
 category=>^.*$=>xx
 category=>^xx$=>yy\,zz
I wanted all the fics to end up with two categories: yy and zz. But I only ended up with single xx. What did I do wrong? Here are the fics I tested it with: 1, 2, 3, 4. Again, that is ALL the code I have in personal.ini, so nothing is interacting.
I had to go look at this for a bit too before I understood what's going on.

When you do a \, split, FFF runs each resulting entry back through the replace_metadata again, so when yy & zz hit the first line, they get changed back into xx. But then the infinite recursion check on the second line bails out, leaving xx, xx which dedups to xx.

This is deliberate so that if you have something like:
Code:
replace_metadata:
 freeformtags=>^(.*)/(.*)$=>\1\,\2
 freeformtags=>Bob=>Robert
 freeformtags=>Bill=>William
When fed "Bob/Bill" you get "Robert, William".

I've added a note about that to the wiki page:
https://github.com/JimmXinu/FanFicFa...eplaceMetadata
JimmXinu is online now   Reply With Quote
Old 01-18-2021, 10:40 PM   #5224
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,998
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
A question: when dragging and dropping an AO3 "[author] posted chapter X of [fic]" email into Download from URLs, the story link appears twice. Is this expected?
ownedbycats is online now   Reply With Quote
Old 01-18-2021, 11:13 PM   #5225
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,980
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
When the email contains both HTML and text MIME types, which is typical.

Drag and drop is less stringent about de-duping than fetch from imap. Try a SpaceBattles email--that will give you four.
JimmXinu is online now   Reply With Quote
Advert
Old 01-19-2021, 03:20 AM   #5226
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,998
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Makes sense. I've been subscribing to all my stories for the notifications but realized that drag-and-drop is less fuss than a separate email.
ownedbycats is online now   Reply With Quote
Old 01-19-2021, 06:11 AM   #5227
CuddlyMakani
Member
CuddlyMakani began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2020
Device: Android Phone
Quote:
Originally Posted by CuddlyMakani View Post
Hi! I've been using FFF for more than half a year now, and I'm so happy I found it! Except for some difficulties in the beginning, I've never had any problems since then.

But I started having some problems with the "replace_metadata".

I've been using it to automatically change AO3 categories to others.

In my .ini, it looks like this:
category=>Marvel=>Marvel Cinematic Universe
or
category=>Marvel \(Marvel Movies\)=>Marvel Cinematic Universe

Around 1 week ago, the lines stopped working, but seemingly only the ones with brackets. (not 100% sure about though)

Alright, I've been testing some things with my "replace_metadata" Problem:

It doesn't lie with the brackets, but with something else.
An example fic that I used was:
https://archiveofourown.org/works/21428569

It has the fandoms "Marvel Cinematic Universe", "Iron Man (Movies)", "The Avengers (Marvel Movies)".

My .ini has already lines to replace the last two with the first:
replace_metadata:
(space)category=>Iron Man \(Movies\)=>Marvel Cinematic Universe
(space)category=>The Avengers \(Marvel Movies\)=>Marvel Cinematic Universe

The first line works without a problem.

But the thing that I don't understand is: The second one replaces the fandom with "Marvel Cinematic Universe (Marvel Cinematic Universe Movies)".

I tried fixing it by adding:
(space)category=>Marvel Cinematic Universe \(Marvel Cinematic Universe Movies\)=>Marvel Cinematic Universe

I removed the lines and added them one-by-one, too.

But that doesn't help either.


So I tried some more URLs which have several fandoms with brackets, including "The Avengers (Marvel Movies)":

https://archiveofourown.org/works/17981474
("Marvel Cinematic Universe", "Spider-Man: Homecoming (2017)", "The Avengers (Marvel Movies)")

https://archiveofourown.org/works/15578055
("Spider-Man - All Media Types", "Spider-Man: Homecoming (2017)", "Iron Man (Movies)", "The Avengers (Marvel Movies)", "Marvel Cinematic Universe")


Again, everything works, except the Avengers one.
(My replace_metadata is in the same format as above.)

Any Ideas why?
CuddlyMakani is offline   Reply With Quote
Old 01-19-2021, 09:59 AM   #5228
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,980
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by CuddlyMakani View Post
It has the fandoms "Marvel Cinematic Universe", "Iron Man (Movies)", "The Avengers (Marvel Movies)".

My .ini has already lines to replace the last two with the first:
replace_metadata:
(space)category=>Iron Man \(Movies\)=>Marvel Cinematic Universe
(space)category=>The Avengers \(Marvel Movies\)=>Marvel Cinematic Universe

The first line works without a problem.

But the thing that I don't understand is: The second one replaces the fandom with "Marvel Cinematic Universe (Marvel Cinematic Universe Movies)".
FYI, use the [code] tags to surround INI sections to preserve whitespace (the '#' button in the full post editor).

I can put (only) those two lines in and get the expected behavior.

I suspect that you have a line somewhere for "Marvel=>Marvel Cinematic Universe" or something like that that you've forgotten or it's in a different section.

When you want to match and replace exactly and only a particular string (and not substrings), put '^' and '$' around the pattern to indicate string beginning and end. IE, this will only replace "Marvel" alone and not inside any other string:

Code:
replace_metadata:
 ^Marvel$=>Marvel Cinematic Universe
JimmXinu is online now   Reply With Quote
Old 01-19-2021, 10:04 AM   #5229
Ascello
Enthusiast
Ascello began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite 4
Quote:
Originally Posted by JimmXinu View Post
Characters like ABcd or Harry, Ron, Hermione? One sounds like you are assigning Characters to it, the other sounds like you broke something.

Error output is the same as the messages in the View Log when an update/download finishes.
I think I broke something. I had a lot of old code that needs working on there. Or maybe I dreamt the whole situation up, as I was running on not a lot of sleep. xD Either way, I cannot seem to be able to replicate the issue and everything seems to work now, sooooo...

Quote:
Originally Posted by JimmXinu View Post
I had to go look at this for a bit too before I understood what's going on.

When you do a \, split, FFF runs each resulting entry back through the replace_metadata again, so when yy & zz hit the first line, they get changed back into xx. But then the infinite recursion check on the second line bails out, leaving xx, xx which dedups to xx.
Hm, yeah, I had this feeling that replace_metadata made loops, since I actually got xxxx when I didn't include the ^$ symbols, but since I didn't have any more code, I wasn't sure if it's something replace_metadata does in general or if I screwed something or if I was just plain wrong. Thanks.
Ascello is offline   Reply With Quote
Old 01-19-2021, 10:09 AM   #5230
CuddlyMakani
Member
CuddlyMakani began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2020
Device: Android Phone
Quote:
Originally Posted by JimmXinu View Post
When you want to match and replace exactly and only a particular string (and not substrings), put '^' and '$' around the pattern to indicate string beginning and end. IE, this will only replace "Marvel" alone and not inside any other string:

Code:
replace_metadata:
 ^Marvel$=>Marvel Cinematic Universe

Adding ^$ worked! I put it around the problematic fandom and everything's fine now. Thank you!
CuddlyMakani is offline   Reply With Quote
Old 01-19-2021, 12:34 PM   #5231
ackomb
Zealot
ackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura about
 
Posts: 106
Karma: 4486
Join Date: Mar 2020
Location: Netherlands
Device: i-pad
Hey Guys,

Okay I’m trying to workout the AO3 tagging mess, and I thought I had the solution but nope. I’ve tried the whole =>^.*[Aa}bcd.*|.*[Bb]aaa.*$=>ABCD thing but it just ends up changing things I don’t want changed.
So instead I just want to adjust entire tags, let me give you an example of what I’ve done:

So first I make sure to tackle the random naming of the fandoms:
category=>^the 100|The 100 \(TV\)|Clexa \(Madi\)|clexa - Fandom|The 100\(Tv Series\)$=>the 100
so far so good

Next up characters:
characters=>^Abigail "Abby" Griffin$|^Abby$|^Abby Griffin$=>Abigail "Abby" Griffin&&category==the 100

Abby Griffin –e Changes into Abigail "Abby" Griffin which correct
(example stories)

But at the same time, this fails:
Abby Griffin – Does not change
(example stories)


It just all seems so completely random to me, one changes and the other doesn’t. The only clear difference I see is the fandom, but I tackled that one first.

So please tell me what am I not getting here?
ackomb is offline   Reply With Quote
Old 01-19-2021, 12:54 PM   #5232
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,980
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ackomb View Post
Okay I’m trying to workout the AO3 tagging mess, and I thought I had the solution but nope.
If you search the thread you will be able to find me explaining many times in the past that as long as AO3 allows authors to put whatever random tags they want on stories, wrangling AO3 tags is going to be a losing effort. Nothing you come up with will be perfect.

I will help with specific problems, but I choose not to plow the sea.

Quote:
Originally Posted by ackomb View Post
So first I make sure to tackle the random naming of the fandoms:
category=>^the 100|The 100 \(TV\)|Clexa \(Madi\)|clexa - Fandom|The 100\(Tv Series\)$=>the 100
so far so good

Next up characters:
characters=>^Abigail "Abby" Griffin$|^Abby$|^Abby Griffin$=>Abigail "Abby" Griffin&&category==the 100
...
But at the same time, this fails:
Abby Griffin – Does not change
(example stories)
https://archiveofourown.org/works/3555A917
https://archiveofourown.org/works/12469408
...
So please tell me what am I not getting here?
In your two failure cases, the first is a Due South story, not 'the 100', and the second is The 100, not the 100. Regex is case sensitive. Use pattern "[tT]he 100" or add 'The 100' your category normalizing pattern.
JimmXinu is online now   Reply With Quote
Old 01-19-2021, 01:28 PM   #5233
ackomb
Zealot
ackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura about
 
Posts: 106
Karma: 4486
Join Date: Mar 2020
Location: Netherlands
Device: i-pad
Thumbs up

Quote:
Originally Posted by JimmXinu View Post
If you search the thread you will be able to find me explaining many times in the past that as long as AO3 allows authors to put whatever random tags they want on stories, wrangling AO3 tags is going to be a losing effort. Nothing you come up with will be perfect.

I will help with specific problems, but I choose not to plow the sea.



In your two failure cases, the first is a Due South story, not 'the 100', and the second is The 100, not the 100. Regex is case sensitive. Use pattern "[tT]he 100" or add 'The 100' your category normalizing pattern.
Hi Jim,

I've searched and read the thread many times, it how I got as far as I got tbh. And I completely agree with you on the random tagging, how people see it as a positive thing is beyond me. I'd never put my whole .ini file up here it would drive any sane person nuts.
But being the OCD type I am I can't help myself but try to create some order into this mess. And I've designed the excel sheet that convert a whole bunch of random bits of text into lines I can put into my .ini file. It kinda works for me.

I've just been overlooking the fact I only had " the 100" and not " The 100" (I use both seperately because when I copy in a new one, I have Excel check for duplicate input). I'd been looking for a few days now, between my regular work and homereno in and I just couldn't spot it. So for the
ackomb is offline   Reply With Quote
Old 01-19-2021, 01:40 PM   #5234
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,998
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by ackomb View Post
Hi Jim,

I've searched and read the thread many times, it how I got as far as I got tbh. And I completely agree with you on the random tagging, how people see it as a positive thing is beyond me.
I've seen a few fics where the tag list is longer than the story itself.
ownedbycats is online now   Reply With Quote
Old 01-20-2021, 07:41 AM   #5235
Ascello
Enthusiast
Ascello began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite 4
Quote:
Originally Posted by ackomb View Post
Hi Jim,

I've searched and read the thread many times, it how I got as far as I got tbh. And I completely agree with you on the random tagging, how people see it as a positive thing is beyond me.
I think this is positive. This way if new popular trope happens in fandom the tags for it get created much faster than if staff were to add it manually. If the tags were limited to small number, like on FF.net, I would bloody die and never find any story.

However, I do think that fandom and character tags should be more structurized, cuz we don't need 10k tags stating same tv show name, just spelled differently. Also, I think there should be character limit on tags, to prevent ppl using them as basically summaries or space for random comments. I mean tags like: "I only finished X the night before getting the idea for this fic, I'm trying, this might be bad, Apologies, I decided to go for it anyway though because why not" are cancer.

Needless to say in Calibre I chose limited number of tags that are important for me and excluded everything else.
Ascello 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 03:52 PM.


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