Inching Toward Momento

Inching Toward Momento

It suddenly occurred to me that, while I can’t easily capture everything I do online in Day One, I can at least capture my posts here. So I’ve modified the script that runs when I have new posts and added the following:

####################################################
# Update Day One
####################################################
my $jDate = get_journal_date_time();

my $jPost = "Posted [$post{TITLE}]($post{SHORT}) to [$DOMAIN]($DOMAIN).";
open(TMP, "> $TEMP_DIR/tmp.txt") || die "Cannot open TMP: $!\n$TEMP_DIR/tmp.txt\n";
print TMP "$jPost";
close TMP;

`/usr/local/bin/dayone -d="$jDate" new < $TEMP_DIR/tmp.txt`;

This grabs the current date and time as required by Day One, then writes something like the following to a temporary file:

Posted Jumping to Day One to http://spiritofnine.com.

It then runs the Day One command line interface, giving it the appropriate date and time, and feeds it the temporary file which contains the text of the entry. So now, whenever I make a post here, it shows up in Day One.

That’s kind of cool.

No.

That’s really awesome.