From 6dd1cc7daa3fa004f4380d89af298957c9a4b245 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Tue, 13 Oct 2015 21:37:38 -0500 Subject: [PATCH] Improve replace_metadata comments in defaults.ini --- calibre-plugin/plugin-defaults.ini | 12 ++++++++++++ fanficfare/defaults.ini | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/calibre-plugin/plugin-defaults.ini b/calibre-plugin/plugin-defaults.ini index 39173a7..a10d2cf 100644 --- a/calibre-plugin/plugin-defaults.ini +++ b/calibre-plugin/plugin-defaults.ini @@ -163,20 +163,29 @@ connect_timeout:60.0 ## For example, you could change Sci-Fi=>SF, remove *-Centered tags, ## etc. See http://docs.python.org/library/re.html (look for re.sub) ## for regexp details. +## ## Make sure to keep at least one space at the start of each line and ## to escape % to %%, if used. +## ## Two, three or five part lines. Two part effect everything. ## Three part effect only those key(s) lists. ## *Five* part lines. Effect only when trailing conditional key=>regexp matches ## metakey[,metakey]=>pattern=>replacement[&&conditionalkey=>regexp] +## ## Note that if metakey == conditionalkey the conditional is ignored. ## You can use \s in the replacement to add explicit spaces. (The config parser ## tends to discard trailing spaces.) +## ## replace_metadata _LIST options: FanFicFare replace_metadata lines ## operate on individual list items for list entries. But if you ## want to do a replacement on the joined string for the whole list, ## you can by using _LIST. Example, if you added ## calibre_author: calibre_author_LIST=>^(.{,100}).*$=>\1 +## +## You can 'split' one list item into multiple list entries by using +## \' in the replacement string. +## +## Examples: #replace_metadata: # genre,category=>Sci-Fi=>SF # Puella Magi Madoka Magica.* => Madoka @@ -186,6 +195,8 @@ connect_timeout:60.0 # .*-Centered=> # characters=>Sam W\.=>Sam Witwicky&&category=>Transformers # characters=>Sam W\.=>Sam Winchester&&category=>Supernatural +# category=>Bitextual=>M/M\,F/M + ## Include/Exclude metadata ## @@ -635,6 +646,7 @@ nook_img_fix:true ## URLs like: http://test1.com?sid=12345 [test1.com] extratags: FanFiction,Testing + # extracategories:Fafner # extragenres:Romance,Fluff # extracharacters:Reginald Smythe-Smythe,Mokona,Harry P. diff --git a/fanficfare/defaults.ini b/fanficfare/defaults.ini index df52ba5..8e980a8 100644 --- a/fanficfare/defaults.ini +++ b/fanficfare/defaults.ini @@ -198,20 +198,29 @@ connect_timeout:60.0 ## For example, you could change Sci-Fi=>SF, remove *-Centered tags, ## etc. See http://docs.python.org/library/re.html (look for re.sub) ## for regexp details. +## ## Make sure to keep at least one space at the start of each line and ## to escape % to %%, if used. +## ## Two, three or five part lines. Two part effect everything. ## Three part effect only those key(s) lists. ## *Five* part lines. Effect only when trailing conditional key=>regexp matches ## metakey[,metakey]=>pattern=>replacement[&&conditionalkey=>regexp] +## ## Note that if metakey == conditionalkey the conditional is ignored. ## You can use \s in the replacement to add explicit spaces. (The config parser ## tends to discard trailing spaces.) +## ## replace_metadata _LIST options: FanFicFare replace_metadata lines ## operate on individual list items for list entries. But if you ## want to do a replacement on the joined string for the whole list, ## you can by using _LIST. Example, if you added ## calibre_author: calibre_author_LIST=>^(.{,100}).*$=>\1 +## +## You can 'split' one list item into multiple list entries by using +## \' in the replacement string. +## +## Examples: #replace_metadata: # genre,category=>Sci-Fi=>SF # Puella Magi Madoka Magica.* => Madoka @@ -221,6 +230,8 @@ connect_timeout:60.0 # .*-Centered=> # characters=>Sam W\.=>Sam Witwicky&&category=>Transformers # characters=>Sam W\.=>Sam Winchester&&category=>Supernatural +# category=>Bitextual=>M/M\,F/M + ## Include/Exclude metadata ##