e3170bd9d1bdf95c1793c788cee25a6d69cb3c21
[pywienerlinien] / gotovienna / defaults.py
1 from os import path, mkdir
2
3 # route search
4 action = 'http://efa.vor.at/wvb/XSLT_TRIP_REQUEST2'
5 hist_file = path.expanduser('~/.gotovienna_history')
6 sys_cache = path.expanduser('~/.cache')
7 cache_folder = path.join(sys_cache, 'gotovienna')
8
9 # FIXME more robust
10 if not path.exists(sys_cache):
11     mkdir(sys_cache)
12 if not path.exists(cache_folder):
13     mkdir(cache_folder)
14
15 cache_lines = path.join(cache_folder, 'lines.json')
16 cache_stations = path.join(cache_folder, 'stations.json')
17
18 # iTip
19
20 line_overview = 'http://www.wienerlinien.at/itip/linienwahl/'
21 stations = 'http://www.wienerlinien.at/itip/haltestelle?letter=%s'
22
23 search_post = {'language': 'de',
24             'sessionID': 0,
25             'requestID': 0,
26             'execInst': 'normal',
27             'command': '',
28             'anySigWhenPerfectNoOtherMatches': 1,
29             'itdLPxx_locationServerActive': '',
30             'locationServerActive': 0,
31             'typeInfo_origin': 'invalid',
32             'placeState_origin': 'empty',
33             'placeInfo_origin': 'invalid',
34             'place_origin': 'Wien', # overwrite if necessary
35             'type_origin': None, # stop/address/poi
36             'nameState_origin': 'empty',
37             'nameInfo_origin': 'invalid',
38             'anyType_origin': '',
39             'name_origin': None,
40             'typeInfo_destination': 'invalid',
41             'placeState_destination': 'empty',
42             'placeInfo_destination': 'invalid',
43             'place_destination': 'Wien', # overwrite if necessary
44             'type_destination': None, # stop/address/poi
45             'nameState_destination': 'empty',
46             'nameInfo_destination': 'invalid',
47             'anyType_destination': '', # maybe nice
48             'name_destination': None,
49             'itdTripDateTimeDepArr': 'dep',
50             'itdDateDayMonthYear': None, # DD.MM.YYYY
51             'itdTime': None, # HH:MM
52             'submitbutton': 'SUCHEN'
53         }