I’m a noob with no coding experience other than setting up a MySpace page 20 years ago and I’m trying to set up Calibre for fan fiction archiving. I’ve been following tutorials and have it almost dialed in but I’ve been struggling with getting anything to work without copy and pasting code provided by someone else 😅
I have custom columns set up to pull metadata from AO3 via the FanFicFare plugin. I’m trying to translate those tags into shortened versions for consistency and for displaying on a book cover. I want to keep the original meta data from AO3, but just also have additional columns for shortened versions.
What I’m trying to do now is pull the data from my #fandom column (mapped to AO3 “Category”), search it for a key phrase, and if it contains that - translate into a shortened name of the fandom.
Example: for The Last of Us - the official fandom tags on A03 are either or both of “The Last of Us (TV)” and/or “The Last of Us (Video Games)”
I want to create a new column #short_fandom that will search the contents of #fandom for contains “The Last of Us” (so it recognizes either official fandom tags) and if present, displays “TLOU” in the #short_fandom column.
Same with say “Sherlock (BBC TV 2010)” and “Sherlock Holmes & Related Fandoms” tags displaying as “Sherlock”.
I figure if I get help with one, I can figure out how to duplicate to input all my fandoms.
It seems like it should be so simple but I’ve been trying to figure this out for hours 😂 can anyone help me with the code for the custom column builder template to accomplish this? 🙏🏻