Tweet This Post

The following is inspired by Using Launch Center Pro 2, Drafts, and Dropbox to List Down My Expenses by Dexter Ang.

I am currently using a TiddlyWiki to keep track of spending. I have written actions for both Launch Center Pro and Drafts to enter expenses and then have the data prepended to a text file in wiki table format. At my convenience, I can then copy a row from the table and paste it into the appropriate financial category tiddler. (Note that all of the following can be used to simply add a running list of expenses into a Markdown table in a text file -- you don't need to use a wiki with these actions.)

A row in a wiki- or markdown-table looks like this:

|2014-02-12|Groceries|$14|

The LCP action uses the TextExpander snippet to enter the date, and uses prompts to enter the type of spending and the amount spent. These three fields are separated by an URL-encoded pipe (|), and then the entire string is sent to Drafts to launch the moneyWiki action. Upon success, I am sent back to LCP.

drafts://x-callback-url/create?text=<ddate>%7C[prompt:Where and What]%7C%24[prompt-num:Amount]&action=moneyWiki&x-success={{launch:}}

(%7C is an URL-encoded |. %24 is an URL-encoded $.)

In Drafts, moneyWiki is a Dropbox action in which I prepend the following to the money.txt file in my /Apps/TWSync/Text/ folder in Dropbox:

|[[draft]]|

(The folder can be of your choosing. I use TWSync because that's where TWEdit syncs TiddlyWiki files.)

When the [[draft]] is surrounded by pipes, the result is a valid table row. The advantage of this action is that I can enter something like 2014-02-12|Groceries|$14 into Drafts, trigger the same moneyWiki action, and once again have a valid table row prepended into my money.txt file. (In other words, I can enter expenses into LCP on-the-go, or enter into Drafts so that I can act upon the draft later -- for instance, if I do not have internet access.)

Addendum: A Note About Markdown Tables

After reading more about tables in Markdown, I've learned that Markdown proper doesn't include special formatting for tables, but extensions like Github Flavored Markdown do. In this case, a table must have a header to render properly. If you're going to use a header, then obviously you cannot prepend new expenses to your text file, you will have to append instead.

02/11/14; 10:51:54 AM

Last built: Mon, May 12, 2014 at 8:52 AM

By Jeffrey Kishner, Tuesday, February 11, 2014 at 10:51 AM.