New Test Version Posted
2018-06-13
- Change metadata separator to ' & ' when filling 'Contains names' custom columns.
Quote:
Originally Posted by worstje
First of all, thanks for this great plugin!
|
Quote:
Originally Posted by worstje
1) How to activate a different cover generation profile if there is no cover included with the fic in question? Simplifying away the regex for the series name, the following bit of code sums up my attempts thus far:
Code:
generate_cover_settings:
## Does not seem to work... :(
# ${category},${cover_image} => .SOME_FANDOM.*,(specific,first,default,old) => Fanworks-SOME_FANDOM
|
The first thing I see is that your regexp for checking
cover_image isn't correct. It should be '|', not ','.
Code:
generate_cover_settings:
## Does not seem to work... :(
# ${category},${cover_image} => .SOME_FANDOM.*,(specific|first|default|old) => Fanworks-SOME_FANDOM
If that doesn't help, please provide an example with actual fandom and some story URLs for that fandom that have and don't have covers--ie, exactly what you're trying to test so I can test it myself.
(Also, I'm not sure why you have '.' before SOME_FANDOM, I'd expect it to be '.*' like after...)
Quote:
Originally Posted by worstje
2) How do I create a characters column with smart behaviour like Authors in regards to 'FirstName LastName' entries being shown in the tags list as 'LastName, FirstName'?
I tried creating a comma-separated text column #characters, but the moment I hit the 'As Names' option in that interface, it turns it into an ampersand separated list... which means that whatever FFF tries to give it is suddenly turned into one big list. I guess I need to replace commas by ampersands, but shouldn't FFF already have those names as a list to begin with?
|
The Calibre method FFF uses expects a string, not a list, when setting custom columns and then later splits that string for itself. When you change the column type to 'Contains names', that changes what Calibre splits on from ',' to '&'.
There are ways using FFF settings to change the separators, but FFF was hard-coded to use ', ' when adding to existing using the
a flag in
custom_columns_settings.
So, since I needed to change it in that one place, I added code to FFF to do the ', ' to ' & ' change when filling a 'Contains names' column.