mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-27 17:38:19 +02:00
More metadata for trekiverse and fannation
* Romance/Read and Awards/Read * Encoding set for trekiverse
This commit is contained in:
parent
876255afdb
commit
6b0bebd82f
2 changed files with 13 additions and 3 deletions
|
|
@ -40,7 +40,9 @@ class FanNationAdapter(BaseEfictionAdapter):
|
|||
def handleMetadataPair(self, key, value):
|
||||
if key == 'Romance':
|
||||
for val in re.split("\s*,\s*", value):
|
||||
self.story.addToList('categories', val)
|
||||
self.story.addToList('romance', val)
|
||||
elif key == 'Read':
|
||||
self.story.setMetadata('readings', value)
|
||||
else:
|
||||
super(FanNationAdapter, self).handleMetadataPair(key, value)
|
||||
|
||||
|
|
|
|||
|
|
@ -37,12 +37,20 @@ class TrekiverseOrgAdapter(BaseEfictionAdapter):
|
|||
|
||||
@classmethod
|
||||
def getHighestWarningLevel(cls):
|
||||
return 6
|
||||
return 4
|
||||
|
||||
@classmethod
|
||||
def getDateFormat(cls):
|
||||
return "%d %b %Y"
|
||||
|
||||
@classmethod
|
||||
def getDecode(cls):
|
||||
def getEncoding(cls):
|
||||
return ["ISO-8859-1", "utf8"]
|
||||
|
||||
def handleMetadataPair(self, key, value):
|
||||
if key == 'Awards':
|
||||
self.story.setMetadata('awards', value)
|
||||
if key == 'Read':
|
||||
self.story.setMetadata('readings', value)
|
||||
else:
|
||||
super(TrekiverseOrgAdapter, self).handleMetadataPair(key, value)
|
||||
|
|
|
|||
Loading…
Reference in a new issue