From dfae1046742928f9035496cea1dd5ad1f3d78312 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 26 Jun 2015 12:18:55 -0500 Subject: [PATCH] forum adapters - Fixes --- calibre-plugin/plugin-defaults.ini | 12 ++++++------ fanficfare/adapters/adapter_forumsspacebattlescom.py | 5 +---- fanficfare/defaults.ini | 12 ++++++------ 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/calibre-plugin/plugin-defaults.ini b/calibre-plugin/plugin-defaults.ini index e8e27a32..5a953a63 100644 --- a/calibre-plugin/plugin-defaults.ini +++ b/calibre-plugin/plugin-defaults.ini @@ -1045,7 +1045,7 @@ cover_exclusion_regexp:/res/css/bir.png cover_exclusion_regexp:/clear.png -add_to_extratags:ForumFic +add_to_extratags:,ForumFic strip_chapter_numbers:false @@ -1081,19 +1081,19 @@ replace_metadata: extra_titlepage_entries: titletags -## '.SPLIT' teels the system to split by ',' +## '.SPLIT' tells the system to split by ',' add_to_include_subject_tags:,titletags.SPLIT datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S dateUpdated_format:%%Y-%%m-%%d %%H:%%M:%%S -description_limit:1500 +description_limit:500 [forums.spacebattles.com] cover_exclusion_regexp:/clear.png -add_to_extratags:ForumFic +add_to_extratags:,ForumFic # true, false, threadmarksonly add_chapter_dates:false @@ -1129,13 +1129,13 @@ replace_metadata: extra_titlepage_entries: titletags -## '.SPLIT' teels the system to split by ',' +## '.SPLIT' tells the system to split by ',' add_to_include_subject_tags:,titletags.SPLIT datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S dateUpdated_format:%%Y-%%m-%%d %%H:%%M:%%S -description_limit:1500 +description_limit:500 [grangerenchanted.com] ## Some sites require login (or login for some rated stories) The diff --git a/fanficfare/adapters/adapter_forumsspacebattlescom.py b/fanficfare/adapters/adapter_forumsspacebattlescom.py index 58d89c99..43fd5256 100644 --- a/fanficfare/adapters/adapter_forumsspacebattlescom.py +++ b/fanficfare/adapters/adapter_forumsspacebattlescom.py @@ -133,13 +133,10 @@ class ForumsSpacebattlesComAdapter(BaseSiteAdapter): self.story.setMetadata('datePublished', date) if not self.story.getMetadataRaw('dateUpdated') or date > self.story.getMetadataRaw('dateUpdated'): self.story.setMetadata('dateUpdated', date) - - if self.getConfig('add_chapter_dates') in ['true','threadmarksonly']: - name = '%s %s'%(name,date) self.chapterUrls.append((name,self.getURLPrefix()+'/'+url)) - soup = soup.find('li') # limit first post for date stuff below. ('#' posts above) + soup = soup.find('li',{'class':'message'}) # limit first post for date stuff below. ('#' posts above) # Now go hunting for the 'chapter list'. bq = soup.find('blockquote') # assume first posting contains TOC urls. diff --git a/fanficfare/defaults.ini b/fanficfare/defaults.ini index 52256f8f..07d62ba6 100644 --- a/fanficfare/defaults.ini +++ b/fanficfare/defaults.ini @@ -1031,7 +1031,7 @@ cover_exclusion_regexp:/res/css/bir.png cover_exclusion_regexp:/clear.png -add_to_extratags:ForumFic +add_to_extratags:,ForumFic strip_chapter_numbers:false @@ -1067,19 +1067,19 @@ replace_metadata: extra_titlepage_entries: titletags -## '.SPLIT' teels the system to split by ',' +## '.SPLIT' tells the system to split by ',' add_to_include_subject_tags:,titletags.SPLIT datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S dateUpdated_format:%%Y-%%m-%%d %%H:%%M:%%S -description_limit:1500 +description_limit:500 [forums.spacebattles.com] cover_exclusion_regexp:/clear.png -add_to_extratags:ForumFic +add_to_extratags:,ForumFic # true, false, threadmarksonly add_chapter_dates:false @@ -1115,13 +1115,13 @@ replace_metadata: extra_titlepage_entries: titletags -## '.SPLIT' teels the system to split by ',' +## '.SPLIT' tells the system to split by ',' add_to_include_subject_tags:,titletags.SPLIT datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S dateUpdated_format:%%Y-%%m-%%d %%H:%%M:%%S -description_limit:1500 +description_limit:500 [grangerenchanted.com] ## Some sites require login (or login for some rated stories) The