Further improvements to descriptions/config
- Allow alt. keys to be used in config (eg. `eka` or `eka_portal` => `aryion`) and refactor out this logic - Refactor duplicated config parsing logic - Add `-D --define-option` args for script invokation conditions - Allow `-f --file-path` arg to be used several times - Allow `-f --file-path` to be used without setting up an input story or description
This commit is contained in:
parent
382423fe5a
commit
f3fabf2d8a
5 changed files with 133 additions and 79 deletions
13
sites.py
Normal file
13
sites.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import itertools
|
||||
import typing
|
||||
|
||||
SUPPORTED_SITE_TAGS: typing.Mapping[str, typing.Set[str]] = {
|
||||
'aryion': {'aryion', 'eka', 'eka_portal'},
|
||||
'furaffinity': {'furaffinity', 'fa'},
|
||||
'weasyl': {'weasyl'},
|
||||
'inkbunny': {'inkbunny', 'ib'},
|
||||
'sofurry': {'sofurry', 'sf'},
|
||||
}
|
||||
|
||||
INVERSE_SUPPORTED_SITE_TAGS: typing.Mapping[str, str] = \
|
||||
dict(itertools.chain.from_iterable(zip(v, itertools.repeat(k)) for (k, v) in SUPPORTED_SITE_TAGS.items()))
|
||||
Reference in a new issue