Sync Taskpaper with Things


#1

Hi everyone. I wanted to share an app that I’ve written in Swift that will sync Taskpaper tasks into Things.

Here’s why I did this.

Taskpaper is great for keeping track of projects and tasks. But it’s not so great on mobile. With a big Taskpaper file it’s difficult to quickly see what I need to do today. I wanted a way so that if a task is marked as @due, I am reminded on my phone that it is due. Same thing for @start and @today/@flag.

So using Jesse’s open source Swift Taskpaper framework (https://github.com/jessegrosjean/BirchOutline), and Things (which has great Applescript support) I’ve written an app that will sync tasks from a Taskpaper file into Things.

Here’s how to use it:

The app will only sync the tasks with the following tags:

@flag
@due
@today
@start

Flag and Today tagged tasks will show up as “Today” in Things.

Due tagged tasks will be added to Things with a due date. (and show up in today on the due date)

Start tagged tasks will be scheduled for their start date in Things. (and show up in today on the due date)

Completing tasks in either Taskpaper or Things will mark them complete between the two.

However, making any changes in Things (other than completing) will not sync back to Taskpaper. This app is designed so that Taskpaper is the source of truth. Things is simply a way to quickly look at what is today, due, and scheduled.

So sync is 1 direction from Taskpaper to Things (except for marking things as complete which will go both ways).

Format

For @due and @start they need to have dates with format of (YYYY-MM-DD)

Example:

@start(2016-12-03)
@due(2016-12-03)

IMPORTANT: Things needs to have an Area called “Taskpaper”. Thats where all the tasks will be synced to. If the area doesn’t exist the app will not work.

Sync

You can either sync manually by clicking the sync button.

Or, by default, the app will sync every 30 minutes. To change this edit the Repeat Sync field. (in minutes)

Usage

  1. In Things, create a new Area called “Taskpaper”
  2. Run the TPThingsSync app
  3. Click Pick File and select the taskpaper file you’d like to sync with Things
  4. Click sync

How to get

I’ve open sourced the code so everyone can check out what’s going on and how you may want to improve for your own workflow. You can find it here: https://github.com/ahlager/TPThingsSync

Or, if you’d like to download the app and run it the link is here: https://www.dropbox.com/sh/enwi7hgtw74worb/AAAHkNMMj557sMUzVUrKvD_Ja?dl=0


#2

Glad to see you are using the swift API! I just looked really fast through the code and noticed that you might be able to use outline.evaluateItemPath() to save some code. For example you have:

//Get all items with due dates
let items = outline.items
for item: ItemType in items {
    if item.hasAttribute("data-due") {
        if item.hasAttribute("data-done") {
            //do nothing
        } else {
            tpItemsDueArray.append(item)
        }
    }
}

Using outline.evaluateItemPath I think you can do the same thing as:

let dueItems = outline.evaluateItemPath("@due and not @done")

This would also make it easier to adjust the effected items going forward. More info on item path syntax is in the user’s guide or just ask in these forums.


#3

Wow. Thanks for making this and sharing. I’m using Things as my task manager now, but this is us just a very cool option!


#4

Ahh thats much better. Thanks for the suggestion.


#5

Cool Phil, I hope it’s useful for you. Let me know if you see any oddities or improvements.


#6

@ahlager I love it!

Couple of quick questions, does Things on the desktop need to be running to stay in sync or can I use just your app helper?

Also, any suggestions on hiding the dock icon?

Thanks for creating this, really does fill a hole in my new system as I was struggling with the same dilemma of managing long list and only wanting immediate tasks at hand on my phone.


#7

@miklb Glad you like it

Yes, Things needs to be running on the desktop. That’s a requirement from Things and Applescript.

Next up is to hide the dock icon. Ideally this would just be a menu bar app.


#8

The app is very useful, thanks a lot!

theres one thing that I want to report, after creating “Taskpaper” area the app syncs one time, after that every time I try to sync again the app crashes!

On mac OS Sierra 10.12.3 Beta (16D25a)


#9

this is awesome, but I think it is pulling in tasks from the Archive too.


#10

I’ve just started looking into TaskPaper. I really like the idea behind it. However, the whole date/due/syncing with iPhone thing looks too complex and fiddly from my experience so far. Ideally, what I’d like is to do my planning in TaskPaper and then export to Things. This app (TPThingsSync) looks perfect for my needs, but each time I click on the Sync button the app crashes. I’m using 10.13.