complete missing essential fields (home, state) on entries

This commit is contained in:
Trilarion
2018-06-08 10:33:56 +02:00
parent c738e995b7
commit 569c8388ef
48 changed files with 76 additions and 47 deletions

View File

@ -282,7 +282,7 @@ def parse_entry(content):
info['title'] = matches[0]
# first read all field names
regex = re.compile(r"- (.*): ")
regex = re.compile(r"^- (.*?): ", re.MULTILINE)
fields = regex.findall(content)
# iterate over found field
@ -465,7 +465,7 @@ def export_json():
# make database out of it
db = {}
db['header'] = ['Name', 'Download']
db['headings'] = ['Name', 'Download']
entries = []
for info in infos:
@ -473,7 +473,7 @@ def export_json():
if 'download' in info:
entry.append(info['download'][0])
else:
entry.append(None)
entry.append('')
entries.append(entry)
db['data'] = entries