From f72ac3c9792e6956f015710988f098d32cf6c48b Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 22 Jul 2015 08:42:47 -0500 Subject: [PATCH] Add site ninelives.dark-solace.org as Base eFiction adapter. --- calibre-plugin/plugin-defaults.ini | 6 +++ fanficfare/adapters/__init__.py | 1 + .../adapter_ninelivesdarksolaceorg.py | 38 +++++++++++++++++++ fanficfare/defaults.ini | 6 +++ 4 files changed, 51 insertions(+) create mode 100644 fanficfare/adapters/adapter_ninelivesdarksolaceorg.py diff --git a/calibre-plugin/plugin-defaults.ini b/calibre-plugin/plugin-defaults.ini index 7252f85..1a16d31 100644 --- a/calibre-plugin/plugin-defaults.ini +++ b/calibre-plugin/plugin-defaults.ini @@ -1260,6 +1260,12 @@ extracategories:NCIS extracategories:Buffy: The Vampire Slayer extracharacters:Willow +[ninelives.dark-solace.org] +## Site dedicated to these categories/characters/ships +extracategories:The Walking Dead +extracharacters:Carol,Daryl +extraships:Carol/Daryl + [nocturnal-light.net] ## Extra metadata that this adapter knows about. See [dramione.org] ## for examples of how to use them. diff --git a/fanficfare/adapters/__init__.py b/fanficfare/adapters/__init__.py index 15110b6..3865a97 100644 --- a/fanficfare/adapters/__init__.py +++ b/fanficfare/adapters/__init__.py @@ -137,6 +137,7 @@ import adapter_tgstorytimecom import adapter_itcouldhappennet import adapter_forumsspacebattlescom import adapter_forumssufficientvelocitycom +import adapter_ninelivesdarksolaceorg ## 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/fanficfare/adapters/adapter_ninelivesdarksolaceorg.py b/fanficfare/adapters/adapter_ninelivesdarksolaceorg.py new file mode 100644 index 0000000..22f9e78 --- /dev/null +++ b/fanficfare/adapters/adapter_ninelivesdarksolaceorg.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- + +# Copyright 2015 Fanficdownloader team, 2015 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 +import re +from base_efiction_adapter import BaseEfictionAdapter + +class NineLivesDarkSolaceAdapter(BaseEfictionAdapter): + + @staticmethod + def getSiteDomain(): + return 'ninelives.dark-solace.org' + + @classmethod + def getSiteAbbrev(self): + return '9lvs' + + @classmethod + def getDateFormat(self): + return "%B %d, %Y" + +def getClass(): + return NineLivesDarkSolaceAdapter + diff --git a/fanficfare/defaults.ini b/fanficfare/defaults.ini index 9f66a25..e6043bb 100644 --- a/fanficfare/defaults.ini +++ b/fanficfare/defaults.ini @@ -1246,6 +1246,12 @@ extracategories:NCIS extracategories:Buffy: The Vampire Slayer extracharacters:Willow +[ninelives.dark-solace.org] +## Site dedicated to these categories/characters/ships +extracategories:The Walking Dead +extracharacters:Carol,Daryl +extraships:Carol/Daryl + [nocturnal-light.net] ## Extra metadata that this adapter knows about. See [dramione.org] ## for examples of how to use them.