Manual
Reference
foundations
Dropbox
Dropbox is both used as a simple way for me to read and modify documents on my phone, as well as a generic transport for programs to read and write to. I suspect that without Dropbox any other automation would be much harder.
Heroku
Heroku is where I host the tool receiving messages from Twilio. Hosting elsewhere is obviously possible but Heroku is free at my usage level and super simple.
Hugo
Hugo is a simple and fast static-site generator that I use to provide the read-only browser-based view of these notes.
The following is a screenshot (with sensitive parts blurred) of my homepage, which uses tags on the notes to aggregate them in various sections.
XXX: link to source of homepage once public
Leatherman
For a few of the tools described later, I use my leatherman, which has various commands that are generally useful.
Twilio
Twilio allows a basic but very useful SMS interface.
amygdala
amygdala
is a service I built to handle tasks from my phone. It is built to
have SMS inputs and outputs, though can do a touch more.
todo
This is the default action; if your statement matches nothing, a note is added
to my dropbox with the inbox
tag such that it end up on the homepage or
viewable via :In
.
inspire me
If I text inspire me
to amygdala, the response will be a random line from
my inspiration.
remind me
If I text remind me to <do whatever> at <some time>
a reminder will be
enqueued. Currently that triggers via pushover and wall(1)
, though I intend
to add more in the future.
Vim
:Epost :Enw :Enh :Evim :Ein
These commands are automatically created by
vim-projectionist; :Epost <post>
allows you to quickly access a note by name. If the note doesn't already exist
a basic but functional starter template is provided.
:Enw
, :Enh
, :Evim
, and :Ein
jump directly to the next-steps work note,
the next-steops home note, the vim plugin, and the inbox note.
:Tagged
Populates the quickfix with any notes that have the passed tag.
:In
Populates the quickfix with all the notes tagged inbox
. Typically these notes
are created via amygdala's
todo.
:Done
Deletes the current note and moves to the next one in the quickfix; for use with
:In
.
:RSS
Writes a markdown link for all new posts to the current buffer. Calls
:Undefer
to maintain a simpler interface. Uses load-rss
.
:Undefer
:Undefer
undefer's any
deferred content to the current buffer. Uses run-undefer
.
:FxTabs
:FxTabs
writes a markdown link for each tab to the current buffer. Can take
arguments which will be passed to grep(1)
in order to limit which tabs get put
in the current buffer. Uses fx-tabs
.
:Mail
writes a markdown link (using
email2json
and one
of my custom mimetypes) for each email in both of my
email inboxes. Can take arguments which will be passed to grep(1)
in order to
limit which messages will get put in the current buffer. Uses
dump-mail
.
:Grab :Steal
Possibly a plugin itself, but Incubating here. Usage is currently: :Grab bufferRegex lineRegex
The above will copy any lines matching the lineRegex
from any buffers matching
bufferRegex
to the current buffer. :Steal
acts the same, but removes the
original lines. Inspired by :t and :m, respectively.
g
Shortcut for clicking links in the current line. Prefers markdown links but will work with raw http or https links. Will find a link to the right of the cursor, but if it can't will try at the beginning of the line.
Tools
The tools here are mostly shell or perl scripts that are generally supporting the interfaces above.
q
$ bin/zine q -sql 'SELECT filename FROM _ WHERE tag == ?' inbox
content/posts/000-IN.md
content/posts/todo-3df9f3332087a6dce550743ffbf5c606ac068b6d.md
content/posts/todo-3f276a704b4e0a8aa0855f677fd04fb6e285bb0d.md
content/posts/todo-4587e74f1e27a68be5f702aaf263bd30d6f5a8f0.md
content/posts/todo-96fc6509be13616f0b4de4f9434ae95f88da5b03.md
--sql
takes a single SQL query.
--formatter
takes a string of perl code to evaluate, which will have a %r
with each row inside of it.
Any leftover arguments are treated as parameters to bind in the SQL.
Configuration
Add something like this to config.yaml
to configure fields you care about:
q:
post-facets:
- deadline
- rating
Schema
($facets_sql
is a sql fragment of facets from the Configuration above.)
CREATE TABLE articles (
title,
date,
guid,
filename $facets_sql
);
CREATE TABLE article_tag ( guid, tag );
CREATE VIEW _ ( guid, title, date, filename, tag $facets ) AS
SELECT a.guid, title, date, filename, tag
$facets_sql
FROM articles a
JOIN article_tag at ON a.guid = at.guid;
XXX Add -h
I have blogged about this before and use it in at least three other projects. It is the foundation that allows most of the tools below.
check-oss-cv
My OSS CV is intended to be a list of all the OSS I've ever done that's worth mentioning. This tool uses git-hub to ensure that I don't have any repos (or whatever) that are not linked to.
check-private
This tool simply exits non-zero if it can find any posts that are private in the current corpus. Used in the public build to ensure nothing sensitive gets published.
dump-mail
Combination of email2json and
jq to produce markdown links of all of my
inbox. Used by :Mail
.
fix-nl
Tool to fix newlines and trailing whitespace on all notes in the repository. Typically used after editing a file from the Dropbox mobile app.
fx-tabs
Combination of dump-mozlz4
and jq to produce markdown links of all of my
open firefox tabs. Used by :FxTabs
.
load-rss
Combination of rss and GNU
parallel to fetch my various RSS feeds
and write the new posts (as markdown links) on stdout. Used by :RSS
.
missing-canonical-tag
Prints a list of notes that are lacking any of the canonical tags, namely:
- project
- reference
- incubation
- next-steps
- meta
- waiting
- inbox
public-build
Builds a public view of the notes; namely, all articles containing a public tag and lacking a private tag.
run-undefer
Undefers any deferred notes;
used by :Undefer
, and thus :RSS
.
tag-files
Lists all files with a given tag. Used by :Tagged
and thus
:In
.
tags
Lists tags ordered by their frequency.
If you pass an argument, filter tags with the argument as a prefix.
Tutorial
Example workflow
- Have an idea
- Text it to my amygdala
- Run
:In
at some point - Idea is in quickfix
- If it's brief, just do it,
:Done
- If it's simple, add idea to apropriate contextual next-steps,
:Done
- If it's complicated, start a project with a name, next-steps, reference, etc
and add one of the next-steps to a contextual next-steps list,
:Done
- Iterate on stuff in appropriate next-steps list