Skip to content
NodeJS Module to create, list and remove Day One Journal entries
Latest commit 64300f3 Jun 1, 2016 @pwaldhauer Merge pull request #12 from esundahl/master
update plist package
Failed to load latest commit information.
test added assertion on save step of the remove() unit test - this hid an … Feb 27, 2014
package.json update plist version May 29, 2016
test.js Updated plist, added testscript Aug 4, 2014


NodeJS Module to create, list and remove Day One Journal entries, without using the Day One command line tools.


var DayOne = require('dayone').DayOne;
var DayOneEntry = require('dayone').DayOneEntry;

// Basic entry
var entry = new DayOneEntry();
entry.creationDate = new Date();
entry.text = 'Very thoughtful entry!';
entry.tags = ['Test'];

// Attach a photo!
var entryWithPhoto = new DayOneEntry();
entryWithPhoto.text = 'Have a photo!'; = new Buffer(fs.readFileSync('photo.jpg'));

var dayone = new DayOne();, function(error) {

Optionally DayOne() accepts an object containing a directory that should point to the Day One Journal directory. If omitted it will use the iCloud documents directory by default. If it doesn't find the iCloud directory, it will use the Dropbox Application directory.

For more usage examples take a look at the tests or Elizabeth, my script to export your data, which uses this module. Surprise!


DayOne#list(options, cb)

Lists all entries in the journal. List may be filtered by tags by passing in {"tags": ["Tags", "to", "filter", "by"]} as options. The callback should be a function(err, entries) {}.

DayOne#save(entry, cb)

Saves the given DayOneEntry. The callback should be a function(err) {}.

DayOne#remove(uuid, cb)

Removes the entry. The callback should be a function(err) {}.


Basically an object with the following fields: creationDate (Date), text (String), tags (Array), timezone (String), starred (Bool), UUID (String), photo (Buffer). If the UUID is not defined it will be automatically created.


Feel free to contribute! :)

Something went wrong with that request. Please try again.