Highrise note export script

Highrise note exported to HTML

Highrise has become the definitive repository for everything I do at work. It’s a perfect tool to track the whirlwind of activity and action items that make up day-to-day work.

After getting into the rhythm of using it for a while, I noticed that I often needed to share a note that I’d captured with my boss or another team member. In the past, I had occasionally used Writeboard to bang out these types of notes, exporting them to HTML and sending them as e-mail attachments if need be. After the third or fourth time, wheels started to turn in my head.

So, I wrote a simple Ruby script to combine the two concepts and export a Highrise note to an HTML file. To use it, you’ll need to do the following:

  1. Download the script and edit it to include your Highrise account info (URL and API key).
  2. Install the Ruby BlueCloth gem…this step can be tricky.
  3. (Optional) Create a shell script to launch the Ruby file and pass it the command line parameter.

If you go the extra mile and do step 3, you can use a shorthand syntax on the command line (e.g. hrn 8675309) to run the script. The numerical parameter represents the ID of the note, which you can see in your browser’s Address bar when viewing the full details of said note. The exported HTML file will be created in the current directory.

Writeboard vets will notice the degree to which I’ve ripped off been heavily inspired by its export function. The notable area in which I’ve differed is to use Markdown instead of Textile for formatting. I really like both, actually, but I think Markdown looks less “markup-y” if you’re looking at the source, which will be the case whenever I’m in Highrise.

Obviously, it would be ideal if my co-workers and I could all login to a shared Highrise account and view these notes without exporting. But since we’re not at that point yet, I’m happy that the Highrise API is so easy to use and I can build my own workaround.

Advertisements

Automated backup to Strongspace with rsync, Automator, and Highrise

Not long ago, I switched to TextDrive after being let down by a cheaper web host. So far, it’s been great…it’s a lot more feature rich and the people over there really know what they’re doing.

The basic $8/month plan includes access to 5GB of file storage for backup/sharing/whatever. I use it to back up regular ol’ documents and files on a daily basis.

They make this easy to do with a UNIX tool called rsync that compresses and transfers only the files that have changed. rsync is the real workhorse here, but I’ve rigged up a backup solution that utilizes all of the following tools:

  • rsync – does the actual file transfer
  • ssh keys – used to avoid entering manual passwords, which enables scripting
  • Automator – ties together the scripts into an application
  • iCal – enables scheduling of the application
  • Growl – provides notification onscreen that the script ran
  • Highrise – keeps a running history of the activity and provides RSS access

To cut to the case, download this file and check out the scripts. For more detail, read on.

This idea uses the UNIX philosophy of employing many small tools each perfectly suited for their job. (I love it.) Let’s take it step by step.

  1. rsync – It’s easy to familiarize yourself with this portion, since you can run it “interactively” on the command line. I do something very similar to what this gentleman did, though I supply slightly different options to rsync as per the recommendations of the Strongspace folks.
  2. ssh keys – If you play with rsync for a while, you’ll see that it asks for a password when you run it. Since we want to script this, we can’t have that, now can we? Fortunately it’s easy to generate ssh keys, which basically make your computer and your Strongspace account “trust each other” so that checking ID isn’t necessary.
  3. Automator – This part is pretty easy…I use Automator in OS X to string together the basic sequence of steps: backup the files, send the log to Highrise, and flash a Growl notification. Download this file to check it out.
  4. iCal – I chose to use iCal to schedule the Automator action (using this basic method) rather than a daemon like cron because it seemed like a more natural, Mac-like fit.
  5. Growl – I’ll be honest, this step is mostly for fun…Growl is just good times. However, I do use it as a quick validation that iCal lauched the script.
  6. Highrise – Growl is cool, but it didn’t provide much in the way of detail as to what happened with the script. I kinda wanted to see a log of what happened, except I didn’t feel like managing log files. I was really looking to get the log info via RSS, and for that I had to post it to the web somewhere. Highrise solves all these issues, and the default Dashboard view is great in the way it highlights the latest info. (After all, I really don’t care about yesterday’s backup after today.) My script e-mails the contents of the log file to my Highrise Dropbox, which was really easy to do with just a few lines of Ruby code.

So far, this has worked without a hitch, and I feel much better having my files backed up everyday.