Add skip_threadmarks_categories option to base_xenforoforum_adapter.

This commit is contained in:
Jim Miller 2017-06-05 10:27:35 -05:00
parent 1630f0a6f7
commit dd8beff697
4 changed files with 24 additions and 2 deletions

View file

@ -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]

View file

@ -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'

View file

@ -439,6 +439,7 @@ def get_valid_keywords():
'remove_spoilers',
'legend_spoilers',
'apocrypha_to_omake',
'skip_threadmarks_categories',
'normalize_text_links',
'internalize_text_links',
])

View file

@ -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]