@version365 raised
a question about how merged/anthology books' metadata assigned to numeric columns are handled. I
explained the current state and now I'm moving the conversation over here.
So, the basic issue is: FanFicFare assumes that each metadata in an anthology assigned to an int or float custom column should be the summed values from the individual stories. version365 wants to be able have at least one metadata averaged instead.
Actually averaging instead of summing is easy--the complicated part was deciding where in all the different configuration settings it should be controlled from.
After considering several ideas, I decided it needed to be in INI as part of custom_columns_settings. With the latest test version, you can use modes of 'r_anthaver' and 'n_anthaver', which are identical to 'r' and 'n' except for anthologies where they will average the metadata instead of sum.
The average only considers stories that a value for that metadata. So if you have 5 stories in the anthology and the first two have values 1 and 3 while other three don't have that metadata item at all (say they come from a different site), the average will be (1+3)/2, not (1+3+0+0+0)/5.
Spoiler:
Code:
## (Plugin Only) - You can also populate calibre custom columns with
## the site specific metadata using custom_columns_settings (but only
## if 'Allow custom_columns_settings from personal.ini' is checked in
## the plugin GUI config.) There are three parts, the entry name,
## then the label of the calibre custom column, then (optionally) a
## 'mode'. 'r' to Replace any existing values, 'a' to Add to existing
## value (use with tag-like columns), and 'n' for setting on New books
## only. (Default is 'r'.)
## Literal strings can be set into custom columns using double quotes.
## Each metadata=>column mapping must be on a separate line and each
## needs to have one space at the start of each line.
## 'r_anthaver' and 'n_anthaver' can be used to indicate the same as
## 'r' and 'n' for normal downloads, but to average the metadata for
## the differents story in an anthology before setting in integer and
## float type custom columns. This can be useful for a averrating
## column, for example. Default is to sum the values of all stories,
## and numChapters and numWords are always summed.
#custom_columns_settings:
# cliches=>#acolumn
# themes=>#bcolumn,a
# timeline=>#ccolumn,n
# "FanFiction"=>#collection
# averrating=>#averrating,r_anthaver
New test version posted (direct link)
2016-07-12
- Update translations.
- Add n_anthaver and r_anthaver modes to custom_columns_settings for averaging metadata for anthologies before setting in integer and float calibre custom columns.