dwmb-debarque (608B) - raw


      1 #!/bin/sh
      2 
      3 # count="$(curl https://www.ladebarque.com/achalandage |
      4 				# grep 'il y a' |
      5 				# sed 's/.*il\sy\sa\sen\sce\smoment\s//; s/\sgrimpeurs.*//')"
      6 
      7 count="$(curl -L ladebarque.com/achalandage |
      8 				grep -i 'moment' |
      9 				sed  's/\s//g;
     10 				      s/Maximum.*//;
     11               s/^.*moment//;
     12 				      s/\([0-9]\+\).*/\1/')"
     13 
     14 # curl https://www.ladebarque.com/achalandage > ~/asdf.html
     15 
     16 sep=","
     17 date="$(TZ='America/Toronto' date +"%Y-%m-%d$sep%R")"
     18 entry=""$date"$sep"$count""
     19 
     20 case "$1" in
     21 				write) echo "$entry" >> $HOME/.cache/debarque.csv ;;
     22 				*) echo "  $count " ;;
     23 esac
     24 
     25 
     26 # echo "$entry"