2018-10-15 14:16:10 +01:00
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import argparse
|
|
|
|
import logging
|
|
|
|
|
2019-07-13 21:01:57 +01:00
|
|
|
base = os.path.abspath(os.path.expanduser("~/Projects/petermolnar.net"))
|
2018-10-15 14:16:10 +01:00
|
|
|
|
2018-12-27 19:50:38 +00:00
|
|
|
opml = {
|
2019-07-13 21:01:57 +01:00
|
|
|
"owner": "Peter Molnar",
|
|
|
|
"email": "mail@petermolnar.net",
|
|
|
|
"title": "feeds followed by petermolnar.net",
|
|
|
|
"xsl": "https://petermolnar.net/following.xsl",
|
2018-12-27 19:50:38 +00:00
|
|
|
}
|
|
|
|
|
2018-10-15 14:16:10 +01:00
|
|
|
paths = {
|
2019-07-13 21:01:57 +01:00
|
|
|
"archive": os.path.join(base, "archive"),
|
|
|
|
"content": os.path.join(base, "content"),
|
2018-10-15 14:16:10 +01:00
|
|
|
}
|
|
|
|
|
2019-07-13 21:01:57 +01:00
|
|
|
loglevels = {"critical": 50, "error": 40, "warning": 30, "info": 20, "debug": 10}
|
2018-10-15 14:16:10 +01:00
|
|
|
|
2019-07-13 21:01:57 +01:00
|
|
|
_parser = argparse.ArgumentParser(description="Parameters for silo.pasta")
|
|
|
|
_parser.add_argument("--loglevel", default="debug", help="change loglevel")
|
2018-10-15 14:16:10 +01:00
|
|
|
|
|
|
|
args = vars(_parser.parse_args())
|
|
|
|
logging.basicConfig(
|
2019-07-13 21:01:57 +01:00
|
|
|
level=loglevels[args.get("loglevel")],
|
|
|
|
format="%(asctime)s - %(levelname)s - %(message)s",
|
2018-10-15 14:16:10 +01:00
|
|
|
)
|