Skip to content

Instantly share code, notes, and snippets.

@zachseifts
Created December 16, 2011 21:03
Show Gist options
  • Save zachseifts/1487965 to your computer and use it in GitHub Desktop.
Save zachseifts/1487965 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Emails weekly updates to an email
#
# usage: ./gdocs_email [email protected]
#
google=/usr/local/bin/google
mail=/usr/bin/mail
updates_dump=/tmp/weekly-$(date +%V).txt
email_subject="Weekly Update: $(date +"%A %B %d, %Y")"
if [ $# -ne 1 ]
then
echo "Usage: gdocs_email <[email protected]>"
exit;
fi
$google docs get "Work $(date +%V)" $updates_dump
$mail -s "$email_subject" $1 < $updates_dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment