From 784cb711d8bc71d83a9c601b8e20d65b7e1d8cad Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sun, 23 Jul 2023 16:24:35 -0500 Subject: [PATCH] Update comments for include_subject_tags x_LIST --- calibre-plugin/plugin-defaults.ini | 13 ++++++++++++- fanficfare/defaults.ini | 15 +++++++++++++-- fanficfare/story.py | 6 ++++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/calibre-plugin/plugin-defaults.ini b/calibre-plugin/plugin-defaults.ini index 4ae2aa72..6b36d3e4 100644 --- a/calibre-plugin/plugin-defaults.ini +++ b/calibre-plugin/plugin-defaults.ini @@ -153,8 +153,19 @@ allow_unsafe_filename: false ## number, or one of _. []()&'- output_filename_safepattern:(^\.|/\.|[^a-zA-Z0-9_\. \[\]\(\)&'-]+) -## entries to make epub subjects and calibre tags +## include_subject_tags: entries to make epub subjects and calibre tags ## lastupdate creates two tags: "Last Update Year/Month: %Y/%m" and "Last Update: %Y/%m/%d" +## +## By default, entries listed in include_subject_tags are used as +## lists, skipping any _LIST processing in +## replace_metadata/etc. You can instead use _LIST in +## include_subject_tags to get the whole list as one string. +## +## You can also use .SPLIT to split each value in the entry on +## ',' for individual values. .SPLIT was basically obsoleted by \, +## splitting, but may still be used in some users' config. Can also +## be combined with _LIST as _LIST.SPLIT to get both +## _LIST processing in replace_metadata/etc *and* split by ',' include_subject_tags: extratags, genre, category, characters, ships, status ## extra tags (comma separated) to include, primarily for epub. diff --git a/fanficfare/defaults.ini b/fanficfare/defaults.ini index c85ac98f..d821b402 100644 --- a/fanficfare/defaults.ini +++ b/fanficfare/defaults.ini @@ -173,8 +173,19 @@ allow_unsafe_filename: false ## number, or one of _. []()&'- output_filename_safepattern:(^\.|/\.|[^a-zA-Z0-9_\. \[\]\(\)&'-]+) -## entries to make epub subjects and calibre tags +## include_subject_tags: entries to make epub subjects and calibre tags ## lastupdate creates two tags: "Last Update Year/Month: %Y/%m" and "Last Update: %Y/%m/%d" +## +## By default, entries listed in include_subject_tags are used as +## lists, skipping any _LIST processing in +## replace_metadata/etc. You can instead use _LIST in +## include_subject_tags to get the whole list as one string. +## +## You can also use .SPLIT to split each value in the entry on +## ',' for individual values. .SPLIT was basically obsoleted by \, +## splitting, but may still be used in some users' config. Can also +## be combined with _LIST as _LIST.SPLIT to get both +## _LIST processing in replace_metadata/etc *and* split by ',' include_subject_tags: extratags, genre, category, characters, ships, lastupdate, status ## extra tags (comma separated) to include, primarily for epub. @@ -456,6 +467,7 @@ chapter_title_strip_pattern:^[0-9]+[\.: -]+(?=[^0-9]|$) ## If set to latestonly, only new chapters downloaded this time will ## be marked (new) and existing chapters will have any (new) marks ## removed. +## ## mark_new_chapters can be true, false or latestonly mark_new_chapters:false @@ -1147,7 +1159,6 @@ output_css: ## include images from img tags in the body and summary of ## stories. Images will be converted to jpg for size if possible. ## include_images is *only* available in epub and html output format. -## include_images is *not* available in the web service in any format. #include_images:false ## Quality level to use when converting images to jpg. Range is 0-100, diff --git a/fanficfare/story.py b/fanficfare/story.py index f0faf20b..e61a5c67 100644 --- a/fanficfare/story.py +++ b/fanficfare/story.py @@ -1355,8 +1355,10 @@ class Story(Requestable): value_list = self.getList(entry_key, removeallentities=removeallentities) if '.SPLIT' in entry: - # .SPLIT is obsolete, but may be used in some - # users' config. split each entry value by ',' + # split each entry value by ',' .SPLIT was basically + # obsoleted by \, splitting, but may still be used in + # some users' config. Could also be useful with _LIST + # now. split_list = [] for value in value_list: split_list.extend(value.split(','))