Table of contents
Capture Board
Description
When I was studying computer science at university in the 1990’s I got to the point where the text editor app I was using in Windows just wasn’t cutting it. It wasn’t capable of dealing with larger file sizes and so I upgraded my editor to NoteTab Pro. As well as having it’s own scripting language to control the editor and modify its content (now where have I heard that before?), it had a feature called ‘Pasteboard’. This feature allowed you to keep a running log of text on the clipboard in a text document. I found this really useful for gathering research notes, and thanks to Doctor Drafts, I can build an equivalent that doesn’t even have to rely on the clipboard, but can just put content directly into a daily “captureboard” in Drafts.
Flow
The flow to do this consists of just three sequential blocks.
Building the Flow
The first block is an Inputs > Hotkey
block. It sets up the keyboard combination to trigger the next step (^⌥⌘x
), and the query
to pass on. In this case we want to pass on the current text selection.
The next block is a Utilities > Args and Vars
block. The block sets the title
variable that is used to figure out which draft to append to, and if a new draft needs to be created. It is set to “# Captureboard {date:yyyy-MM-dd}
”, which uses the Alfred date dynamic placeholder to build a title using a datestamp-style format.
The block also builds some additional content around the query
content (the text selection). It puts a spacer line at the start and adds a separator line at the end which again makes use of an Alfred dynamic placeholder, this time for time, to build in a log of when it was captured.
The final step is to link an Outputs > Call External Trigger
block. If you select the Workflow Triggers… button, this will allow you to select from the list of available triggers and will populate the Workflow ID and Trigger ID fields, with no risk of typos. Here we are selecting the drlog
trigger ID from Doctor Drafts.
If you take a look at the Flow - drlog page in the Documentation section, it explains how it works, and what variables it expects to be set. Note in the above screenshot that the Pass input as argument and Pass variables options are set. These are critical to this working correctly.