Example Squirrels

From Semantic Squirrel

The squirrels are structured by Operating System and then application.

Contents

MacOS

Mail

Mail.sh

# Get the mail from Mail.
# There is a mailbox called Today, that I created, that gets copies of all incoming and outgoing mail.
# I also have the same thing in Entourage, but have to move that mailbox by hand.
mv /Users/hg/Library/Mail/Mailboxes/Today.mbox/Messages/* /Larder/Today/Mail

Safari

Safari.sh

# Grab Safari bookmarks and history
# Uses plutil to convert to normal xml
cp /Users/hg/Library/Safari/Bookmarks.plist /Users/hg/Library/Safari/History.plist /Larder/Today/
plutil -convert xml1 -- /Larder/Today/*.plist

iTunes

iTunes.sh

# Get the iTunes library.
# Would have liked to just get the items played today, but too hard, and the whole library has last played date.
# Can be quite a bit of data, so worth compressing.
cat $HOME/Music/iTunes/iTunes\ Music\ Library.xml | gzip > /Larder/Today/iTunes.xml.gz

Non-Application

filecp

cd /Users/hg/My\ Documents/ 
find . -mtime -1 -exec cp {} /Larder/Today/Files \;


Weather.sh

# I know I want the weather data (and probably forecasts).
# For the moment, I gather for the places I care about.
mkdir /Larder/Today/Weather
/sw/bin/wget http://weather.noaa.gov/weather/current/EGHI.html -O /Larder/Today/Weather/EGHI-weather.html
/sw/bin/wget http://weather.noaa.gov/weather/current/EGLL.html -O /Larder/Today/Weather/EGLL-weather.html
/sw/bin/wget http://weather.noaa.gov/weather/current/EINN.html -O /Larder/Today/Weather/EINN-weather.html
/sw/bin/wget http://weather.noaa.gov/weather/current/EIDW.html -O /Larder/Today/Weather/EIDW-weather.html
mv /Larder/Today/Weather `date "+/Larder/Today/T%H-%M-%S-Weather"`