mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
base_xenforoforum: Add timeperiodtags and better handle unexpected typed tags
This commit is contained in:
parent
9eed0340e9
commit
74ac96a67e
3 changed files with 11 additions and 5 deletions
|
|
@ -769,7 +769,7 @@ author_avatar_cover:false
|
|||
strip_chapter_numbers:false
|
||||
|
||||
## Copy title to tagsfromtitle for parsing tags.
|
||||
add_to_extra_valid_entries:,tagsfromtitledetect,tagsfromtitle,forumtags,prefixtags,contenttags,formattags,parentforums
|
||||
add_to_extra_valid_entries:,tagsfromtitledetect,tagsfromtitle,forumtags,prefixtags,contenttags,formattags,timeperiodtags,parentforums
|
||||
|
||||
## '.NOREPL' tells the system to *not* apply title's
|
||||
## in/exclude/replace_metadata -- Only works on include_in_ lines.
|
||||
|
|
@ -783,6 +783,7 @@ forumtags_label:Tags from Forum
|
|||
prefixtags_label:Prefix Tags from Forum
|
||||
contenttags_label:Content Tags from Forum
|
||||
formattags_label:Format Tags from Forum
|
||||
timeperiodtags_label:Time Period Tags from Forum
|
||||
|
||||
parentforums_label:Parent Forums
|
||||
keep_in_order_parentforums:true
|
||||
|
|
|
|||
|
|
@ -604,6 +604,7 @@ class BaseXenForoForumAdapter(BaseSiteAdapter):
|
|||
'Character':'characters',
|
||||
'Content':'contenttags',
|
||||
'Format':'formattags',
|
||||
'Time period':'timeperiodtags',
|
||||
}
|
||||
for tag in self.get_forumtags(topsoup):
|
||||
tagcat = tag.select_one("i")
|
||||
|
|
@ -611,9 +612,12 @@ class BaseXenForoForumAdapter(BaseSiteAdapter):
|
|||
if self.getConfig('capitalize_forumtags'):
|
||||
tstr = title(tstr)
|
||||
if tagcat:
|
||||
tagname = tagmap[tagcat['title']]
|
||||
# logger.debug("Forum Tag(%s) Cat(%s) list(%s)"%(stripHTML(tag),tagcat['title'],tagname))
|
||||
self.story.addToList(tagname,tstr)
|
||||
tagname = tagmap.get(tagcat['title'],None)
|
||||
if tagname:
|
||||
# logger.debug("Forum Tag(%s) Cat(%s) list(%s)"%(stripHTML(tag),tagcat['title'],tagname))
|
||||
self.story.addToList(tagname,tstr)
|
||||
else:
|
||||
logger.debug("Forum Tag(%s) Cat(%s) tagname not found"%(stripHTML(tag),tagcat['title']))
|
||||
# else:
|
||||
# logger.debug("Forum Tag(%s) Uncategorized"%stripHTML(tag))
|
||||
self.story.addToList('forumtags',tstr)
|
||||
|
|
|
|||
|
|
@ -759,7 +759,7 @@ author_avatar_cover:false
|
|||
strip_chapter_numbers:false
|
||||
|
||||
## Copy title to tagsfromtitle for parsing tags.
|
||||
add_to_extra_valid_entries:,tagsfromtitledetect,tagsfromtitle,forumtags,prefixtags,contenttags,formattags,parentforums
|
||||
add_to_extra_valid_entries:,tagsfromtitledetect,tagsfromtitle,forumtags,prefixtags,contenttags,formattags,timeperiodtags,parentforums
|
||||
|
||||
## '.NOREPL' tells the system to *not* apply title's
|
||||
## in/exclude/replace_metadata -- Only works on include_in_ lines.
|
||||
|
|
@ -773,6 +773,7 @@ forumtags_label:Tags from Forum
|
|||
prefixtags_label:Prefix Tags from Forum
|
||||
contenttags_label:Content Tags from Forum
|
||||
formattags_label:Format Tags from Forum
|
||||
timeperiodtags_label:Time Period Tags from Forum
|
||||
|
||||
parentforums_label:Parent Forums
|
||||
keep_in_order_parentforums:true
|
||||
|
|
|
|||
Loading…
Reference in a new issue