Fetch local weather from Dark Sky API. https://wthr.ml/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
342 B

  1. #!/bin/bash
  2. echo "<table>" ;
  3. print_header=true
  4. while read INPUT ; do
  5. if $print_header;then
  6. # echo "<tr><th>$INPUT" | sed -e 's/:[^,]*\(,\|$\)/<\/th><th>/g'
  7. echo "<tr><th>${INPUT//,/</th><th>}</th></tr>" ;
  8. print_header=false
  9. else
  10. echo "<tr><td>${INPUT//,/</td><td>}</td></tr>" ;
  11. fi
  12. done < dark-sky.csv ;
  13. echo "</table>"