These VoodooPad Script Plugins are the result of two opposing traits of mine: laziness and curiosity. Laziness because, well, why should I have to move my hand all the way over to my mouse to go to the previous day in my VoodooPad log? Curiosity because I have absolutely no idea what I’m doing in Lua and wanted to see if I could do something just slightly more interesting than my “Go to Today” script.

What I ended up with is a set of three Script Plugins. The original Go to Today plugin, plus new ones for going to the previous and next entry in your log. They work with a VoodooPad document which has pages that follow a consistent, date-based naming pattern. My log1 has a page per day, titled in the format YYYY-MM-DD. The scripts can all be adjusted to work with any format that mktime() can output, with a little fiddling2.

The plugins are mapped to Control-Shift-0 (today) and Control-Shift(+/-) for next and previous. The scripts can handle non-consecutive days, and will just keep searching forward or backward for the next date in the sequence from the current page. They’ll fail silently once it’s checked as many pages as there are in the document. If you trigger them on a page with a non-date-based title, they’ll just exit without causing much trouble.

Installation

To install the plugins, just download the zip file below, unzip it, and move the resulting .lua files into ~/Library/Application Support/VoodooPad/Script Plugins. The folder should already exist, but create it if it doesn’t. Then launch or relaunch VoodooPad, and you should see the new scripts under the Plugins menu.

VoodooPad log navigation v1

VoodooPad Script Plugins for navigating through a log/journal document with date-based page names. Go To Today, Go To Previous Day and Go To Next Day.

Published 11/04/10.

Updated 11/04/10. Changelog

DonateMore info…

  1. Using Ian Beck’s Scratchpad scripts

  2. To change the date format, first edit the dateFormat variable at the top, using mktime() placeholders. Then, find the line that starts with ‘year,month,day =’ and change the search pattern to fit your dateFormat’s output. Just put %d in wherever there’s a digit, and modify the separators as needed. That’s it.