2013 in Review: Listacular and plain text lists

Last year, my first Python script converted a regular list to the Listacular syntax and uploaded it on your Dropbox using Drafts. The script was like a bull in a china shop and Eric Pramono taught my first Python lesson right there. This is a promising year for Listacular, however, you can update your actions while we wait for its upcoming release.

A lot has changed in the last year, Drafts now supports prepending/appending items into a Dropbox file, however, it requires a predefined file name, if you want to use the first line as title, just use the [[title]] as a predefined file name and set the template to your [[body]]. Listacular's syntax is simple, just add a dash & space before an item to turn it into a task. But how to convert every line from our Drafts' [[body]] into Listacular tasks while avoiding the [[title]] tag? Easy, let's call our loyal friend TextTool with this Drafts' action:

Tasks to Listacular in Drafts:

texttool://x-callback-url/transform?text=[[body]]&method=list&style=dash&x-success={{drafts://x-callback-url/create?text=[[title]]%0A[[output]]&action=List-Groceries}}

It works by sending only the [[body]] to TextTool and applying the [[title]] directly into the x-success parameter, followed by an encoded line break, %0A, and the [[output]] from TextTool. Then we call a Dropbox action named List-Groceries, which you can get here. However, there's another way to achieve the same outcome using Launch Center Pro.

By now you know Launch Center Pro can access your Dropbox, but in the last update it also manages to prepend or append items into them. That sound great, but how you dash the items? Well, that's when I was pointed out by Edi Venturin towards an undocumented parameter posted on Twitter by Justin Youens that lets you create a template for each line of your prompt.

Tasks to Listacular w/ list:

launch://dropbox/append?text=[prompt-return:What you gonna do?]&path={{/Apps/Listacular/}}&name=[list:Pick your list|Inbox=inbox.txt|Someday=someday.txt|Groceries=groceries.txt|Blog=blog.txt]&linetemplate={{- [text]}}

This action uses [prompt-return] to let you tap return without launching the rest of the workflow. After typing you tasks, you'll be prompted with a [list] containing your lists, notice that I'm using regular names and leaving the file name to the value. Then comes the magical trick, linetemplate={{- [text]}} picks every line and includes the dash & space. If you love memorizing your task lists or create a list for every task (maybe you're using files as projects or something), then you may want to set a prompt instead of a list to pick the destination of your tasks. Then you should use the following action.

Tasks to Listacular w/ prompt:

launch://dropbox/append?text=[prompt-return:What you gonna do?]&path={{/Apps/Listacular/}}&name=[prompt::What's name of the list?].txt&linetemplate={{- [text]}}

Almost the same thing, right? I'm using an extra colon in [prompt::What's the name of the list?]to avoid capitalizing the first letter of the list name because I like my plain text documents in lowercase, but that's up to you. These actions may keep you occupied while we wait for Listacular 2.0 and its promising new features to manage plain text task lists. It's coming so soon I don't even know why I wrote this article. Mondays.