dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 56e611bd913fea0c181891097bb335a8849f23ad
parent 340a81083703deda9b5f8345c2cf92acaeb52ad8
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed,  8 Aug 2018 16:21:52 +0200

Update forecast to use DMI for zip 7700

Diffstat:
Mlinks/bin/forecast | 20+++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/links/bin/forecast b/links/bin/forecast @@ -1,14 +1,20 @@ #!/bin/bash -e # vim: ft=sh: -tmpfile=`mktemp`.png -curl --location \ - 'http://f1.weather.gov/meteograms/Plotter.php?lat=40.3308&lon=-74.5647&wfo=PHI&zcode=NJZ012&gset=20&gdiff=10&unit=0&tinfo=EY5&ahour=0&pcmd=11011111111110100000000000000000000000000000000000000000000&lg=en&indu=3!1!1!&dd=&bw=&hrspan=48&pqpfhr=6&psnwhr=6'\ - --output $tmpfile +# DMI: Thisted +zipcode=7700 +url="https://servlet.dmi.dk/byvejr/servlet/byvejr_dag1?by=$zipcode&mode=long&eps=true" + +# NWS: Plainsboro +#url='http://f1.weather.gov/meteograms/Plotter.php?lat=40.3308&lon=-74.5647&wfo=PHI&zcode=NJZ012&gset=20&gdiff=10&unit=0&tinfo=EY5&ahour=0&pcmd=11011111111110100000000000000000000000000000000000000000000&lg=en&indu=3!1!1!&dd=&bw=&hrspan=48&pqpfhr=6&psnwhr=6' + +tmpfile=$(mktemp).png +curl --location "$url" \ + --output "$tmpfile" if command -v open &>/dev/null; then - open $tmpfile + open "$tmpfile" elif command -v xdg-open &>/dev/null; then - xdg-open $tmpfile + xdg-open "$tmpfile" else - echo $tmpfile + echo "$tmpfile" fi