Thursday, 4 December 2014

I'm retiring ofexport in favour of a completely rewritten ofexport2.

The new one is written in Java and uses open source expression and template libraries, so should be more flexible and extensible than the previous version.

I'm leaving the original in place and there are several forks of it for those interested.

If you're already using the existing version you can install the new version without affecting it.

As ever, let me know if you find any bugs.

Monday, 24 February 2014

Creating DayOne entries from IFTTT recipes using DropBox and Hazel


So IFTTT can automatically add DayOne entries for:
  • Photos taken.
  • Places we go.
  • Weather forecasts.
  • News snippets from RSS feeds.
  • Pretty much anything you can imagine using IFTTT.

How is it going to work?
  • We're going to give IFTTT permission to access DropBox so it can write files.
  • We're going to write a hazel script to look for the IFTT files and create DayOne entries. 

What do we need?

1. Create a "DayOneInbox" folder

Create a DayOneInbox folder in DropBox, this is where IFTTT will drop it's files.

2. Create Hazel rules for "DayOneInbox"

Create a shell script rule for text files:

DATE=`stat -t "__%m/%d/%Y %l:%M%p__" "$FILE" | sed -e 's/.*\"__//g' -e 's/__\".*//g' | tr '[:lower:]' '[:upper:]'`
cat "$FILE" | /usr/local/bin/dayone -d="$DATE" new

Create a shell script rule for images:

DATE=`stat -t "__%m/%d/%Y %l:%M%p__" "$FILE" | sed -e 's/.*\"__//g' -e 's/__\".*//g' | tr '[:lower:]' '[:upper:]'`
/usr/local/bin/dayone -d="$DATE" -p="$FILE" new

You can test this already by dropping images or text files into **DayOneInbox**. Hazel should pick them almost instantly and create DayOne entries.

The beauty of the the rules above is that even if you don't turn your Mac on for a few days, they should be added to DayOne on their creation date.

3. Create IFTTT Recipes

Activate the DropBox Channel in IFTTT. Your IFTTT recipes (whatever they are) should leave text or image files in your DayOneInbox folder.

Sunday, 23 February 2014

ofexport V3.0.5 available

Just made V3.0.5 available.

  • Adding estimatedMinutes and dateAdded as a task parameters that can be used in templates.