aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py54
1 files changed, 26 insertions, 28 deletions
diff --git a/main.py b/main.py
index 6cabb96..fd462be 100644
--- a/main.py
+++ b/main.py
@@ -1,43 +1,41 @@
import os
-import inputs
-import mapsparsing
-import colorcode as clc
-import foldercreating as fdc
+import inputs as io
+import colorcode as clc
foldernames=["Cirque de Cilaos","Cirque de Mafate","Cirque de Salazie","Est","Nord","Ouest","Sud","Volcan","Ailleurs","All"]
-randonb=[]
+webregionnames=[]
+for i in range(9):
+ try:
+ leftside=foldernames[i].split(' ')[0].lower()+"-"
+ rightside=foldernames[i].split(' ')[2].lower()
+ webregionnames.append(leftside+rightside)
+ except IndexError,ierr:
+ oneside=foldernames[i].split(' ')[0].lower()
+ webregionnames.append(oneside)
+ pass
+import foldercreating as fdc
basicfilename=""
+randonb=[]
print clc.bold+"\n\nWelcome ! \nWith this script, you will be able to download gpx,trk and kml traces for hitchiking on the Reunion Isle."+clc.endc
+zonechoice=io.regioninput()
+zoneptr=zonechoice-1
+maptype=io.mapfileinput()
+MAIL=io.loginmail()
+PSW=io.loginpass()
-loginmail()
-logipass()
-filetype=mapfileinput()
-zonechoice=regioninput()
-if filetype==1:
+if maptype==1:
basicfilename="f.gpx"
-elif filetype==2:
+elif maptype==2:
basicfilename="f.trk"
-else filetype==3:
+elif maptype==3:
basicfilename="f.kml"
-mapparsing(filetype,basicfilename)
-mkfolder(filetype,zonechoice)
-
-payload = {
- 'mail': MAIL,
- 'password': PSW
-}
-
-randoweb()
-
-
-
-
-
-
-
+fdc.mainfolder()
+fdc.mkfolder(MAIL,PSW,webregionnames,foldernames,maptype,zoneptr,basicfilename)
+if zonechoice == 10:
+ fdc.mkallfolder(MAIL,PSW,webregionnames,foldernames,maptype,zoneptr,basicfilename)