aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--algo.txt0
-rw-r--r--prototyping/__init__.py (renamed from __init__.py)0
-rw-r--r--prototyping/colorcode.py (renamed from colorcode.py)0
-rw-r--r--prototyping/errmsg.py (renamed from errmsg.py)0
-rw-r--r--prototyping/foldercreating.py (renamed from foldercreating.py)0
-rw-r--r--prototyping/inputs.py (renamed from inputs.py)0
-rw-r--r--prototyping/main.py (renamed from main.py)0
-rw-r--r--prototyping/mapsparsing.py (renamed from mapsparsing.py)0
-rw-r--r--prototyping/randoweb.py (renamed from randoweb.py)0
-rw-r--r--randopitons.sh93
-rw-r--r--regions.txt10
-rw-r--r--webregions.txt9
12 files changed, 112 insertions, 0 deletions
diff --git a/algo.txt b/algo.txt
deleted file mode 100644
index e69de29..0000000
--- a/algo.txt
+++ /dev/null
diff --git a/__init__.py b/prototyping/__init__.py
index e69de29..e69de29 100644
--- a/__init__.py
+++ b/prototyping/__init__.py
diff --git a/colorcode.py b/prototyping/colorcode.py
index e120109..e120109 100644
--- a/colorcode.py
+++ b/prototyping/colorcode.py
diff --git a/errmsg.py b/prototyping/errmsg.py
index 8e67d42..8e67d42 100644
--- a/errmsg.py
+++ b/prototyping/errmsg.py
diff --git a/foldercreating.py b/prototyping/foldercreating.py
index 489d588..489d588 100644
--- a/foldercreating.py
+++ b/prototyping/foldercreating.py
diff --git a/inputs.py b/prototyping/inputs.py
index 3b47bef..3b47bef 100644
--- a/inputs.py
+++ b/prototyping/inputs.py
diff --git a/main.py b/prototyping/main.py
index 56f04d6..56f04d6 100644
--- a/main.py
+++ b/prototyping/main.py
diff --git a/mapsparsing.py b/prototyping/mapsparsing.py
index 6caa37a..6caa37a 100644
--- a/mapsparsing.py
+++ b/prototyping/mapsparsing.py
diff --git a/randoweb.py b/prototyping/randoweb.py
index 57fd7f3..57fd7f3 100644
--- a/randoweb.py
+++ b/prototyping/randoweb.py
diff --git a/randopitons.sh b/randopitons.sh
new file mode 100644
index 0000000..00f4ef0
--- /dev/null
+++ b/randopitons.sh
@@ -0,0 +1,93 @@
+#!/bin/bash
+# ANSI color codes
+RS="\e[0m" # reset
+HC="\e[1m" # hicolor
+UL="\e[4m" # underline
+INV="\e[7m" # inverse background and foreground
+FBLK="\e[30m" # foreground black
+FRED="\e[31m" # foreground red
+FGRN="\e[32m" # foreground green
+FYEL="\e[33m" # foreground yellow
+FBLE="\e[34m" # foreground blue
+FMAG="\e[35m" # foreground magenta
+FCYN="\e[36m" # foreground cyan
+FWHT="\e[37m" # foreground white
+BBLK="\e[40m" # background black
+BRED="\e[41m" # background red
+BGRN="\e[42m" # background green
+BYEL="\e[43m" # background yellow
+BBLE="\e[44m" # background blue
+BMAG="\e[45m" # background magenta
+BCYN="\e[46m" # background cyan
+BWHT="\e[47m" # background white
+BLD="\e[1m" # BOLD text
+# ANSI color codes
+
+#https://stackoverflow.com/questions/4813092/how-to-read-entire-line-from-bash
+#so we don't use a while loop
+IFS=$'\n'
+
+tellusage()
+{
+echo -e "${BLD}PURPOSE:${RS} With this script, you will be able to download gpx,trk and kml traces for hitchiking on the Reunion Isle.\n
+${BLD}USAGE$RS: randopitons.sh -u \"username@mymail.com\" -mp maptype. You can supply the -a flag to the previous example to download all regions \n
+${BLD}MAPTYPE FORMAT:$RS gpx, trk or kml"
+
+}
+
+credentials()
+{
+RDPUSER=$1
+echo -e "\nYour username is $RDPUSER."
+echo -e "\nPassword (for randopitons.re): "
+read -s RDPUSERPASS
+}
+
+
+MAPTYPE="gpx"
+RDPHOME=$HOME"/Randopitons"
+RDPUSER=
+RDPUSERPASS=
+
+if [ "$1" = "" ];then
+ tellusage
+fi
+
+while [ "$1" != "" ]; do
+
+ case $1 in
+ -u | --username )
+ shift
+ credentials
+ ;;
+
+ -mp | --maptype )
+ shift
+ MAPTYPE=$1
+ echo -e "\nChosen maptype is $1"
+ while [ $MAPTYPE != "gpx" -a $MAPTYPE != "trk" -a $MAPTYPE != "kml" ]
+ do
+ echo -e $HC$BRED"${FYEL}\nMaptype supplied is not correct$RS"
+ echo -e "Which map filetype you want to set : ${BLD}gpx(default),trk or kml ?$RS$RS$RS"
+ read -N 3 MAPTYPE
+ done
+ echo -e $HC$FGRN"\n$MAPTYPE maptype is a valid choice !"$RS
+ ;;
+ -a | --all )
+ echo -e "\nThis will download all the hitchiking routes from all regions."
+ echo -e "\nIf no maptype is specified (with -mp or --maptype), it will default to .gpx filetype"
+ ;;
+
+
+
+# -h | --help ) tellusage
+# exit
+# ;;
+ * ) tellusage
+ exit 1
+ esac
+ shift
+done
+
+
+# echo -e "\n purz"
diff --git a/regions.txt b/regions.txt
new file mode 100644
index 0000000..9569285
--- /dev/null
+++ b/regions.txt
@@ -0,0 +1,10 @@
+Cirque de Cilaos
+Cirque de Mafate
+Cirque de Salazie
+Est
+Nord
+Ouest
+Sud
+Volcan
+Ailleurs
+All
diff --git a/webregions.txt b/webregions.txt
new file mode 100644
index 0000000..6a45d63
--- /dev/null
+++ b/webregions.txt
@@ -0,0 +1,9 @@
+cirque-cilaos
+cirque-mafate
+cirque-salazie
+est
+nord
+ouest
+sud
+volcan
+ailleurs \ No newline at end of file