The ramblings of Steve-0Posts RSS Comments RSS

Archive for the Tag 'apple'

Use iDisk to synchronize IM Chat Logs

Like email, my IM chat logs have become a critical reference and database for me. With both OS X’ spotlight and Adium’s chat transcripts, searching for a conversation in these logs is quite easy. However, not so much so when I’m on my laptop at home, and the chat took place on my work computer. I am looking into services like simkl.com, which act as a proxy and store your chat logs an their servers - but, these don’t have the search interface I’m used to, and I’m not sure I’m ready for yet another company to have access to my personal communications.

So, here’s the procedure I am using to sync my logs using my iDisk included with my MobileMe subscription. It is pretty rudimentary, but works nicely for what I want it to do.

Here are the relevant references I used when putting this process together, as I didn’t feel like spending much time on this:
http://www.macosxhints.com/article.php?story=2008071710372562
http://www.macosxhints.com/article.php?story=20020207214002198&query=dd
http://forums.macosxhints.com/showthread.php?t=2185
http://www.bombich.com/mactips/rsync.html
http://lingon.sourceforge.net/

First, I built the latest rsync based on the link above - not that its really needed, but I figured it wasn’t a bad idea to have the latest, greatest, and most efficient.

Second, you need the actual script, here’s mine, with some names removed:

#!/bin/bash

# Sync all data from Chat logs to MobileMe iDisk

export LOG=/Users/myname/idisk.log
rm -f $LOG
echo `date` > $LOG
echo "Starting copy of Adium Chat History to iDisk..." >> $LOG
export IDISK=/Users/myname/idiskmount
export PWFILE=/Users/myname/bin/idiskpw.txt

cat $PWFILE | mount_webdav -a0 http://idisk.mac.com/dotmacusername/ $IDISK

rsync -a -E -4 -u --exclude=.DS_Store --stats --progress /Users/myname/Library/"Application Support"/"Adium 2.0"/Users/Default/Logs/ ${IDISK}/ChatLog/ >> $LOG
rsync -a -E -4 -u --exclude=.DS_Store --stats --progress ${IDISK}/ChatLog/ /Users/myname/Library/"Application Support"/"Adium 2.0"/Users/Default/Logs/ >> $LOG

umount $IDISK

echo "Backup of Chat Logs to iDisk complete..." >> $LOG
echo "" >> $LOG
echo `date` >> $LOG

exit 0

Now, I created a new job in Lingon to run the sync script. I named it com.myname.idisk.rsync, selected the script I had created (saved in ~/bin), and set it to run every 2 hours. After logging out and back in, everything was up and running. Status can be checked in the log file - after a long initial run, things run very quickly.

You’ll want to repeat this process on any other computer you have for it to work properly. After spotlight reads in all the new files, you should have searchable chat logs on all your macs.

Notes: You’ll need to create the appropriate directories here (idiskmount), and the funky webdav password file. This process is detailed in the macosxhints forum post, it involves typing a few non-std characters in your editor of choice.

2 responses so far

Firefox 3 - Opening a URL in new tab using command-enter

Download/Install UseMetaKeys FireFox Extension

In celebration of the release of Firefox 3 yesterday (and since I had forgotten to install my extension previously), I am posting this quick, dirty, and oh so helpful firefox extension.
Firefox has long been my preferred browser, although for the last year or so Safari had been gaining ground. Firefox 2 was just to bloated and slow, especially on OS X, and Safari was much faster. I always had a hard time choosing between the additional functionality Firefox provides, and the simplicity and speed of Safari. With Firefox 3, that’s pretty much over, and it is back in its place as my primary browser.
However, one thing that has always bugged me about firefox on Mac OS X was that you can’t open a URL in a new tab using Command+Enter, it only works with Option(alt)+Enter. I couldn’t find a fix a year or two ago, and with some quick searching today, I still did not find a good way to reassign the key sequence. So, I looked up a couple howto’s, found a sample/donor project, and whipped up a simple extension with a single purpose - remap Command-Enter to open a url in a new tab (i.e. when typing in the address or search bars). As expected, no support is provided, no warranty intended, etc., but if you’re using Firefox on OS X, I highly suggest installing this.

For some reason, I called it “UseMetaKeys”, and now, a year later, I am too lazy to change the name.

2 responses so far