#!/bin/ksh
echo 'Interface to Google Chart Geo Chart interfacer created by RJM Programming ...'
echo ''
text=""
equl="="
echo 'Verb for command line eg. open eg. curl'
read verb
if [ -z "$verb" ]; then
 verb="open"
fi 
if [ ! -z "$verb" ]; then
echo ''
echo 'Enter comma separated list of placenames, or list of countries (suffix by &text=y for text mode display)  eg. Sydney,London,Alice_Springs,Beijing,London,New_York,Paris,Rio_de_Janeiro,Cairo,Rome,Tennant_Creek'
read commastring
if [ ! -z "$commastring" ]; then
echo ''
echo 'Enter optional central country  eg. Italy'
read centralplace
echo ''
echo 'Enter width [556]  eg. 1112'
read width
if [ -z "$width" ]; then
 width="556"
fi 
if [ ! -z "$width" ]; then
echo ''
echo 'Enter height [347] eg. 694'
read height
if [ -z "$height" ]; then
 height="347"
fi 
if [ ! -z "$commastring" ]; then
echo ''
echo 'Enter the word text for text display'
read text
echo ''
echo 'Starting the call ...'
echo "$verb https://www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?${text}_${width}_${height}_${centralplace}_listis${equl}${commastring}"
ksh -c "$verb https://www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?${text}_${width}_${height}_${centralplace}_listis${equl}${commastring}"
exit
fi
fi
fi
fi
fi
exit
