aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-04-03 19:48:22 +0200
committerlonkaars <loek@pipeframe.xyz>2022-04-03 19:48:22 +0200
commit53cbdbfc3f83910946d2fa91e8a60f9ad0c7ef3e (patch)
treef9af9d5244b7aefc983c822e4d498ec186ef647b
parent78b6ad43f661c3e1f0d797c05a9ac3da6e57e5e7 (diff)
added comments to configuration.an file spec
-rwxr-xr-xautonyaa.py1
-rw-r--r--readme.md2
2 files changed, 3 insertions, 0 deletions
diff --git a/autonyaa.py b/autonyaa.py
index b574114..a84e801 100755
--- a/autonyaa.py
+++ b/autonyaa.py
@@ -105,6 +105,7 @@ def parse_config_section(section):
def parse_config_file():
parsed_sections = []
contents = config_file.read()
+ contents = re.sub(r'^#.*\n', '', contents, 0, re.M)
sections = [x.strip() for x in contents.split("\n\n")]
while "" in sections:
sections.remove("")
diff --git a/readme.md b/readme.md
index ec18d27..e2ed22b 100644
--- a/readme.md
+++ b/readme.md
@@ -26,6 +26,8 @@ autonyaa should look up and match torrent titles. if you want to keep track of
multiple anime's, you can define multiple config sections by seperating them
with an empty line. here's a reference for all the configuration keys:
+lines starting with a # are completely ignored
+
### name
```