Quote:
Originally Posted by JimmXinu
To the best of my knowledge, the only way to capitalize letters in python regex is by individually matching a, b, c, etc and changing them to A, B, C, etc.
FFF has code specifically for [base_xenforoforum], but I suspect you're talking about AO3. No other site has tags so complex.
...
My instinct is that trying to implement that more generally would be complicated.
|
It is AO3. I guess I'll have to decide if I want a 26 line code to get the first word capitalized or not.
Quote:
Without a story URL to try, I'm speculating, but I would guess you want '\,' not just ',' to split one entry value into two. Eg:
Code:
genre=>(.*) [Aa][Uu](.)?=>Alternate Universe\,AU: \1
|
I tried that, but it didn't seem to work. Here's one of the many urls I'm trying to get:
https://archiveofourown.org/works/48659611
However, I get the same error in the test.com, but adding the genre Faerie AU!
Quote:
|
I doubt very much there will be any good solutions. Multiple series support is an ugly kludge and which series is 'first' and therefore canonical can vary by story in the same series.
|
I have a base idea how to do it. I was able to get all my series names into a "column made from other columns"(entire series). I'm not sure if calibre template language could help me. But if I can get the selected (searched for) series and compare it to the value in each series column for that story. I can use the series index that matches.
Code:
1. get the value being selected from entire series column
2. check each series column of book for the selected value
3. if selected value is present use the series index to sort
4. repeat 2-3 for all series columns
I'm just not sure if that is even possible.
It also came with the added issue that series names that contained commas are separated into different series which I want to stop as well, just have no idea how.