extend input-file format with per-URL config and comments
- see docstring of parse_inputfile() for details
- TODO: unittests, recursion (currently setting for example
{"extractor": {"key": "value"}} will override the whole "extractor"
branch instead of merging {"key": "value"} into the already existing
dictionary)
This commit is contained in:
@@ -259,6 +259,16 @@ class ChainPredicate():
|
||||
return True
|
||||
|
||||
|
||||
class ExtendedUrl():
|
||||
"""URL with attached config dict"""
|
||||
def __init__(self, url, confdict):
|
||||
self.value = url
|
||||
self.config = confdict
|
||||
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
|
||||
class Formatter():
|
||||
"""Custom, trimmed-down version of string.Formatter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user