From ab2f2f3f8800c52e9d9198e38b0ac7629790c70c Mon Sep 17 00:00:00 2001 From: Joakim Soderlund Date: Wed, 8 Nov 2017 17:24:27 +0100 Subject: [PATCH] Add meta format flavor --- fimfarchive/fetchers/fimfiction.py | 3 ++- fimfarchive/flavors.py | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/fimfarchive/fetchers/fimfiction.py b/fimfarchive/fetchers/fimfiction.py index 591258a..7cc7313 100644 --- a/fimfarchive/fetchers/fimfiction.py +++ b/fimfarchive/fetchers/fimfiction.py @@ -25,7 +25,7 @@ Fimfiction fetcher. import requests from fimfarchive.exceptions import InvalidStoryError, StorySourceError -from fimfarchive.flavors import StorySource, DataFormat, MetaPurity +from fimfarchive.flavors import StorySource, DataFormat, MetaFormat, MetaPurity from .base import Fetcher @@ -48,6 +48,7 @@ class FimfictionFetcher(Fetcher): flavors = frozenset(( StorySource.FIMFICTION, DataFormat.HTML, + MetaFormat.ALPHA, MetaPurity.DIRTY, )) diff --git a/fimfarchive/flavors.py b/fimfarchive/flavors.py index 135de87..e6ed070 100644 --- a/fimfarchive/flavors.py +++ b/fimfarchive/flavors.py @@ -29,6 +29,7 @@ __all__ = ( 'Flavor', 'StorySource', 'DataFormat', + 'MetaFormat', 'MetaPurity', 'UpdateStatus', ) @@ -75,6 +76,14 @@ class DataFormat(Flavor): HTML = () +class MetaFormat(Flavor): + """ + Indicates the general structure of story meta. + """ + ALPHA = () + BETA = () + + class MetaPurity(Flavor): """ Indicates if story meta has been sanitized.