Skip to content

Instantly share code, notes, and snippets.

@cboettig
Created September 1, 2010 20:21
Show Gist options
  • Save cboettig/561283 to your computer and use it in GitHub Desktop.
Save cboettig/561283 to your computer and use it in GitHub Desktop.
#!/bin/sh
# takes as arguments all the files to be uploaded, uploads with a tag of the timestamp which it uses to create the slideshow
# Note the backticks to get the return value of the function
MYTAG=`date +%Y%m%d%H%M%S`
flickr_upload --tag="$MYTAG" $*
# download the right format for flickr slideshows (from a raw gist of mine)
wget http://gist.github.com/raw/561282/c016db98ac3272facc5a75ba2d7780abc33a78bb/slideshow.html
# Output the code
# Note that sed needs double quotes to use the environmental variable
sed "s/unique_tag/$MYTAG/g" slideshow.html
# cleanup
rm slideshow.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment