Commit 329e38b7 authored by Khaytsus's avatar Khaytsus

Add some verbosity to

Add some output to show each area and the global worldwide data being downloaded and rename the worldwide max count wwcount.  Also a trailing line to say the output filename.
parent 6cf156be
......@@ -5,7 +5,7 @@
# Array of id,name which the script iterates over to get data, update for your needs
# Here I am getting all US (averages to about a week worth of contacts fwhen limited
# Here I am getting all US (averages to about a week worth of contacts when limited
# to 500) plus some targeted states I'm interested in which pulls in a lot more calls
# per those states
......@@ -19,9 +19,11 @@ max=10900
# Generic Last heard count (add additional World Wide last-heard users)
# The data above is about 4000 entries, so this fills it out to about 10k
# Shouldn't need to touch below here
ts=`date +"%Y-%m-%d"`
......@@ -31,11 +33,13 @@ cd ${datapath}
for i in ${ids[@]}; do
id=`echo $i | cut -f 1 -d ','`
name=`echo $i | cut -f 2 -d ','`
echo "Getting ${name} (id $id}) (${count} max)"
curl -s -o ${name}-${id}.csv "${id}&cnt=${count}"
# Pull last heard from all around the world, with the genericcount limiting how many
# 5000 is about 6 days worth give or take
echo "Getting worldwide Last Heard data (${wwcount} max)"
curl -s -o lh-0000.csv "${genericcount}"
# Combine all of them into a single file formatted for import
......@@ -45,4 +49,7 @@ awk 'BEGIN { FS=";"; OFS=","; } {print $3,$2,$4,",,,,<br/>"}' *-???.csv *-????.c
lines=`wc -l ${output} | cut -f 1 -d " "`
if [ ${lines} -gt ${max} ]; then
echo "Warning: CSV contains more than ${max} lines"
\ No newline at end of file
echo ""
echo "${output} should be ready to import using ActiveClient.exe"
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment