Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-fanficfare for openSUSE:Factory checked in at 2022-08-21 14:11:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-fanficfare (Old) and /work/SRC/openSUSE:Factory/.python-fanficfare.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-fanficfare" Sun Aug 21 14:11:05 2022 rev:42 rq:998406 version:4.15.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-fanficfare/python-fanficfare.changes 2022-08-07 18:34:14.337206777 +0200 +++ /work/SRC/openSUSE:Factory/.python-fanficfare.new.2083/python-fanficfare.changes 2022-08-21 14:11:11.310460246 +0200 @@ -1,0 +2,11 @@ +Sat Aug 20 07:27:45 UTC 2022 - Matej Cepl <mc...@suse.com> + +- Update to 4.15.0: + - adapter_adultfanfictionorg: http->https + - Fix for win10/qt6 progbar not displaying initially. + - Add get_section_url() for adapter_royalroadcom for longer story URL [sections] + - adapter_storiesonlinenet: Single chapter stories slightly + different. Also scifistories and finestories. + - Use cal6 icon theme system to allow plugin icon customization. + +------------------------------------------------------------------- Old: ---- FanFicFare-4.14.3.tar.gz New: ---- FanFicFare-4.15.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-fanficfare.spec ++++++ --- /var/tmp/diff_new_pack.qmiQ94/_old 2022-08-21 14:11:11.946461999 +0200 +++ /var/tmp/diff_new_pack.qmiQ94/_new 2022-08-21 14:11:11.950462010 +0200 @@ -21,7 +21,7 @@ %define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-fanficfare -Version: 4.14.3 +Version: 4.15.0 Release: 0 Summary: Tool for making eBooks from stories on fanfiction and other web sites License: GPL-3.0-only @@ -34,8 +34,10 @@ BuildRequires: %{python_module cloudscraper} BuildRequires: %{python_module html2text} BuildRequires: %{python_module html5lib} +BuildRequires: %{python_module pip} BuildRequires: %{python_module requests-file} BuildRequires: %{python_module setuptools >= 17.1} +BuildRequires: %{python_module wheel} BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -71,10 +73,10 @@ dos2unix DESCRIPTION.rst README.md %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/%{modnamedown} %python_expand %fdupes %{buildroot}%{$python_sitelib} ++++++ FanFicFare-4.14.3.tar.gz -> FanFicFare-4.15.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/calibre-plugin/__init__.py new/FanFicFare-4.15.0/calibre-plugin/__init__.py --- old/FanFicFare-4.14.3/calibre-plugin/__init__.py 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/calibre-plugin/__init__.py 2022-08-11 23:12:23.000000000 +0200 @@ -33,7 +33,7 @@ from calibre.customize import InterfaceActionBase # pulled out from FanFicFareBase for saving in prefs.py -__version__ = (4, 14, 3) +__version__ = (4, 15, 0) ## 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-4.14.3/calibre-plugin/common_utils.py new/FanFicFare-4.15.0/calibre-plugin/common_utils.py --- old/FanFicFare-4.14.3/calibre-plugin/common_utils.py 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/calibre-plugin/common_utils.py 2022-08-11 23:12:23.000000000 +0200 @@ -15,6 +15,7 @@ QVBoxLayout, QDialogButtonBox, QStyledItemDelegate, QDateTime, QTextEdit, QListWidget, QAbstractItemView, QCursor) +from calibre.constants import numeric_version as calibre_version from calibre.constants import iswindows, DEBUG from calibre.gui2 import UNDEFINED_QDATETIME, gprefs, info_dialog from calibre.gui2.actions import menu_action_unique_name @@ -40,8 +41,41 @@ plugin_name = name plugin_icon_resources = resources +# print_tracebacks_for_missing_resources first appears in cal 6.2.0 +if calibre_version >= (6,2,0): + def get_icons_nolog(icon_name,plugin_name): + return get_icons(icon_name, + plugin_name, + print_tracebacks_for_missing_resources=False) +else: + get_icons_nolog = get_icons -def get_icon(icon_name): +def get_icon_6plus(icon_name): + ''' + Retrieve a QIcon for the named image from + 1. Calibre's image cache + 2. resources/images + 3. the icon theme + 4. the plugin zip + Only plugin zip has images/ in the image name for backward + compatibility. + ''' + icon = None + if icon_name: + icon = QIcon.ic(icon_name) + ## both .ic and get_icons return an empty QIcon if not found. + if not icon or icon.isNull(): + # don't need a tracestack from get_icons just because + # there's no icon in the theme + icon = get_icons_nolog(icon_name.replace('images/',''), + plugin_name) + if not icon or icon.isNull(): + icon = get_icons(icon_name,plugin_name) + if not icon: + icon = QIcon() + return icon + +def get_icon_old(icon_name): ''' Retrieve a QIcon for the named image from the zip file if it exists, or if not then from Calibre's image cache. @@ -55,6 +89,11 @@ return QIcon(pixmap) return QIcon() +# get_icons changed in Cal6. +if calibre_version >= (6,0,0): + get_icon = get_icon_6plus +else: + get_icon = get_icon_old def get_pixmap(icon_name): ''' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/calibre-plugin/dialogs.py new/FanFicFare-4.15.0/calibre-plugin/dialogs.py --- old/FanFicFare-4.14.3/calibre-plugin/dialogs.py 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/calibre-plugin/dialogs.py 2022-08-11 23:12:23.000000000 +0200 @@ -662,7 +662,6 @@ self.status_prefix = status_prefix self.i = 0 self.start_time = datetime.now() - self.first = True # can't import at file load. from calibre_plugins.fanficfare_plugin.prefs import prefs @@ -673,7 +672,9 @@ ## self.do_loop does QTimer.singleShot on self.do_loop also. ## A weird way to do a loop, but that was the example I had. - QTimer.singleShot(0, self.do_loop) + ## 100 instead of 0 on the first go due to Win10(and later + ## qt6) not displaying dialog properly. + QTimer.singleShot(100, self.do_loop) self.exec_() def updateStatus(self): @@ -689,15 +690,6 @@ def do_loop(self): - if self.first: - ## Windows 10 doesn't want to show the prog dialog content - ## until after the timer's been called again. Something to - ## do with cooperative multi threading maybe? - ## So this just trips the timer loop an extra time at the start. - self.first = False - QTimer.singleShot(0, self.do_loop) - return - book = self.book_list[self.i] try: ## collision spec passed into getadapter by partial from fff_plugin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/calibre-plugin/fff_plugin.py new/FanFicFare-4.15.0/calibre-plugin/fff_plugin.py --- old/FanFicFare-4.14.3/calibre-plugin/fff_plugin.py 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/calibre-plugin/fff_plugin.py 2022-08-11 23:12:23.000000000 +0200 @@ -164,16 +164,14 @@ base = self.interface_action_base_plugin self.version = base.name+" v%d.%d.%d"%base.version - # Set the icon for this interface action - # The get_icons function is a builtin function defined for all your - # plugin code. It loads icons from the plugin zip file. It returns - # QIcon objects, if you want the actual data, use the analogous - # get_resources builtin function. - - # Note that if you are loading more than one icon, for performance, you - # should pass a list of names to get_icons. In this case, get_icons - # will return a dictionary mapping names to QIcons. Names that - # are not found in the zip file will result in null QIcons. + # Set the icon for this interface action. + # We use our own get_icon, originally inherited from kiwidude, + # later extended to allow new cal6 theming of plugins. + # For theme creators, use: + # FanFicFare/images/icon.png + # (optionally) + # FanFicFare/images/icon-for-dark-theme.png + # FanFicFare/images/icon-for-light-theme.png icon = get_icon('images/icon.png') self.qaction.setText(_('FanFicFare')) Binary files old/FanFicFare-4.14.3/calibre-plugin/images/old icon.png and new/FanFicFare-4.15.0/calibre-plugin/images/old icon.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/calibre-plugin/plugin-defaults.ini new/FanFicFare-4.15.0/calibre-plugin/plugin-defaults.ini --- old/FanFicFare-4.14.3/calibre-plugin/plugin-defaults.ini 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/calibre-plugin/plugin-defaults.ini 2022-08-11 23:12:23.000000000 +0200 @@ -2000,6 +2000,7 @@ #password:yourpassword [finestories.com] +use_basic_cache:true ## 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 @@ -2360,6 +2361,7 @@ website_encodings:Windows-1252,utf8 [scifistories.com] +use_basic_cache:true ## 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/calibre-plugin/translations/ca.po new/FanFicFare-4.15.0/calibre-plugin/translations/ca.po --- old/FanFicFare-4.14.3/calibre-plugin/translations/ca.po 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/calibre-plugin/translations/ca.po 2022-08-11 23:12:23.000000000 +0200 @@ -5,13 +5,13 @@ # Adolfo Jayme-Barrientos, 2014 # Joan Montan??, 2014 # Queralt Iglesias <queralt.i...@gmail.com>, 2016 -# Robert Antoni Buj Gelonch <r...@fedoraproject.org>, 2016-2017 +# Robert Antoni Buj i Gelonch <r...@fedoraproject.org>, 2016-2017 msgid "" msgstr "" "Project-Id-Version: calibre-plugins\n" "POT-Creation-Date: 2022-07-06 11:14-0500\n" "PO-Revision-Date: 2014-06-19 22:55+0000\n" -"Last-Translator: Robert Antoni Buj Gelonch <r...@fedoraproject.org>, 2016-2017\n" +"Last-Translator: Robert Antoni Buj i Gelonch <r...@fedoraproject.org>, 2016-2017\n" "Language-Team: Catalan (http://www.transifex.com/calibre/calibre-plugins/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/fanficfare/adapters/adapter_adultfanfictionorg.py new/FanFicFare-4.15.0/fanficfare/adapters/adapter_adultfanfictionorg.py --- old/FanFicFare-4.14.3/fanficfare/adapters/adapter_adultfanfictionorg.py 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/fanficfare/adapters/adapter_adultfanfictionorg.py 2022-08-11 23:12:23.000000000 +0200 @@ -57,8 +57,8 @@ # normalized story URL.(checking self.zone against list # removed--it was redundant w/getAcceptDomains and # getSiteURLPattern both) - self._setURL('http://{0}.{1}/story.php?no={2}'.format(self.zone, self.getBaseDomain(), self.story.getMetadata('storyId'))) - #self._setURL('http://' + self.zone + '.' + self.getBaseDomain() + '/story.php?no='+self.story.getMetadata('storyId')) + self._setURL('https://{0}.{1}/story.php?no={2}'.format(self.zone, self.getBaseDomain(), self.story.getMetadata('storyId'))) + #self._setURL('https://' + self.zone + '.' + self.getBaseDomain() + '/story.php?no='+self.story.getMetadata('storyId')) # Each adapter needs to have a unique site abbreviation. #self.story.setMetadata('siteabbrev',self.getSiteAbbrev()) @@ -113,31 +113,31 @@ @classmethod def getSiteExampleURLs(self): - return ("http://anime.adult-fanfiction.org/story.php?no=123456789 " - + "http://anime2.adult-fanfiction.org/story.php?no=123456789 " - + "http://bleach.adult-fanfiction.org/story.php?no=123456789 " - + "http://books.adult-fanfiction.org/story.php?no=123456789 " - + "http://buffy.adult-fanfiction.org/story.php?no=123456789 " - + "http://cartoon.adult-fanfiction.org/story.php?no=123456789 " - + "http://celeb.adult-fanfiction.org/story.php?no=123456789 " - + "http://comics.adult-fanfiction.org/story.php?no=123456789 " - + "http://ff.adult-fanfiction.org/story.php?no=123456789 " - + "http://games.adult-fanfiction.org/story.php?no=123456789 " - + "http://hp.adult-fanfiction.org/story.php?no=123456789 " - + "http://inu.adult-fanfiction.org/story.php?no=123456789 " - + "http://lotr.adult-fanfiction.org/story.php?no=123456789 " - + "http://manga.adult-fanfiction.org/story.php?no=123456789 " - + "http://movies.adult-fanfiction.org/story.php?no=123456789 " - + "http://naruto.adult-fanfiction.org/story.php?no=123456789 " - + "http://ne.adult-fanfiction.org/story.php?no=123456789 " - + "http://original.adult-fanfiction.org/story.php?no=123456789 " - + "http://tv.adult-fanfiction.org/story.php?no=123456789 " - + "http://xmen.adult-fanfiction.org/story.php?no=123456789 " - + "http://ygo.adult-fanfiction.org/story.php?no=123456789 " - + "http://yuyu.adult-fanfiction.org/story.php?no=123456789") + return ("https://anime.adult-fanfiction.org/story.php?no=123456789 " + + "https://anime2.adult-fanfiction.org/story.php?no=123456789 " + + "https://bleach.adult-fanfiction.org/story.php?no=123456789 " + + "https://books.adult-fanfiction.org/story.php?no=123456789 " + + "https://buffy.adult-fanfiction.org/story.php?no=123456789 " + + "https://cartoon.adult-fanfiction.org/story.php?no=123456789 " + + "https://celeb.adult-fanfiction.org/story.php?no=123456789 " + + "https://comics.adult-fanfiction.org/story.php?no=123456789 " + + "https://ff.adult-fanfiction.org/story.php?no=123456789 " + + "https://games.adult-fanfiction.org/story.php?no=123456789 " + + "https://hp.adult-fanfiction.org/story.php?no=123456789 " + + "https://inu.adult-fanfiction.org/story.php?no=123456789 " + + "https://lotr.adult-fanfiction.org/story.php?no=123456789 " + + "https://manga.adult-fanfiction.org/story.php?no=123456789 " + + "https://movies.adult-fanfiction.org/story.php?no=123456789 " + + "https://naruto.adult-fanfiction.org/story.php?no=123456789 " + + "https://ne.adult-fanfiction.org/story.php?no=123456789 " + + "https://original.adult-fanfiction.org/story.php?no=123456789 " + + "https://tv.adult-fanfiction.org/story.php?no=123456789 " + + "https://xmen.adult-fanfiction.org/story.php?no=123456789 " + + "https://ygo.adult-fanfiction.org/story.php?no=123456789 " + + "https://yuyu.adult-fanfiction.org/story.php?no=123456789") def getSiteURLPattern(self): - return r'http?://(anime|anime2|bleach|books|buffy|cartoon|celeb|comics|ff|games|hp|inu|lotr|manga|movies|naruto|ne|original|tv|xmen|ygo|yuyu)\.adult-fanfiction\.org/story\.php\?no=\d+$' + return r'https?://(anime|anime2|bleach|books|buffy|cartoon|celeb|comics|ff|games|hp|inu|lotr|manga|movies|naruto|ne|original|tv|xmen|ygo|yuyu)\.adult-fanfiction\.org/story\.php\?no=\d+$' ##This is not working right now, so I'm commenting it out, but leaving it for future testing ## Login seems to be reasonably standard across eFiction sites. @@ -229,7 +229,7 @@ # but I posit that if the story is there, even if we can't get the metadata from the # author page, the story should still be able to be downloaded, which is what I've done here. self.story.setMetadata('authorId','000000000') - self.story.setMetadata('authorUrl','http://www.adult-fanfiction.org') + self.story.setMetadata('authorUrl','https://www.adult-fanfiction.org') self.story.setMetadata('author','Unknown') logger.warning('There was no author found for the story... Metadata will not be retreived.') self.setDescription(url,'>>>>>>>>>> No Summary Given <<<<<<<<<<') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/fanficfare/adapters/adapter_royalroadcom.py new/FanFicFare-4.15.0/fanficfare/adapters/adapter_royalroadcom.py --- old/FanFicFare-4.14.3/fanficfare/adapters/adapter_royalroadcom.py 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/fanficfare/adapters/adapter_royalroadcom.py 2022-08-11 23:12:23.000000000 +0200 @@ -90,6 +90,17 @@ def getSiteExampleURLs(cls): return "https://www.royalroad.com/fiction/3056" + @classmethod + def get_section_url(cls,url): + ## minimal URL used for section names in INI and reject list + ## for comparison + # logger.debug("pre--url:%s"%url) + # https://www.royalroad.com/fiction/36051/memories-of-the-fall + # https://www.royalroad.com/fiction/36051 + url = re.sub(r'^https?://(.*/fiction/\d+).*$',r'https://\1',url) + # logger.debug("post-url:%s"%url) + return url + def getSiteURLPattern(self): return "https?"+re.escape("://")+r"(www\.|)royalroadl?\.com/fiction/\d+(/.*)?$" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/fanficfare/adapters/adapter_scifistoriescom.py new/FanFicFare-4.15.0/fanficfare/adapters/adapter_scifistoriescom.py --- old/FanFicFare-4.14.3/fanficfare/adapters/adapter_scifistoriescom.py 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/fanficfare/adapters/adapter_scifistoriescom.py 2022-08-11 23:12:23.000000000 +0200 @@ -21,14 +21,14 @@ # py2 vs py3 transition -from .adapter_finestoriescom import FineStoriesComAdapter +from .adapter_storiesonlinenet import StoriesOnlineNetAdapter 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): +class SciFiStoriesComAdapter(StoriesOnlineNetAdapter): @classmethod def getSiteAbbrev(cls): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/fanficfare/adapters/adapter_storiesonlinenet.py new/FanFicFare-4.15.0/fanficfare/adapters/adapter_storiesonlinenet.py --- old/FanFicFare-4.14.3/fanficfare/adapters/adapter_storiesonlinenet.py 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/fanficfare/adapters/adapter_storiesonlinenet.py 2022-08-11 23:12:23.000000000 +0200 @@ -465,7 +465,10 @@ def getMoreText(self, html): try: story_id = int(re.compile('var story_id=(\d+)').findall(html)[0]) - pid = re.compile('var pid=(\d+)').findall(html)[0] + try: + pid = re.compile('var pid=(\d+)').findall(html)[0] + except: + pid = 'undefined' ci = re.compile("var ci='([^']+)'").findall(html)[0] tto = re.compile("var tto='([^']+)'").findall(html)[0] url = "https://"+self.getSiteDomain()+"/res/responders/tl.php?r="+unicode(random.randint(1, 100001)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/fanficfare/cli.py new/FanFicFare-4.15.0/fanficfare/cli.py --- old/FanFicFare-4.14.3/fanficfare/cli.py 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/fanficfare/cli.py 2022-08-11 23:12:23.000000000 +0200 @@ -28,7 +28,7 @@ import os, sys, platform -version="4.14.3" +version="4.15.0" os.environ['CURRENT_VERSION_ID']=version global_cache = 'global_cache' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/fanficfare/defaults.ini new/FanFicFare-4.15.0/fanficfare/defaults.ini --- old/FanFicFare-4.14.3/fanficfare/defaults.ini 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/fanficfare/defaults.ini 2022-08-11 23:12:23.000000000 +0200 @@ -2022,6 +2022,7 @@ #password:yourpassword [finestories.com] +use_basic_cache:true ## 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 @@ -2382,6 +2383,7 @@ website_encodings:Windows-1252,utf8 [scifistories.com] +use_basic_cache:true ## 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FanFicFare-4.14.3/setup.py new/FanFicFare-4.15.0/setup.py --- old/FanFicFare-4.14.3/setup.py 2022-07-15 17:26:07.000000000 +0200 +++ new/FanFicFare-4.15.0/setup.py 2022-08-11 23:12:23.000000000 +0200 @@ -26,7 +26,7 @@ name=package_name, # Versions should comply with PEP440. - version="4.14.3", + version="4.15.0", description='A tool for downloading fanfiction to eBook formats', long_description=long_description,