Skip to content

Instantly share code, notes, and snippets.

@tzermias
Created April 27, 2020 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tzermias/f3ce1320e64d1208fb1a467bb43cbfd6 to your computer and use it in GitHub Desktop.
Save tzermias/f3ce1320e64d1208fb1a467bb43cbfd6 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Collect photos from penteli.meteo.gr and save them to a directory.
# github.com/tzermias
DOWNLOAD_DIR="$(dirname $0)/photos"
FILENAME="panorama_$(date +%s).jpg"
URL="https://penteli.meteo.gr/stations/penteli/webcam/panorama.jpg"
# Create directory to save images, if non-existent.
[ ! -d $DOWNLOAD_DIR ] && mkdir -p $DOWNLOAD_DIR
curl -Rks -o "${DOWNLOAD_DIR}/${FILENAME}" $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment