Integrate new sites.

This commit is contained in:
Jim Miller 2012-08-23 11:56:33 -05:00
parent 337da79dbc
commit eb969cfe2f
10 changed files with 104 additions and 6 deletions

View file

@ -1,6 +1,6 @@
# ffd-retief-hrd fanfictiondownloader
application: fanfictiondownloader
version: 4-4-22
application: ffd-retief-hrd
version: 4-4-23
runtime: python27
api_version: 1
threadsafe: true

View file

@ -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, 6, 4)
version = (1, 6, 5)
minimum_calibre_version = (0, 8, 57)
#: This field defines the GUI plugin class that contains all the code

View file

@ -220,10 +220,12 @@ class FanFictionDownLoaderPlugin(InterfaceAction):
def create_menu_item_ex(self, parent_menu, menu_text, image=None, tooltip=None,
shortcut=None, triggered=None, is_checked=None, shortcut_name=None,
unique_name=None):
#print("create_menu_item_ex before %s"%unique_name)
ac = create_menu_action_unique(self, parent_menu, menu_text, image, tooltip,
shortcut, triggered, is_checked, shortcut_name, unique_name)
self.actions_unique_map[ac.calibre_shortcut_unique_name] = ac.calibre_shortcut_unique_name
self.menu_actions.append(ac)
#print("create_menu_item_ex after %s"%unique_name)
return ac
def plugin_button(self):

View file

@ -561,6 +561,19 @@ cover_exclusion_regexp:/images/.*?ribbon.gif
## this should go in your personal.ini, not defaults.ini.
#is_adult:true
[www.dracoandginny.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
## 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
[www.thealphagate.com]
[www.checkmated.com]
@ -685,6 +698,12 @@ cover_exclusion_regexp:/stories/999/images/.*?_trophy.png
[www.prisonbreakfic.net]
[www.scarvesandcoffee.net]
## 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.siye.co.uk]
[www.squidge.org/peja]
@ -700,6 +719,14 @@ titlepage_entries: series,category,genre,language,status,datePublished,dateUpdat
[www.storiesofarda.com]
[www.thepetulantpoetess.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
[www.thewriterscoffeeshop.com]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
@ -774,6 +801,8 @@ collect_series: false
## personal.ini, not defaults.ini.
#is_adult:true
[www.wolverineandrogue.com]
[www.wraithbait.com]
## Some sites do not require a login, but do require the user to
## confirm they are adult for adult content. In commandline version,

View file

@ -92,6 +92,10 @@ import adapter_wizardtalesnet
import adapter_nhamagicalworldsus
import adapter_hlfictionnet
import adapter_grangerenchantedcom
import adapter_dracoandginnycom
import adapter_scarvesandcoffeenet
import adapter_thepetulantpoetesscom
import adapter_wolverineandroguecom
## This bit of complexity allows adapters to be added by just adding
## importing. It eliminates the long if/else clauses we used to need

View file

@ -59,6 +59,8 @@ class DracoAndGinnyComAdapter(BaseSiteAdapter):
# the site itself isn't likely to label them as such, so we
# do.
self.story.addToList("category","Harry Potter")
self.story.addToList("characters","Ginny Weasley")
self.story.addToList("characters","Draco Malfoy")
# The date format will vary from site to site.
# http://docs.python.org/library/datetime.html#strftime-strptime-behavior

View file

@ -59,6 +59,8 @@ class ScarvesAndCoffeeNetAdapter(BaseSiteAdapter):
# the site itself isn't likely to label them as such, so we
# do.
self.story.addToList("category","Glee")
self.story.addToList("characters","Kurt Hummel")
self.story.addToList("characters","Blaine Anderson")
# The date format will vary from site to site.
# http://docs.python.org/library/datetime.html#strftime-strptime-behavior

View file

@ -58,8 +58,9 @@ class WolverineAndRogueComAdapter(BaseSiteAdapter):
# If all stories from the site fall into the same category,
# the site itself isn't likely to label them as such, so we
# do.
self.story.addToList("category","Wolverine")
self.story.addToList("category","Rogue")
self.story.addToList("category","X-Men Movie")
self.story.addToList("characters","Wolverine")
self.story.addToList("characters","Rogue")
# The date format will vary from site to site.
# http://docs.python.org/library/datetime.html#strftime-strptime-behavior

View file

@ -54,6 +54,15 @@
much easier. </p>
</div>
<!-- put announcements here, h3 is a good title size. -->
<h3>New Sites</h3>
<p>
Now supporing www.dracoandginny.com,
www.scarvesandcoffee.net, www.thepetulantpoetess.com and
www.wolverineandrogue.com. Thanks, Ida!
</p>
<p>
FFDL now supports over 70 different fanfiction sites.
</p>
<p>
Questions? Check out our
<a href="http://code.google.com/p/fanficdownloader/wiki/FanFictionDownloaderFAQs">FAQs</a>.
@ -62,7 +71,7 @@
If you have any problems with this application, please
report them in
the <a href="http://groups.google.com/group/fanfic-downloader">FanFictionDownLoader Google Group</a>. The
<a href="http://4-4-21.fanfictiondownloader.appspot.com">Previous Version</a> is also available for you to use if necessary.
<a href="http://4-4-22.fanfictiondownloader.appspot.com">Previous Version</a> is also available for you to use if necessary.
</p>
<div id='error'>
{{ error_message }}
@ -499,6 +508,26 @@
Use the URL of the story's chapter list, such as
<br /><a href="http://nha.magical-worlds.us/viewstory.php?sid=1234">http://nha.magical-worlds.us/viewstory.php?sid=1234</a>
</dd>
<dt>www.dracoandginny.com</dt>
<dd>
Use the URL of the story's chapter list, such as
<br /><a href="http://www.dracoandginny.com/viewstory.php?sid=1234">http://www.dracoandginny.com/viewstory.php?sid=1234</a>
</dd>
<dt>www.scarvesandcoffee.net</dt>
<dd>
Use the URL of the story's chapter list, such as
<br /><a href="http://www.scarvesandcoffee.net/viewstory.php?sid=1234">http://www.scarvesandcoffee.net/viewstory.php?sid=1234</a>
</dd>
<dt>www.thepetulantpoetess.com</dt>
<dd>
Use the URL of the story's chapter list, such as
<br /><a href="http://www.thepetulantpoetess.com/viewstory.php?sid=1234">http://www.thepetulantpoetess.com/viewstory.php?sid=1234</a>
</dd>
<dt>www.wolverineandrogue.com</dt>
<dd>
Use the URL of the story's chapter list, such as
<br /><a href="http://www.wolverineandrogue.com/wrfa/viewstory.php?sid=1234">http://www.wolverineandrogue.com/wrfa/viewstory.php?sid=1234</a>
</dd>
</dl>
<p>
A few additional things to know, which will make your life substantially easier:

View file

@ -546,6 +546,19 @@ cover_exclusion_regexp:/images/.*?ribbon.gif
## this should go in your personal.ini, not defaults.ini.
#is_adult:true
[www.dracoandginny.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
## 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
[www.thealphagate.com]
[www.checkmated.com]
@ -667,6 +680,12 @@ cover_exclusion_regexp:/stories/999/images/.*?_trophy.png
[www.prisonbreakfic.net]
[www.scarvesandcoffee.net]
## 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.siye.co.uk]
[www.squidge.org/peja]
@ -682,6 +701,14 @@ titlepage_entries: series,category,genre,language,status,datePublished,dateUpdat
[www.storiesofarda.com]
[www.thepetulantpoetess.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
[www.thewriterscoffeeshop.com]
## Some sites require login (or login for some rated stories) The
## program can prompt you, or you can save it in config. In
@ -756,6 +783,8 @@ collect_series: false
## personal.ini, not defaults.ini.
#is_adult:true
[www.wolverineandrogue.com]
[www.wraithbait.com]
## Some sites do not require a login, but do require the user to
## confirm they are adult for adult content. In commandline version,