-
Notifications
You must be signed in to change notification settings - Fork 45
/
config.py
51 lines (41 loc) · 1.27 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import importlib
from utils import CanteenPrefixer, ParserRenamer
cities = [
'aachen',
'chemnitz_zwickau',
'darmstadt',
'dortmund',
'dresden',
'duesseldorf',
'erlangen_nuernberg',
'halle',
'hamburg',
'hannover',
'karlsruhe',
'leipzig',
'magdeburg',
'muenchen',
'marburg',
'niederbayern_oberpfalz',
'ostniedersachsen',
'saarland',
'siegen',
'wuerzburg',
'rostock',
'thueringen',
]
def register_all_parsers(module_list):
registered_parsers = {}
def register_parser(parser):
registered_parsers[parser.name] = parser
for module in module_list:
register_parser(importlib.import_module('parsers.' + module).parser)
register_parser(CanteenPrefixer('braunschweig', 'ostniedersachsen'))
register_parser(ParserRenamer('clausthal', 'ostniedersachsen'))
register_parser(CanteenPrefixer('hildesheim', 'ostniedersachsen'))
register_parser(CanteenPrefixer('suderburg', 'ostniedersachsen'))
register_parser(CanteenPrefixer('wolfenbuettel', 'ostniedersachsen'))
register_parser(CanteenPrefixer('holzminden', 'ostniedersachsen'))
register_parser(CanteenPrefixer('lueneburg', 'ostniedersachsen'))
return registered_parsers
parsers = register_all_parsers(cities)