Quick Journaling - Write stuff in Today’s Journal and act on it later


#1

The short version is that I like the idea of bullet journals, but in practice I’d much rather log things in my phone or watch than with a pen and paper. I also want the things I’ve written to automatically go to my calendar and task manager, instead of having to sit down with a paper journal and manually transcribe them.

This action group lets me easily:

  • Go to Today’s Journal
  • Append the current draft to Today’s Journal
  • Process journal events and send them to Fantastical, OmniFocus, and Day One

I hope someone else finds this to be useful!

Find it at https://actions.getdrafts.com/g/1Sd


#2

I love this!!! Perfect. I usually go to three places at the end of the day. Having one draft go to three places is fantastic. Thanks


#3

You’re very welcome! I’m glad you like it.


#4

This is great, I just need to edit to change from Omni Focus to Good Tasks.


#5

Awesome! Once you have that working, could you post the new function here? Then I can add it to a new version for other people.


#6

I released a newer version that makes “Append” a little better behaved:

  • It won’t append a draft to itself and eventually cause a black hole of infinite information density.
  • Appended drafts get “- “ added to the beginning if they don’t already start with “-“, “*”, or “@“.
  • Appended drafts don’t have an extra empty line inserted above them.

#7

Only two changes needed to work with GoodTask:

const ofBaseURL = “omnifocus://x-callback-url/add”;
To
const ofBaseURL = “goodtask3://x-callback-url/add”;
And
cb.addParameter(“name”, line);
To
cb.addParameter(“title”, line);

Works a treat


#8

This is really great. Can someone help me please get this with todoist and bear?
Thanks in advance
Inge


#10

I don’t have either of those apps, but if you (or someone else) manages to get it working, I’d be happy to add it.


#11

Today’s version 1.4 adds a human-editable settings file, in the form of a draft named “Quick Journaling settings”. It will be created the first time you run the “Process” action. You can edit that file to select which actions are executed for each journal item’s starting character. Create your own. Delete ones you don’t like. Go wild with it!

This also means that you can upgrade to future versions without wiping out any such local customizations you’ve made. If you set “‘*’ goes to GoodTask” today, it should stay set.


#12

Excellent work! I think this really stays true to the spirit of Drafts ‘capture now process later’ strengths.

I have added the necessary lines in your script for Things support for those interested.

My personal preference is to use ‘-’ for tasks (from the TaskPaper camp) so I switched this with ‘*’ for Day One. So I really appreciate your settings file to easily customise that.

Question: I haven't tested this yet, can you tell us if the settings note needs to remain in Inbox, or is Archive fine? I tend to keep a habit of clearing out my Inbox regularly.

Edit: answered myself by testing and see your ‘all’ statement in the file parameter. Settings file can be moved to Archive thanks!

A further improvement I was thinking would be to allow either the next line following a task, or possibly after a separator such as | to be put in the task’s description, I’ve played around with this but can’t get it working with my remedial javascript skills just yet. ‘notes’ would be the parameter name with Things.

Cheers!

Jason


The main script revised:

const lines = draft.content.split("\n");
const dayoneURL = "dayone2://post"
const fantasticalURL = "fantastical2://x-callback-url/parse";
const goodtaskURL = "goodtask3://x-callback-url/add";
const omnifocusURL = "omnifocus://x-callback-url/add";
const thingsURL = "things:///add";

var dayOneLines = [];

// Actions for sending journal entries to various apps

function collectForDayOne(entry) {
	dayOneLines.push(entry);
}

function sendToFantastical(entry) {
	var cb = CallbackURL.create();
	cb.baseURL = fantasticalURL;
	cb.addParameter("sentence", entry);
	cb.open();
}

function sendToGoodTask(entry) {
	var cb = CallbackURL.create();
	cb.baseURL = goodtaskURL;
	cb.addParameter("title", entry);
	cb.open();
}

function sendToOmniFocus(entry) {
	var cb = CallbackURL.create();
	cb.baseURL = omnifocusURL;
	cb.addParameter("name", entry);
	cb.open();
}

function sendToThings(entry) {
	var cb = CallbackURL.create();
	cb.baseURL = thingsURL;
	cb.addParameter("title", entry);
	cb.open();
}



// Resolve actions defined in the settings file to the actual
// functions to call.

var actionMap = {
	"Day One": collectForDayOne,
	"Fantastical": sendToFantastical,
	"GoodTask": sendToGoodTask,
	"OmniFocus": sendToOmniFocus,
	"Things": sendToThings,
}

var actions = {}
for (var key in lineProcessors) {
	var actionName = lineProcessors[key];
	actions[key] = actionMap[actionName];
}

// Process all the lines.

for(var line of lines) {
	line = line.trim();
	if (line.length == 0) { continue; }

	first = line[0];
	rest = line.substr(1).trim();
	if (rest.length == 0) { continue; }

	action = actions[first];
	if (action === undefined) { continue; }
	
	action(rest);
}

// Some actions are processed in a batch after all their entries
// are collected. This is where that happens.

if (dayOneLines.length) {
	var body = dayOneLines.join("\n\n");
	var cb = CallbackURL.create();
	cb.baseURL = dayoneURL;
	cb.addParameter("entry", body);
	cb.waitForResponse = false;
	cb.open();
}

#13

Thanks the the kind words, and especially for the Things code! I’ve added it to the new version 1.5 that I just pushed out.


#14

I had a similar thought about having a way to get something into the notes field or adding a due date but my javascript skills are rudimentary so no success…
I have started using these actions to process meeting notes. Any actions and dates are transferred into Goodtask and Fantastical and I have added something to transfer the complete draft into Devonthink, neat.


#15

Can GoodTask itself parse the messages if you ask it nicely? For instance, OmniFocus can accept taskpaper formatting and then split that out into the new task’s fields. That to me would be the ideal since it wouldn’t involve reinventing a wheel (if that wheel already exists).