From bc233d527a57e5a206ed40536149b07ef3b3daa7 Mon Sep 17 00:00:00 2001
From: Jim Miller
Date: Sun, 20 May 2012 10:42:32 -0500
Subject: [PATCH] Integrate 8 new sites from Ida, plus a couple minor fixes.
---
app.yaml | 2 +-
calibre-plugin/__init__.py | 2 +-
defaults.ini | 80 +++++++++++++++++--
fanficdownloader/adapters/__init__.py | 8 ++
.../adapters/adapter_lumossycophanthexcom.py | 4 +-
.../adapters/adapter_walkingtheplankorg.py | 2 +-
fanficdownloader/exceptions.py | 1 +
index.html | 57 ++++++++++++-
plugin-defaults.ini | 80 +++++++++++++++++--
9 files changed, 214 insertions(+), 22 deletions(-)
diff --git a/app.yaml b/app.yaml
index 49b3efd4..5ffbce47 100644
--- a/app.yaml
+++ b/app.yaml
@@ -1,6 +1,6 @@
# ffd-retief-hrd fanfictiondownloader
application: fanfictiondownloader
-version: 4-4-10
+version: 4-4-11
runtime: python27
api_version: 1
threadsafe: true
diff --git a/calibre-plugin/__init__.py b/calibre-plugin/__init__.py
index cf2778b2..8d7c4f71 100644
--- a/calibre-plugin/__init__.py
+++ b/calibre-plugin/__init__.py
@@ -27,7 +27,7 @@ class FanFictionDownLoaderBase(InterfaceActionBase):
description = 'UI plugin to download FanFiction stories from various sites.'
supported_platforms = ['windows', 'osx', 'linux']
author = 'Jim Miller'
- version = (1, 5, 22)
+ version = (1, 5, 23)
minimum_calibre_version = (0, 8, 30)
#: This field defines the GUI plugin class that contains all the code
diff --git a/defaults.ini b/defaults.ini
index c38fc118..33a621ba 100644
--- a/defaults.ini
+++ b/defaults.ini
@@ -306,6 +306,16 @@ extratags: FanFiction,Testing,Text
[test1.com:html]
extratags: FanFiction,Testing,HTML
+[archive.skyehawke.com]
+
+[ashwinder.sycophanthex.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.
+#username:YourName
+#password:yourpassword
+
[castlefans.org]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
@@ -319,6 +329,39 @@ extratags: FanFiction,Testing,HTML
## personal.ini, not defaults.ini.
#is_adult:true
+[chaos.sycophanthex.com]
+## Some sites do not require a login, but do require the user to
+## confirm they are adult for adult content. In commandline version,
+## this should go in your personal.ini, not defaults.ini.
+#is_adult:true
+
+## some sites include images that we don't ever want becoming the
+## cover image. This lets you exclude them.
+cover_exclusion_regexp:/images/.*?ribbon.gif
+
+[dramione.org]
+## 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
+
+## Some sites also require the user to confirm they are adult for
+## adult content. In commandline version, this should go in your
+## personal.ini, not defaults.ini.
+#is_adult:true
+
+[erosnsappho.sycophanthex.com]
+## Some sites do not require a login, but do require the user to
+## confirm they are adult for adult content. In commandline version,
+## this should go in your personal.ini, not defaults.ini.
+#is_adult:true
+
+## some sites include images that we don't ever want becoming the
+## cover image. This lets you exclude them.
+cover_exclusion_regexp:/images/.*?ribbon.gif
+
[fanfiction.mugglenet.com]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
@@ -346,16 +389,25 @@ extratags: FanFiction,Testing,HTML
#username:YourName
#password:yourpassword
+[lumos.sycophanthex.com]
+## Some sites do not require a login, but do require the user to
+## confirm they are adult for adult content. In commandline version,
+## this should go in your personal.ini, not defaults.ini.
+#is_adult:true
+
[nfacommunity.com]
## Some sites do not require a login, but do require the user to
## confirm they are adult for adult content. In commandline version,
## this should go in your personal.ini, not defaults.ini.
#is_adult:true
-## Some sites also require the user to confirm they are adult for
-## adult content. In commandline version, this should go in your
-## personal.ini, not defaults.ini.
-#is_adult:true
+[occlumency.sycophanthex.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.
+#username:YourName
+#password:yourpassword
[thequidditchpitch.org]
## Some sites require login (or login for some rated stories) The
@@ -377,9 +429,9 @@ extratags: FanFiction,Testing,HTML
#is_adult:true
[www.archiveofourown.org]
-## Some sites also require the user to confirm they are adult for
-## adult content. In commandline version, this should go in your
-## personal.ini, not defaults.ini.
+## Some sites do not require a login, but do require the user to
+## confirm they are adult for adult content. In commandline version,
+## this should go in your personal.ini, not defaults.ini.
#is_adult:true
[www.checkmated.com]
@@ -456,6 +508,14 @@ extratags:
## cover image. This lets you exclude them.
cover_exclusion_regexp:/stories/999/images/.*?_trophy.png
+[www.phoenixsong.net]
+## 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
+
[www.potionsandsnitches.net]
[www.siye.co.uk]
@@ -522,6 +582,12 @@ collect_series: false
## twiwrite.net (ab)uses series as personal reading lists.
collect_series: false
+[www.walkingtheplank.org]
+## Some sites do not require a login, but do require the user to
+## confirm they are adult for adult content. In commandline version,
+## this should go in your personal.ini, not defaults.ini.
+#is_adult:true
+
[www.whofic.com]
[www.wraithbait.com]
diff --git a/fanficdownloader/adapters/__init__.py b/fanficdownloader/adapters/__init__.py
index c534b27f..871a0b08 100644
--- a/fanficdownloader/adapters/__init__.py
+++ b/fanficdownloader/adapters/__init__.py
@@ -56,6 +56,14 @@ import adapter_squidgeorgpeja
import adapter_libraryofmoriacom
import adapter_wraithbaitcom
import adapter_checkmatedcom
+import adapter_chaossycophanthexcom
+import adapter_dramioneorg
+import adapter_erosnsapphosycophanthexcom
+import adapter_lumossycophanthexcom
+import adapter_occlumencysycophanthexcom
+import adapter_phoenixsongnet
+import adapter_walkingtheplankorg
+import adapter_ashwindersycophanthexcom
## 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 --git a/fanficdownloader/adapters/adapter_lumossycophanthexcom.py b/fanficdownloader/adapters/adapter_lumossycophanthexcom.py
index e011b2e9..aa995f75 100644
--- a/fanficdownloader/adapters/adapter_lumossycophanthexcom.py
+++ b/fanficdownloader/adapters/adapter_lumossycophanthexcom.py
@@ -27,11 +27,11 @@ from .. import exceptions as exceptions
from base_adapter import BaseSiteAdapter, makeDate
def getClass():
- return ChaosSycophantHexComAdapter
+ return LumosSycophantHexComAdapter
# Class name has to be unique. Our convention is camel case the
# sitename with Adapter at the end. www is skipped.
-class ChaosSycophantHexComAdapter(BaseSiteAdapter):
+class LumosSycophantHexComAdapter(BaseSiteAdapter):
def __init__(self, config, url):
BaseSiteAdapter.__init__(self, config, url)
diff --git a/fanficdownloader/adapters/adapter_walkingtheplankorg.py b/fanficdownloader/adapters/adapter_walkingtheplankorg.py
index 4b8e5bc5..60784052 100644
--- a/fanficdownloader/adapters/adapter_walkingtheplankorg.py
+++ b/fanficdownloader/adapters/adapter_walkingtheplankorg.py
@@ -48,7 +48,7 @@ class WalkingThePlankOrgAdapter(BaseSiteAdapter):
logging.debug("storyId: (%s)"%self.story.getMetadata('storyId'))
# normalized story URL.
- self._setURL('http://' + self.getSiteDomain() + '/archive//viewstory.php?sid='+self.story.getMetadata('storyId'))
+ self._setURL('http://' + self.getSiteDomain() + '/archive/viewstory.php?sid='+self.story.getMetadata('storyId'))
# Each adapter needs to have a unique site abbreviation.
self.story.setMetadata('siteabbrev','wtp')
diff --git a/fanficdownloader/exceptions.py b/fanficdownloader/exceptions.py
index 8314c26f..525c64e0 100644
--- a/fanficdownloader/exceptions.py
+++ b/fanficdownloader/exceptions.py
@@ -63,6 +63,7 @@ class UnknownSite(Exception):
def __init__(self,url,supported_sites_list):
self.url=url
self.supported_sites_list=supported_sites_list
+ self.supported_sites_list.sort()
def __str__(self):
return "Unknown Site(%s). Supported sites: (%s)" % (self.url, ", ".join(self.supported_sites_list))
diff --git a/index.html b/index.html
index 92fb4db8..3f4bf5fc 100644
--- a/index.html
+++ b/index.html
@@ -54,9 +54,19 @@
much easier.
- New Site
+ More New Sites
- We now support www.checkmated.com, thanks to Ida for adding this!
+ Ida's been busy! We now have support for an additional 8 new sites:
+
+ - ashwinder.sycophanthex.com
+ - chaos.sycophanthex.com
+ - erosnsappho.sycophanthex.com
+ - lumos.sycophanthex.com
+ - occlumency.sycophanthex.com
+ - dramione.org
+ - www.phoenixsong.net
+ - www.walkingtheplank.org
+
Questions? Check out our
@@ -66,7 +76,7 @@
If you have any problems with this application, please
report them in
the FanFictionDownLoader Google Group. The
- Previous Version is also available for you to use if necessary.
+ Previous Version is also available for you to use if necessary.
{{ error_message }}
@@ -312,6 +322,47 @@
Use the URL of the story's first chapter, such as
http://www.checkmated.com/story.php?story=10898.
+
+
ashwinder.sycophanthex.com
+
+ Use the URL of the story's chapter list, such as
+
http://ashwinder.sycophanthex.com/viewstory.php?sid=1234
+
+
chaos.sycophanthex.com
+
+ Use the URL of the story's chapter list, such as
+
http://chaos.sycophanthex.com/viewstory.php?sid=1234
+
+
erosnsappho.sycophanthex.com
+
+ Use the URL of the story's chapter list, such as
+
http://erosnsappho.sycophanthex.com/viewstory.php?sid=1234
+
+
lumos.sycophanthex.com
+
+ Use the URL of the story's chapter list, such as
+
http://lumos.sycophanthex.com/viewstory.php?sid=1234
+
+
occlumency.sycophanthex.com
+
+ Use the URL of the story's chapter list, such as
+
http://erosnsappho.sycophanthex.com/viewstory.php?sid=1234
+
+
dramione.org
+
+ Use the URL of the story's chapter list, such as
+
http://dramione.org/viewstory.php?sid=1234
+
+
www.phoenixsong.net
+
+ Use the URL of any story chapter, such as
+
http://www.phoenixsong.net/fanfiction/story/1234/
+
+
www.walkingtheplank.org
+
+ Use the URL of the story's first chapter, such as
+
http://www.walkingtheplank.org/archive/viewstory.php?sid=1234
+
A few additional things to know, which will make your life substantially easier:
diff --git a/plugin-defaults.ini b/plugin-defaults.ini
index cab7f58d..9788dca3 100644
--- a/plugin-defaults.ini
+++ b/plugin-defaults.ini
@@ -292,6 +292,16 @@ extratags: FanFiction,Testing,Text
[test1.com:html]
extratags: FanFiction,Testing,HTML
+[archive.skyehawke.com]
+
+[ashwinder.sycophanthex.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.
+#username:YourName
+#password:yourpassword
+
[castlefans.org]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
@@ -305,6 +315,39 @@ extratags: FanFiction,Testing,HTML
## personal.ini, not defaults.ini.
#is_adult:true
+[chaos.sycophanthex.com]
+## Some sites do not require a login, but do require the user to
+## confirm they are adult for adult content. In commandline version,
+## this should go in your personal.ini, not defaults.ini.
+#is_adult:true
+
+## some sites include images that we don't ever want becoming the
+## cover image. This lets you exclude them.
+cover_exclusion_regexp:/images/.*?ribbon.gif
+
+[dramione.org]
+## 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
+
+## Some sites also require the user to confirm they are adult for
+## adult content. In commandline version, this should go in your
+## personal.ini, not defaults.ini.
+#is_adult:true
+
+[erosnsappho.sycophanthex.com]
+## Some sites do not require a login, but do require the user to
+## confirm they are adult for adult content. In commandline version,
+## this should go in your personal.ini, not defaults.ini.
+#is_adult:true
+
+## some sites include images that we don't ever want becoming the
+## cover image. This lets you exclude them.
+cover_exclusion_regexp:/images/.*?ribbon.gif
+
[fanfiction.mugglenet.com]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
@@ -332,16 +375,25 @@ extratags: FanFiction,Testing,HTML
#username:YourName
#password:yourpassword
+[lumos.sycophanthex.com]
+## Some sites do not require a login, but do require the user to
+## confirm they are adult for adult content. In commandline version,
+## this should go in your personal.ini, not defaults.ini.
+#is_adult:true
+
[nfacommunity.com]
## Some sites do not require a login, but do require the user to
## confirm they are adult for adult content. In commandline version,
## this should go in your personal.ini, not defaults.ini.
#is_adult:true
-## Some sites also require the user to confirm they are adult for
-## adult content. In commandline version, this should go in your
-## personal.ini, not defaults.ini.
-#is_adult:true
+[occlumency.sycophanthex.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.
+#username:YourName
+#password:yourpassword
[thequidditchpitch.org]
## Some sites require login (or login for some rated stories) The
@@ -363,9 +415,9 @@ extratags: FanFiction,Testing,HTML
#is_adult:true
[www.archiveofourown.org]
-## Some sites also require the user to confirm they are adult for
-## adult content. In commandline version, this should go in your
-## personal.ini, not defaults.ini.
+## Some sites do not require a login, but do require the user to
+## confirm they are adult for adult content. In commandline version,
+## this should go in your personal.ini, not defaults.ini.
#is_adult:true
[www.checkmated.com]
@@ -439,6 +491,14 @@ extratags:
## cover image. This lets you exclude them.
cover_exclusion_regexp:/stories/999/images/.*?_trophy.png
+[www.phoenixsong.net]
+## 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
+
[www.potionsandsnitches.net]
[www.siye.co.uk]
@@ -505,6 +565,12 @@ collect_series: false
## twiwrite.net (ab)uses series as personal reading lists.
collect_series: false
+[www.walkingtheplank.org]
+## Some sites do not require a login, but do require the user to
+## confirm they are adult for adult content. In commandline version,
+## this should go in your personal.ini, not defaults.ini.
+#is_adult:true
+
[www.whofic.com]
[www.wraithbait.com]