diff --git a/calibre-plugin/plugin-defaults.ini b/calibre-plugin/plugin-defaults.ini index 824cdb27..4f7ca6c0 100644 --- a/calibre-plugin/plugin-defaults.ini +++ b/calibre-plugin/plugin-defaults.ini @@ -572,9 +572,18 @@ always_use_forumtags:false ## 10. #reader_posts_per_page:10 +## xenforoforum has categories of threadmarks. This setting allows +## you to leave out categories you don't want. Skipping categories +## will also speed downloads as categories other than 'Threadmarks' +## don't use Reader Mode. +## The current list of categories is: +## Threadmarks,Sidestory,Apocrypha,Images,Informational,Staff Post +#skip_threadmarks_categories:Staff Post + ## I'm not a fan of using the word 'Apocrypha' for the threadmark ## category when everybody usually calls them Omake. Set true to -## change Apocrypha to Omake. +## change Apocrypha to Omake. Applied *after* +## skip_threadmarks_categories. #apocrypha_to_omake:false [base_xenforoforum:epub] diff --git a/fanficfare/adapters/base_xenforoforum_adapter.py b/fanficfare/adapters/base_xenforoforum_adapter.py index b1597d39..0dcf4c97 100644 --- a/fanficfare/adapters/base_xenforoforum_adapter.py +++ b/fanficfare/adapters/base_xenforoforum_adapter.py @@ -243,6 +243,9 @@ class BaseXenForoForumAdapter(BaseSiteAdapter): prepend = "" tmcat_name = stripHTML(threadmarksa) + if tmcat_name in self.getConfigList('skip_threadmarks_categories'): + continue + if tmcat_name == 'Apocrypha' and self.getConfig('apocrypha_to_omake'): tmcat_name = 'Omake' diff --git a/fanficfare/configurable.py b/fanficfare/configurable.py index 83556645..be4fde03 100644 --- a/fanficfare/configurable.py +++ b/fanficfare/configurable.py @@ -439,6 +439,7 @@ def get_valid_keywords(): 'remove_spoilers', 'legend_spoilers', 'apocrypha_to_omake', + 'skip_threadmarks_categories', 'normalize_text_links', 'internalize_text_links', ]) diff --git a/fanficfare/defaults.ini b/fanficfare/defaults.ini index 4a13e84f..933b2de5 100644 --- a/fanficfare/defaults.ini +++ b/fanficfare/defaults.ini @@ -614,9 +614,18 @@ always_use_forumtags:false ## 10. #reader_posts_per_page:10 +## xenforoforum has categories of threadmarks. This setting allows +## you to leave out categories you don't want. Skipping categories +## will also speed downloads as categories other than 'Threadmarks' +## don't use Reader Mode. +## The current list of categories is: +## Threadmarks,Sidestory,Apocrypha,Images,Informational,Staff Post +#skip_threadmarks_categories:Staff Post + ## I'm not a fan of using the word 'Apocrypha' for the threadmark ## category when everybody usually calls them Omake. Set true to -## change Apocrypha to Omake. +## change Apocrypha to Omake. Applied *after* +## skip_threadmarks_categories. #apocrypha_to_omake:false [base_xenforoforum:epub]