Address review comments by @danielquinn

This commit is contained in:
Michael Gmelin
2019-09-08 17:00:02 +02:00
parent 14b81c613c
commit 9ff467eb9b
2 changed files with 6 additions and 6 deletions

View File

@@ -321,12 +321,8 @@ FILENAME_DATE_ORDER = os.getenv("PAPERLESS_FILENAME_DATE_ORDER")
# Transformations applied before filename parsing
FILENAME_PARSE_TRANSFORMS = []
_filename_parse_transforms = os.getenv("PAPERLESS_FILENAME_PARSE_TRANSFORMS")
if _filename_parse_transforms:
FILENAME_PARSE_TRANSFORMS = [(
re.compile(t["pattern"]), t["repl"])
for t in json.loads(_filename_parse_transforms)
]
for t in json.loads(os.getenv("PAPERLESS_FILENAME_PARSE_TRANSFORMS", "[]")):
FILENAME_PARSE_TRANSFORMS.append((re.compile(t["pattern"]), t["repl"]))
# Specify for how many years a correspondent is considered recent. Recent
# correspondents will be shown in a separate "Recent correspondents" filter as