1 from os import path, mkdir
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')
10 if not path.exists(sys_cache):
12 if not path.exists(cache_folder):
15 cache_lines = path.join(cache_folder, 'lines.json')
16 cache_stations = path.join(cache_folder, 'stations.json')
19 sql_gps_query = 'SELECT name FROM stations WHERE lat > ? and lat < ? and lon > ? and lon < ?'
20 sql_file = path.expanduser('~/.gotovienna/stations.db')
23 favorites_file = path.expanduser('~/.gotovienna/favorites.json')
27 line_overview = 'http://www.wienerlinien.at/itip/linienwahl/'
28 stations = 'http://www.wienerlinien.at/itip/haltestelle?letter=%s'
29 departures_by_station = 'http://m.qando.at/de/get_monitor.ft?stop=%s&submit=Anfordern'
30 qando = 'http://m.qando.at/de/'
32 search_post = {'language': 'de',
37 'anySigWhenPerfectNoOtherMatches': 1,
38 'itdLPxx_locationServerActive': '',
39 'locationServerActive': 0,
40 'typeInfo_origin': 'invalid',
41 'placeState_origin': 'empty',
42 'placeInfo_origin': 'invalid',
43 'place_origin': 'Wien', # overwrite if necessary
44 'type_origin': None, # stop/address/poi
45 'nameState_origin': 'empty',
46 'nameInfo_origin': 'invalid',
49 'typeInfo_destination': 'invalid',
50 'placeState_destination': 'empty',
51 'placeInfo_destination': 'invalid',
52 'place_destination': 'Wien', # overwrite if necessary
53 'type_destination': None, # stop/address/poi
54 'nameState_destination': 'empty',
55 'nameInfo_destination': 'invalid',
56 'anyType_destination': '', # maybe nice
57 'name_destination': None,
58 'itdTripDateTimeDepArr': 'dep',
59 'itdDateDayMonthYear': None, # DD.MM.YYYY
60 'itdTime': None, # HH:MM
61 'submitbutton': 'SUCHEN'