Quote:
Originally Posted by MiniMouse
Is there a way to include more columns in a selection for a cover in der Genrate Cover Plugin in my personal.ini from FFDL?
I know that I can select a cover for a fandom (category) but can I make it more if/then?
I mean if the category is 'Merlin' and the first two characters in my 'characters' column are 'Arthur, Merlin' than select cover A from Generate Cover Plugin.
Or maybe even further, if the category is 'Merlin' and the first two characters in my 'characters' column are 'Arthur, Merlin' and the 'relationship' column is Arthur/Merlin' than select cover B from Generate Cover Plugin.
|
Yes, it is possible. But it involves using regular expressions.
Full generate_cover_settings spec:
Because generate_cover_settings applies a regular expression to a string template that can contain any of the book metadata, it is possible to use more than one metadatum.
You do, however, have to allow for having other values, and you have to list them from most specific to least specific because the first line that matches will be the one used:
Code:
# saves having to match both Arthur/Merlin and Merlin/Arthur, etc.
# characters and other lists are already sorted by default.
sort_ships:true
generate_cover_settings:
${category}:${characters}:${ships} => .*Merlin.*:.*Arthur, .*Merlin.*:.*Arthur/Merlin.* => CoverMostSpecific
${category}:${characters} => .*Merlin.*:.*Arthur, .*Merlin.* => CoverMoreSpecific
${category} => Merlin => CoverMerlin
Testing this is an ideal time to use the built-in teststory feature to avoid hitting servers a bunch:
Spoiler:
You'll need to have a copy of the generate_cover_settings, etc that you're testing in [default], [epub] or [test1.com] sections. This is also a good time to be working in a separate test library until you're happy with it.
In personal.ini add:
Code:
[teststory:2000]
add_to_category_list:Merlin
[teststory:2001]
add_to_category_list:Merlin
add_to_characters_list:Merlin,Arthur,Bob,Zack,Aaron
[teststory:2002]
add_to_category_list:Merlin
add_to_characters_list:Merlin,Arthur,Bob,Zack,Aaron
add_to_ships_list:Thor/Jane,Merlin/Arthur
Now when you add/update stories with these URLs, they will have the metadata shown above:
http://test1.com?sid=2000
http://test1.com?sid=2001
http://test1.com?sid=2002