9f5df6900eb8b86de0c48cd0b18cf81089625d15
[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 # SQL & GPS
19 sql_gps_query = 'SELECT name FROM stations WHERE lat > ? and lat < ? and lon > ? and lon < ?'
20 sql_file = path.expanduser('~/.gotovienna/stations.db')
21
22 # iTip
23
24 line_overview = 'http://www.wienerlinien.at/itip/linienwahl/'
25 stations = 'http://www.wienerlinien.at/itip/haltestelle?letter=%s'
26 departures_by_station = 'http://m.qando.at/de/get_monitor.ft?stop=%s&submit=Anfordern'
27 qando = 'http://m.qando.at/de/'
28
29 search_post = {'language': 'de',
30             'sessionID': 0,
31             'requestID': 0,
32             'execInst': 'normal',
33             'command': '',
34             'anySigWhenPerfectNoOtherMatches': 1,
35             'itdLPxx_locationServerActive': '',
36             'locationServerActive': 0,
37             'typeInfo_origin': 'invalid',
38             'placeState_origin': 'empty',
39             'placeInfo_origin': 'invalid',
40             'place_origin': 'Wien', # overwrite if necessary
41             'type_origin': None, # stop/address/poi
42             'nameState_origin': 'empty',
43             'nameInfo_origin': 'invalid',
44             'anyType_origin': '',
45             'name_origin': None,
46             'typeInfo_destination': 'invalid',
47             'placeState_destination': 'empty',
48             'placeInfo_destination': 'invalid',
49             'place_destination': 'Wien', # overwrite if necessary
50             'type_destination': None, # stop/address/poi
51             'nameState_destination': 'empty',
52             'nameInfo_destination': 'invalid',
53             'anyType_destination': '', # maybe nice
54             'name_destination': None,
55             'itdTripDateTimeDepArr': 'dep',
56             'itdDateDayMonthYear': None, # DD.MM.YYYY
57             'itdTime': None, # HH:MM
58             'submitbutton': 'SUCHEN'
59         }