From f415b06b79830e8c8534739c0a259425319111ec Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Wed, 13 Jul 2011 22:59:48 +0200 Subject: [PATCH] added simple warper for RAPT request via --- shell_scripts/ratp_now | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 shell_scripts/ratp_now diff --git a/shell_scripts/ratp_now b/shell_scripts/ratp_now new file mode 100755 index 0000000..fbc4927 --- /dev/null +++ b/shell_scripts/ratp_now @@ -0,0 +1,14 @@ +#!/bin/sh +if [ $# -lt 2 ] +then + echo 'usage ratp_now "la varenne-chennevieres (RER)" "gare de l est (SNCF), paris"' + exit; +fi + +DATE=`date +%Y-%m-%d` +TIME=`date +%H:%M` +START=`echo $1|tr " " "+"` +END=`echo $2|tr " " "+"` + +# should instead call the default browser +firefox --new-tab http://www.ratp.fr/itineraires/fr/ratp/resultat-simple/$START/$END/is_date_start/1/date/$DATE/time/$TIME/route_type/plus_rapide