disable console logging
[pywienerlinien] / gotovienna / defaults.py
index 81b0b96..9f5df69 100644 (file)
@@ -1,14 +1,30 @@
-from os import path
+from os import path, mkdir
 
 # route search
-folder = path.dirname(__file__)
 action = 'http://efa.vor.at/wvb/XSLT_TRIP_REQUEST2'
-hist_file = path.join(folder, '.wl_history')
+hist_file = path.expanduser('~/.gotovienna_history')
+sys_cache = path.expanduser('~/.cache')
+cache_folder = path.join(sys_cache, 'gotovienna')
+
+# FIXME more robust
+if not path.exists(sys_cache):
+    mkdir(sys_cache)
+if not path.exists(cache_folder):
+    mkdir(cache_folder)
+
+cache_lines = path.join(cache_folder, 'lines.json')
+cache_stations = path.join(cache_folder, 'stations.json')
+
+# SQL & GPS
+sql_gps_query = 'SELECT name FROM stations WHERE lat > ? and lat < ? and lon > ? and lon < ?'
+sql_file = path.expanduser('~/.gotovienna/stations.db')
 
 # iTip
 
 line_overview = 'http://www.wienerlinien.at/itip/linienwahl/'
 stations = 'http://www.wienerlinien.at/itip/haltestelle?letter=%s'
+departures_by_station = 'http://m.qando.at/de/get_monitor.ft?stop=%s&submit=Anfordern'
+qando = 'http://m.qando.at/de/'
 
 search_post = {'language': 'de',
             'sessionID': 0,
@@ -40,4 +56,4 @@ search_post = {'language': 'de',
             'itdDateDayMonthYear': None, # DD.MM.YYYY
             'itdTime': None, # HH:MM
             'submitbutton': 'SUCHEN'
-        }
\ No newline at end of file
+        }