How To: Sync Taskpaper and iPhone Notes over wifi (Formatted version)

IMPORTANT!: These instructions are for the version which formats the iPhone notes (Headings underlined, projects in blocks for clarity, @done tasks line-through, tags in blue, notes in grey). For the plain version, please visit these instructions.

- a Hacked iPhone or hacked iPod Touch with Notes installed
- installed on the hacked iPhone
- Mac OS X 10.5+
- Python 2.5+

I love Taskpaper, and I love the iPhone Notes app (yeh weirdo, I know!) and together they make for an excellent and simple GTD solution. This tutorial will guide you through the processes needed to set up semi-automatic syncing bewteen the two – at the end of it you will have two applications (synctoiphone and syncfromiphone) which you can put in your dock, on the desktop, run from quicksilver or launchbar, whatever suits your needs most.

This works out of the box so to speak on Leopard, Tiger users may need to install a newer version of python – see footnote [1]. Usual disclaimers, you do this at your own risk etc as you will be directly writing to your iphone notes databse. It is prudent to make a backup copy should things go wrong.

Step 1: Getting your iPhone set up

Tap and navigate to the Network group. Assuming you have community sources installed (this is found under the sources group) you should see AFPd – install this on your iPhone.

Test your AFP setup by opening a new finder window, clicking on My Hacked iPhone under the Shared group. PLEASE NOTE the username/password prompt is for your iPhone NOT your mac. You should see something like this:

My Hacked iPhone can be renamed from within AFPd on the iPhone. For ease, I choose to remember my password in the keychain.

Next, open the notes app and create a new note with the first line being “Taskpaper” (omit the quotes, see first above image – you must type it exactly as I have, including the capital T, otherwise the apps will not work properly. If you do want to have something else, you will need to amend the python script at the heart of these apps).
Note down the number of this note as we will need it later, for example if there were 6 notes before you created this, the number will be 7. Please see footnote [2] if you run in to problems, this numbering maybe the root cause.

Step 2: Creating the ‘apps’

Download the following two Automator workflow files in this zip archive. Lets open up the first one, syncfromiphone.workflow.

When you open this up, you will see a run shell script module set to run some python commands. You will need to dive in here and change a couple of things (gasp!!). Firstly, get the note number we talked about in step 1 and place in betweem the double quotes. Look for the following lines of code

# ###### MAKE CHANGES TO Notes_Id HERE, REPLACE 7 #########

n = c.execute(‘SELECT data FROM note_bodies WHERE note_id=”7″‘)


Next, change the script to tell it where your taskpaper file is. Look for the following lines and change accordingly. Note that you cannot use ~ to represent you as user, you will need to put the actual path in.




When done, choose File -> Save and save as an Application. Call it syncfromiphone or whatever suits you best. Drag into the Dock, into Applications, onto your desktop, into your Finder sidebar, you choose, its entirely up to you.

Now open up synctoiphone.workflow and similar to above, change the following:



# ############


# ###### MAKE CHANGES TO Notes_Id HERE, REPLACE 7 #########

c.execute(‘UPDATE note_bodies SET data=? WHERE note_id=”7″‘,a)

# ############

Choose File -> Save and save as an Application and call synctoiphone or similar. Place next to your first app.

Step 3: We’re Done!

OK, we should be done know. Whenever you want to sync taskpaper and notes, just open up a finder window and make sure that you are connected via AFP. Also make doubly sure that Root’s Home is also mounted – you may have to physically click on this folder in the finder to mount it.

Recommended: As an alternative, you can add two more modules to the begining of automator workflow (before the python module) which will connect to the AFP iphone automatically (I have not included as it has to be done for the specific iphone). Open up each workflow and drag in Get Specified Servers and add your iPhone. Input the iphone username and password, optionally add to keychain to avoid password prompt.

Now drag in the connect to servers module between the get specified servers and run shell script modules. Repeat for other workflow. Voila! Whenever you run the automator app with these two in, when prompted select Root’s Home in the list. Also, please see footnote [4]

Made changes to taskpaper and want to sync it up to the iPhone? Save any changes then launch the synctoiphone application. Made a few changes to the iphone version? Simple, just launch the syncfromiphone application then open up taskpaper (do not open up taskpaper first as the changes made will not refresh if you already have the taskpaper document open. What I have done is add an additional workflow module after the shell script in syncfromiphone to open up the taskpaper file).

Tab Key: As there is no tab key on the iPhone, insert 4 spaces and it will be converted during the down sync.

Icons: If you want to change your default automator robot icons for the apps you create above, find a copy of (rubbish) alternatives in this file

Thats pretty much it. Enjoy :-)


[1] You will need python 2.5 or above installed on your mac (if you are running Leopard then you are ok!). To find out which version you are running, open up Terminal and type python -V
[2] Everytime you create a new note, it is given a unique id (note_id in the database) which is incremental. For example if there are 6 notes and you create a seventh, it will be given the id of 7. However, if you create 6 notes, delete note 5 then create the Taskpaper note, it will be given the spare id of 5. If you are having problems, install sqlite database browser, navigate to note_bodies table and find the unique id.
[3] Any python developers out there?? This is my first attempt at python so may be a little rough around the edges.

[4] If you sync with the get specified servers method, it will mount the iphone. Therefore, if you try syncing more than once in any one session, Root’s Home will be greyed out as it has already been mounted, therefore you have to press cancel to ignore this step of the automator workflow. Also, dissallow AFPd broadcasting on your iPhone AFPd preferences so that you do not get duplicate afp sources in finder.

Blogged with Flock

Tags: , , ,

115 thoughts on “How To: Sync Taskpaper and iPhone Notes over wifi (Formatted version)

  1. ???? ????????? ??????? ?????? ?? ?? ???? ??????? ????? ????? ??? ??????? ??? ???? ????? ????? [url= ]montblanc ?????????? [/url]??? ??? ??? ???? ?????? ????? ?????? ?????? ???? ????
    ??? ??? ???? ????? ??? ?? ???? ??? ??? ???? ???? ???? ????? ???? ??????????? ?????? ??? [url= ]????? ??? ?? [/url]????? ????? ??? ??? ?????? ????? ??? ???? ???? ???? ?????? ??? ???? ???? ???
    ???? ???? ???? ??? ???? ?????? ???? ?????? ??? ???? ??? ??? ????? ??? ?? ???? [url= ]?????? ???? [/url]?????? ??? ???? ???? ?????? ????? ????? ?????? ?????? ????? ???? ?????? ??? ???? ????? ???
    ?????? ???? ?? ?? ??? ???? ????? ???? ??? ?????? ???? ??? ???? ????? ??? ?????? [url= ]???? ??????? ??? [/url]??? ???? ??? ???? ???? ??? ?? ????? ??????? ???? ??? ??? ???? ???????? ?? ??????
    ???? ???? ???? ???? ???? ??????? ???? ???? ???? ?????? ?????? ???????? ???? ??? [url= ]???? ???? ??? [/url]???? ??? ??? ??? ????? ??? ??? ???? ????? ?????? ??? ???? ???? ????? ???? ?? ?????

  2. Another year sunporno
    im tired of them fucking talking its the same thing over and over again oh yeah baby it feels so good oh yea baby it feels so good oh yea oh baby it feels so good

  3. Where’s the nearest cash machine? phimsex
    A woman who lived in the apartment above us used to scream and moan like that. I wanted to go up and punch her in the mouth! I was glad when she moved out!

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>