Hello community,
here is the log from the commit of package python-fanficfare for
openSUSE:Factory checked in at 2020-04-05 20:55:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-fanficfare (Old)
and /work/SRC/openSUSE:Factory/.python-fanficfare.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-fanficfare"
Sun Apr 5 20:55:04 2020 rev:19 rq:791430 version:3.18.1+git.1586013122.54f843ec
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-fanficfare/python-fanficfare.changes
2020-04-01 19:14:23.479424565 +0200
+++
/work/SRC/openSUSE:Factory/.python-fanficfare.new.3248/python-fanficfare.changes
2020-04-05 20:55:18.233298422 +0200
@@ -1,0 +2,14 @@
+Sat Apr 04 20:32:27 UTC 2020 - [email protected]
+
+- Update to version 3.18.0+git.1586013122.54f843ec:
+ * Bump Test Version 3.18.1
+ * New Site: scifistories.com (extends finestories.com).
+ * Bump Release Version 3.18.0
+ * Update translations
+ * Bump Test Version 3.17.9
+ * Change fanfiction.tenhawkpresents.com to fanfic.tenhawkpresents.ink
+ * Revert "Remove defunct site fanfiction.tenhawkpresents.com"
+ * Bump Test Version 3.17.8
+ * Changes to adapter_archiveofourownorg for AO3 changes re: view_adult=true
+
+-------------------------------------------------------------------
Old:
----
FanFicFare-3.17.0+git.1585684191.22d2ad45.tar.xz
New:
----
FanFicFare-3.18.1+git.1586013122.54f843ec.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-fanficfare.spec ++++++
--- /var/tmp/diff_new_pack.8j6P4F/_old 2020-04-05 20:55:20.381300727 +0200
+++ /var/tmp/diff_new_pack.8j6P4F/_new 2020-04-05 20:55:20.381300727 +0200
@@ -21,7 +21,7 @@
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-fanficfare
-Version: 3.17.0+git.1585684191.22d2ad45
+Version: 3.18.1+git.1586013122.54f843ec
Release: 0
Summary: Tool for making eBooks from stories on fanfiction and other
web sites
License: GPL-3.0-only
++++++ FanFicFare-3.17.0+git.1585684191.22d2ad45.tar.xz ->
FanFicFare-3.18.1+git.1586013122.54f843ec.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/calibre-plugin/__init__.py
new/FanFicFare-3.18.1+git.1586013122.54f843ec/calibre-plugin/__init__.py
--- old/FanFicFare-3.17.0+git.1585684191.22d2ad45/calibre-plugin/__init__.py
2020-03-31 21:49:51.000000000 +0200
+++ new/FanFicFare-3.18.1+git.1586013122.54f843ec/calibre-plugin/__init__.py
2020-04-04 17:12:02.000000000 +0200
@@ -33,7 +33,7 @@
from calibre.customize import InterfaceActionBase
# pulled out from FanFicFareBase for saving in prefs.py
-__version__ = (3, 17, 7)
+__version__ = (3, 18, 1)
## Apparently the name for this class doesn't matter--it was still
## 'demo' for the first few versions.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/calibre-plugin/plugin-defaults.ini
new/FanFicFare-3.18.1+git.1586013122.54f843ec/calibre-plugin/plugin-defaults.ini
---
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/calibre-plugin/plugin-defaults.ini
2020-03-31 21:49:51.000000000 +0200
+++
new/FanFicFare-3.18.1+git.1586013122.54f843ec/calibre-plugin/plugin-defaults.ini
2020-04-04 17:12:02.000000000 +0200
@@ -1606,6 +1606,16 @@
website_encodings:Windows-1252,utf8
+[fanfic.tenhawkpresents.ink]
+## Some sites require login (or login for some rated stories) The
+## program can prompt you, or you can save it in config. In
+## commandline version, this should go in your personal.ini, not
+## defaults.ini.
+#username:YourName
+#password:yourpassword
+
+website_encodings:Windows-1252,utf8
+
[fanficauthors.net]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
@@ -2091,6 +2101,77 @@
website_encodings:Windows-1252,utf8
+[scifistories.com:epub]
+## This is a workaround to replace truncated chapter titles present in
+## chapter list. Uncomment this to remove the usual, shorter chapter
+## title in the chapter files only. See inject_chapter_title below.
+#chapter_start:<?xml version="1.0" encoding="UTF-8"?>
+# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+# <html xmlns="http://www.w3.org/1999/xhtml">
+# <head>
+# <title>${chapter}</title>
+# <link href="stylesheet.css" type="text/css" charset="UTF-8"
rel="stylesheet"/>
+# <meta name="chapterurl" content="${url}"></meta>
+# <meta name="chapterorigtitle" content="${origchapter}"></meta>
+# <meta name="chaptertoctitle" content="${tocchapter}"></meta>
+# <meta name="chaptertitle" content="${chapter}"></meta>
+# </head>
+# <body>
+
+[scifistories.com]
+## Some sites require login (or login for some rated stories) The
+## program can prompt you, or you can save it in config. In
+## commandline version, this should go in your personal.ini, not
+## defaults.ini.
+## scifistories.com has started requiring login by email rather than
+## pen name.
+#username:[email protected]
+#password:yourpassword
+
+## dateUpdated/datePublished don't usually have time, but they do on this site.
+## http://docs.python.org/library/datetime.html#strftime-strptime-behavior
+## Note that ini format requires % to be escaped as %%.
+dateUpdated_format:%%Y-%%m-%%d %%H:%%M:%%S
+datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S
+
+## Clear FanFiction from defaults, site is original fiction.
+extratags:
+
+extra_valid_entries:size,universe,universeUrl,universeHTML,sitetags,notice,codes,score
+#extra_titlepage_entries:size,universeHTML,sitetags,notice,score
+include_in_codes:sitetags
+
+## adds to include_subject_tags instead of replacing it.
+#extra_subject_tags:sitetags
+
+size_label:Size
+universe_label:Universe
+universeUrl_label:Universe URL
+universeHTML_label:Universe
+sitetags_label:Site Tags
+notice_label:Notice
+score_label:Score
+
+## Assume entryUrl, apply to "<a class='%slink' href='%s'>%s</a>" to
+## make entryHTML.
+make_linkhtml_entries:universe
+
+## scifistories.com stories can be in a series and/or a universe. By
+## default, series will be populated with the universe if there is
+## universe but not series.
+universe_as_series: true
+
+## some sites include images that we don't ever want becoming the
+## cover image. This lets you exclude them.
+cover_exclusion_regexp:/css/bir.png
+
+## This site uses shortened title chapters in chapter lists. When set
+## true, this will inject the site's full length chapter title into
+## the chapter text. Typically will be used with chapter_start to
+## remove the standard chapter title, as shown above in
+## [scifistories.com:epub].
+#inject_chapter_title:false
+
[sheppardweir.com]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/calibre-plugin/translations/sv.po
new/FanFicFare-3.18.1+git.1586013122.54f843ec/calibre-plugin/translations/sv.po
---
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/calibre-plugin/translations/sv.po
2020-03-31 21:49:51.000000000 +0200
+++
new/FanFicFare-3.18.1+git.1586013122.54f843ec/calibre-plugin/translations/sv.po
2020-04-04 17:12:02.000000000 +0200
@@ -14,7 +14,7 @@
msgstr ""
"Project-Id-Version: calibre-plugins\n"
"POT-Creation-Date: 2019-11-29 09:28+Central Standard Time\n"
-"PO-Revision-Date: 2020-03-07 07:45+0000\n"
+"PO-Revision-Date: 2020-03-29 10:05+0000\n"
"Last-Translator: Jonatan Nyberg\n"
"Language-Team: Swedish
(http://www.transifex.com/calibre/calibre-plugins/language/sv/)\n"
"MIME-Version: 1.0\n"
@@ -359,7 +359,7 @@
#: config.py:580
msgid "FanFicFare button opens menu?"
-msgstr ""
+msgstr "Knappen FanFicFare öppnar menyn?"
#: config.py:581
msgid ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/adapters/__init__.py
new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/adapters/__init__.py
---
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/adapters/__init__.py
2020-03-31 21:49:51.000000000 +0200
+++
new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/adapters/__init__.py
2020-04-04 17:12:02.000000000 +0200
@@ -41,6 +41,7 @@
from . import adapter_fimfictionnet
from . import adapter_mediaminerorg
from . import adapter_potionsandsnitches
+from . import adapter_tenhawkpresents
from . import adapter_adastrafanficcom
from . import adapter_tthfanficorg
from . import adapter_twilightednet
@@ -166,6 +167,7 @@
from . import adapter_swiorgru
from . import adapter_fanficsme
from . import adapter_archivehpfanfictalkcom
+from . import adapter_scifistoriescom
## This bit of complexity allows adapters to be added by just adding
## importing. It eliminates the long if/else clauses we used to need
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/adapters/adapter_archiveofourownorg.py
new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/adapters/adapter_archiveofourownorg.py
---
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/adapters/adapter_archiveofourownorg.py
2020-03-31 21:49:51.000000000 +0200
+++
new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/adapters/adapter_archiveofourownorg.py
2020-04-04 17:12:02.000000000 +0200
@@ -44,6 +44,7 @@
self.username = "NoneGiven" # if left empty, site doesn't return any
message at all.
self.password = ""
self.is_adult=False
+ self.addurl = ""
self.full_work_soup = None
self.full_work_chapters = None
@@ -94,7 +95,7 @@
def getSiteURLPattern(self):
#
https://archiveofourown.org/collections/Smallville_Slash_Archive/works/159770
# Discard leading zeros from story ID numbers--AO3 doesn't use them in
it's own chapter URLs.
- logger.debug(r"https?://" + r"|".join([x.replace('.','\.') for x in
self.getAcceptDomains()]) + r"(/collections/[^/]+)?/works/0*(?P<id>\d+)")
+ # logger.debug(r"https?://" + r"|".join([x.replace('.','\.') for x in
self.getAcceptDomains()]) + r"(/collections/[^/]+)?/works/0*(?P<id>\d+)")
return r"https?://(" + r"|".join([x.replace('.','\.') for x in
self.getAcceptDomains()]) + r")(/collections/[^/]+)?/works/0*(?P<id>\d+)"
# The certificate is only valid for the following names:
@@ -154,12 +155,12 @@
def extractChapterUrlsAndMetadata(self):
if self.is_adult or self.getConfig("is_adult"):
- addurl = "?view_adult=true"
+ self.addurl = "?view_adult=true"
else:
- addurl=""
+ self.addurl=""
- metaurl = self.url+addurl
- url = self.url+'/navigate'+addurl
+ metaurl = self.url+self.addurl
+ url = self.url+'/navigate'+self.addurl
logger.info("url: "+url)
logger.info("metaurl: "+metaurl)
@@ -168,7 +169,15 @@
meta = self._fetchUrl(metaurl)
if "This work could have adult content. If you proceed you have
agreed that you are willing to see such content." in meta:
- raise exceptions.AdultCheckRequired(self.url)
+ if self.addurl:
+ ## "?view_adult=true" doesn't work on base story
+ ## URL anymore, which means we have to
+ metasoup = self.make_soup(meta)
+ a = metasoup.find('a',text='Proceed')
+ metaurl = 'https://'+self.host+a['href']
+ meta = self._fetchUrl(metaurl)
+ else:
+ raise exceptions.AdultCheckRequired(self.url)
except HTTPError as e:
if e.code == 404:
@@ -422,7 +431,7 @@
logger.debug("USE view_full_work")
## Assumed view_adult=true was cookied during metadata
if not self.full_work_soup:
- self.full_work_soup =
self.make_soup(self._fetchUrl(self.url+"?view_full_work=true"))
+ self.full_work_soup =
self.make_soup(self._fetchUrl(self.url+"?view_full_work=true"+self.addurl.replace('?','&')))
## AO3 has had several cases now where chapter numbers
## are missing, breaking the link between
## <div id=chapter-##> and Chapter ##.
@@ -439,7 +448,7 @@
if whole_dl_soup:
chapter_dl_soup = self.full_work_chapters[index]
else:
- whole_dl_soup = chapter_dl_soup =
self.make_soup(self._fetchUrl(url))
+ whole_dl_soup = chapter_dl_soup =
self.make_soup(self._fetchUrl(url+self.addurl))
if None == chapter_dl_soup:
raise exceptions.FailedToDownload("Error downloading Chapter:
%s! Missing required element!" % url)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/adapters/adapter_scifistoriescom.py
new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/adapters/adapter_scifistoriescom.py
---
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/adapters/adapter_scifistoriescom.py
1970-01-01 01:00:00.000000000 +0100
+++
new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/adapters/adapter_scifistoriescom.py
2020-04-04 17:12:02.000000000 +0200
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+
+# Copyright 2013 Fanficdownloader team, 2020 FanFicFare team
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+from __future__ import absolute_import
+import logging
+logger = logging.getLogger(__name__)
+
+# py2 vs py3 transition
+from ..six import text_type as unicode
+
+from .adapter_finestoriescom import FineStoriesComAdapter
+
+def getClass():
+ return SciFiStoriesComAdapter
+
+# Class name has to be unique. Our convention is camel case the
+# sitename with Adapter at the end. www is skipped.
+class SciFiStoriesComAdapter(FineStoriesComAdapter):
+
+ @classmethod
+ def getSiteAbbrev(cls):
+ return 'sfst'
+
+ @staticmethod # must be @staticmethod, don't remove it.
+ def getSiteDomain():
+ # The site domain. Does have www here, if it uses it.
+ return 'scifistories.com'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/adapters/adapter_tenhawkpresents.py
new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/adapters/adapter_tenhawkpresents.py
---
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/adapters/adapter_tenhawkpresents.py
1970-01-01 01:00:00.000000000 +0100
+++
new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/adapters/adapter_tenhawkpresents.py
2020-04-04 17:12:02.000000000 +0200
@@ -0,0 +1,252 @@
+# -*- coding: utf-8 -*-
+
+# Copyright 2011 Fanficdownloader team, 2018 FanFicFare team
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Software: eFiction
+from __future__ import absolute_import
+import logging
+logger = logging.getLogger(__name__)
+import re
+import urllib
+from ..htmlcleanup import stripHTML
+from .. import exceptions as exceptions
+
+# py2 vs py3 transition
+from ..six import text_type as unicode
+from ..six.moves.urllib.error import HTTPError
+
+from .base_adapter import BaseSiteAdapter, makeDate
+
+class TenhawkPresentsSiteAdapter(BaseSiteAdapter):
+
+ def __init__(self, config, url):
+ BaseSiteAdapter.__init__(self, config, url)
+ self.story.setMetadata('siteabbrev','thpi')
+ self.username = "NoneGiven" # if left empty, site doesn't return any
message at all.
+ self.password = ""
+ self.is_adult=False
+
+ # get storyId from url--url validation guarantees query is only
sid=1234
+ self.story.setMetadata('storyId',self.parsedUrl.query.split('=',)[1])
+
+
+ # normalized story URL.
+ self._setURL('http://' + self.getSiteDomain() +
'/viewstory.php?sid='+self.story.getMetadata('storyId'))
+ self.dateformat = "%b %d %Y"
+
+
+ @staticmethod
+ def getSiteDomain():
+ return 'fanfic.tenhawkpresents.ink'
+
+ @classmethod
+ def getSiteExampleURLs(cls):
+ return "http://"+cls.getSiteDomain()+"/viewstory.php?sid=1234"
+
+ def getSiteURLPattern(self):
+ # accept https, but don't use it--site SSL is broken.
+ return
r"https?:"+re.escape("//"+self.getSiteDomain()+"/viewstory.php?sid=")+r"\d+$"
+
+ def use_pagecache(self):
+ '''
+ adapters that will work with the page cache need to implement
+ this and change it to True.
+ '''
+ return True
+
+ def needToLoginCheck(self, data):
+ if 'Registered Users Only' in data \
+ or 'There is no such account on our website' in data \
+ or "That password doesn't match the one in our database" in
data:
+ return True
+ else:
+ return False
+
+ def performLogin(self, url):
+ params = {}
+
+ if self.password:
+ params['penname'] = self.username
+ params['password'] = self.password
+ else:
+ params['penname'] = self.getConfig("username")
+ params['password'] = self.getConfig("password")
+ params['cookiecheck'] = '1'
+ params['submit'] = 'Submit'
+
+ loginUrl = 'http://' + self.getSiteDomain() + '/user.php?action=login'
+ logger.debug("Will now login to URL (%s) as (%s)" % (loginUrl,
+
params['penname']))
+
+ d = self._fetchUrl(loginUrl, params)
+
+ if "Member Account" not in d : #Member Account
+ logger.info("Failed to login to URL %s as %s" % (loginUrl,
+
params['penname']))
+ raise exceptions.FailedToLogin(url,params['penname'])
+ return False
+ else:
+ return True
+
+ def extractChapterUrlsAndMetadata(self):
+
+ if self.is_adult or self.getConfig("is_adult"):
+ addurl = "&ageconsent=ok&warning=3"
+ else:
+ addurl=""
+
+ url = self.url+'&index=1'+addurl
+ logger.debug("URL: "+url)
+
+ try:
+ data = self._fetchUrl(url)
+ except HTTPError as e:
+ if e.code == 404:
+ raise exceptions.StoryDoesNotExist(self.url)
+ else:
+ raise e
+
+ if self.needToLoginCheck(data):
+ # need to log in for this one.
+ addurl = "&ageconsent=ok&warning=4"
+ url = self.url+'&index=1'+addurl
+ logger.debug("Changing URL: "+url)
+ self.performLogin(url)
+ data = self._fetchUrl(url,usecache=False)
+
+ if "This story contains mature content which may include violence,
sexual situations, and coarse language" in data:
+ raise exceptions.AdultCheckRequired(self.url)
+
+ if "Access denied. This story has not been validated by the
adminstrators of this site." in data:
+ raise exceptions.AccessDenied(self.getSiteDomain() +" says: Access
denied. This story has not been validated by the adminstrators of this site.")
+
+ # use BeautifulSoup HTML parser to make everything easier to find.
+ soup = self.make_soup(data)
+
+ ## Title
+ a = soup.find('a',
href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')))
+ self.story.setMetadata('title',stripHTML(a))
+
+ # Find authorid and URL from... author url.
+ a = soup.find('a', href=re.compile(r"viewuser.php\?uid=\d+"))
+ self.story.setMetadata('authorId',a['href'].split('=')[1])
+ self.story.setMetadata('authorUrl','http://'+self.host+'/'+a['href'])
+ self.story.setMetadata('author',a.string)
+
+ # Find the chapters:
+ for chapter in soup.findAll('a',
href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')+"&chapter=\d+$")):
+ # just in case there's tags, like <i> in chapter titles.
+
self.add_chapter(chapter,'http://'+self.host+'/'+chapter['href']+addurl)
+
+
+ def defaultGetattr(d,k):
+ try:
+ return d[k]
+ except:
+ return ""
+
+ # <span class="label">Rated:</span> NC-17<br /> etc
+ labels = soup.findAll('span',{'class':'label'})
+ for labelspan in labels:
+ value = labelspan.nextSibling
+ label = labelspan.string
+
+ if 'Summary' in label:
+ ## Everything until the next span class='label'
+ svalue = ""
+ while 'label' not in defaultGetattr(value,'class'):
+ svalue += unicode(value)
+ value = value.nextSibling
+ self.setDescription(url,svalue)
+ #self.story.setMetadata('description',stripHTML(svalue))
+
+ if 'Rated' in label:
+ self.story.setMetadata('rating', value)
+
+ if 'Word count' in label:
+ self.story.setMetadata('numWords', value)
+
+ if 'Categories' in label:
+ cats =
labelspan.parent.findAll('a',href=re.compile(r'browse.php\?type=categories'))
+ catstext = [cat.string for cat in cats]
+ for cat in catstext:
+ self.story.addToList('category',cat.string)
+
+ if 'Characters' in label:
+ chars =
labelspan.parent.findAll('a',href=re.compile(r'browse.php\?type=characters'))
+ charstext = [char.string for char in chars]
+ for char in charstext:
+ self.story.addToList('characters',char.string)
+
+ if 'Genre' in label:
+ genres =
labelspan.parent.findAll('a',href=re.compile(r'browse.php\?type=class'))
+ genrestext = [genre.string for genre in genres]
+ self.genre = ', '.join(genrestext)
+ for genre in genrestext:
+ self.story.addToList('genre',genre.string)
+
+ if 'Completed' in label:
+ if 'Yes' in value:
+ self.story.setMetadata('status', 'Completed')
+ else:
+ self.story.setMetadata('status', 'In-Progress')
+
+ if 'Published' in label:
+ self.story.setMetadata('datePublished',
makeDate(stripHTML(value), self.dateformat))
+
+ if 'Updated' in label:
+ # there's a stray [ at the end.
+ #value = value[0:-1]
+ self.story.setMetadata('dateUpdated',
makeDate(stripHTML(value), self.dateformat))
+
+ try:
+ # Find Series name from series URL.
+ a = soup.find('a',
href=re.compile(r"viewseries.php\?seriesid=\d+"))
+ series_name = a.string
+ series_url = 'http://'+self.host+'/'+a['href']
+
+ # use BeautifulSoup HTML parser to make everything easier to find.
+ seriessoup = self.make_soup(self._fetchUrl(series_url))
+ storyas = seriessoup.findAll('a',
href=re.compile(r'^viewstory.php\?sid=\d+$'))
+ i=1
+ for a in storyas:
+ if a['href'] ==
('viewstory.php?sid='+self.story.getMetadata('storyId')):
+ self.setSeries(series_name, i)
+ self.story.setMetadata('seriesUrl',series_url)
+ break
+ i+=1
+
+ except:
+ # I find it hard to care if the series parsing fails
+ pass
+
+
+ def getChapterText(self, url):
+
+ logger.debug('Getting chapter text from: %s' % url)
+
+ soup = self.make_soup(self._fetchUrl(url))
+
+ span = soup.find('div', {'id' : 'story'})
+
+ if None == span:
+ raise exceptions.FailedToDownload("Error downloading Chapter: %s!
Missing required element!" % url)
+
+ return self.utf8FromSoup(url,span)
+
+def getClass():
+ return TenhawkPresentsSiteAdapter
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/cli.py
new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/cli.py
--- old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/cli.py
2020-03-31 21:49:51.000000000 +0200
+++ new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/cli.py
2020-04-04 17:12:02.000000000 +0200
@@ -40,7 +40,7 @@
def pickle_load(f):
return pickle.load(f,encoding="bytes")
-version="3.17.7"
+version="3.18.1"
os.environ['CURRENT_VERSION_ID']=version
global_cache = 'global_cache'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/defaults.ini
new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/defaults.ini
--- old/FanFicFare-3.17.0+git.1585684191.22d2ad45/fanficfare/defaults.ini
2020-03-31 21:49:51.000000000 +0200
+++ new/FanFicFare-3.18.1+git.1586013122.54f843ec/fanficfare/defaults.ini
2020-04-04 17:12:02.000000000 +0200
@@ -1639,6 +1639,16 @@
website_encodings:Windows-1252,utf8
+[fanfic.tenhawkpresents.ink]
+## Some sites require login (or login for some rated stories) The
+## program can prompt you, or you can save it in config. In
+## commandline version, this should go in your personal.ini, not
+## defaults.ini.
+#username:YourName
+#password:yourpassword
+
+website_encodings:Windows-1252,utf8
+
[fanficauthors.net]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
@@ -2124,6 +2134,77 @@
website_encodings:Windows-1252,utf8
+[scifistories.com:epub]
+## This is a workaround to replace truncated chapter titles present in
+## chapter list. Uncomment this to remove the usual, shorter chapter
+## title in the chapter files only. See inject_chapter_title below.
+#chapter_start:<?xml version="1.0" encoding="UTF-8"?>
+# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+# <html xmlns="http://www.w3.org/1999/xhtml">
+# <head>
+# <title>${chapter}</title>
+# <link href="stylesheet.css" type="text/css" charset="UTF-8"
rel="stylesheet"/>
+# <meta name="chapterurl" content="${url}"></meta>
+# <meta name="chapterorigtitle" content="${origchapter}"></meta>
+# <meta name="chaptertoctitle" content="${tocchapter}"></meta>
+# <meta name="chaptertitle" content="${chapter}"></meta>
+# </head>
+# <body>
+
+[scifistories.com]
+## Some sites require login (or login for some rated stories) The
+## program can prompt you, or you can save it in config. In
+## commandline version, this should go in your personal.ini, not
+## defaults.ini.
+## scifistories.com has started requiring login by email rather than
+## pen name.
+#username:[email protected]
+#password:yourpassword
+
+## dateUpdated/datePublished don't usually have time, but they do on this site.
+## http://docs.python.org/library/datetime.html#strftime-strptime-behavior
+## Note that ini format requires % to be escaped as %%.
+dateUpdated_format:%%Y-%%m-%%d %%H:%%M:%%S
+datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S
+
+## Clear FanFiction from defaults, site is original fiction.
+extratags:
+
+extra_valid_entries:size,universe,universeUrl,universeHTML,sitetags,notice,codes,score
+#extra_titlepage_entries:size,universeHTML,sitetags,notice,score
+include_in_codes:sitetags
+
+## adds to include_subject_tags instead of replacing it.
+#extra_subject_tags:sitetags
+
+size_label:Size
+universe_label:Universe
+universeUrl_label:Universe URL
+universeHTML_label:Universe
+sitetags_label:Site Tags
+notice_label:Notice
+score_label:Score
+
+## Assume entryUrl, apply to "<a class='%slink' href='%s'>%s</a>" to
+## make entryHTML.
+make_linkhtml_entries:universe
+
+## scifistories.com stories can be in a series and/or a universe. By
+## default, series will be populated with the universe if there is
+## universe but not series.
+universe_as_series: true
+
+## some sites include images that we don't ever want becoming the
+## cover image. This lets you exclude them.
+cover_exclusion_regexp:/css/bir.png
+
+## This site uses shortened title chapters in chapter lists. When set
+## true, this will inject the site's full length chapter title into
+## the chapter text. Typically will be used with chapter_start to
+## remove the standard chapter title, as shown above in
+## [scifistories.com:epub].
+#inject_chapter_title:false
+
[sheppardweir.com]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/FanFicFare-3.17.0+git.1585684191.22d2ad45/setup.py
new/FanFicFare-3.18.1+git.1586013122.54f843ec/setup.py
--- old/FanFicFare-3.17.0+git.1585684191.22d2ad45/setup.py 2020-03-31
21:49:51.000000000 +0200
+++ new/FanFicFare-3.18.1+git.1586013122.54f843ec/setup.py 2020-04-04
17:12:02.000000000 +0200
@@ -27,7 +27,7 @@
name=package_name,
# Versions should comply with PEP440.
- version="3.17.7",
+ version="3.18.1",
description='A tool for downloading fanfiction to eBook formats',
long_description=long_description,
++++++ _service ++++++
--- /var/tmp/diff_new_pack.8j6P4F/_old 2020-04-05 20:55:20.685301053 +0200
+++ /var/tmp/diff_new_pack.8j6P4F/_new 2020-04-05 20:55:20.685301053 +0200
@@ -1,6 +1,6 @@
<services>
<service mode="disabled" name="tar_scm">
- <param name="versionprefix">3.17.0+git</param>
+ <param name="versionprefix">3.18.1+git</param>
<param name="url">https://github.com/JimmXinu/FanFicFare.git</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.8j6P4F/_old 2020-04-05 20:55:20.705301074 +0200
+++ /var/tmp/diff_new_pack.8j6P4F/_new 2020-04-05 20:55:20.705301074 +0200
@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/JimmXinu/FanFicFare.git</param>
- <param
name="changesrevision">22d2ad4564f50d9949aae1ebc10a6939a75e8d9b</param></service></servicedata>
\ No newline at end of file
+ <param
name="changesrevision">54f843ec061d1760b994f081936384ccd84b9162</param></service></servicedata>
\ No newline at end of file