How To: Sync Taskpaper to iPhone Notes over wifi (Plain version)
Important! These instructions are for the plain version. If you would like your iPhone note formatted (headings underlines, projects in blocks for clarity, tags in blue, notes in grey) please visit these instructions.
You will need:
- a Hacked iPhone or hacked iPod Touch with Notes installed
- Installer.app 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 installer.app 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.
# ###### MAKE CHANGES TO YOUR PATH HERE, DO NOT USE ~ #########
o=open(”/Users/shortusername/Documents/ipodsync.taskpaper”,”w”)
#################
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 YOUR PATH HERE, DO NOT USE ~ #########
o=open(”/Users/shortusername/Documents/ipodsync.taskpaper”,”r”)
# ############
and
# ###### 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
Footnotes:
[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 any tweaking greatfully recieved.
[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: taskpaper, iphone, notes, GTD
12 Comments
Everaldo.com : Blog » Blog Archive » Produtividade com iPhone on January 25th, 2008
[...] No dia-a-dia adotei a metodologia GTD (”Get Things Done”, publicado no Brasil com o criativo nome: “A arte de fazer acontecer”), do escritor americano David Allen. No MAC, uso o Taskpaper para gerenciar minha lista de tarefas. Eu o prefiro, por que diferentemente dos outros softwares GTD, ele é desenvolvido de modo a simular o uso de listas em folhas de papel. Um método simples e eficiente. Para sincronizar, com o Notes do IPHONE, uso o aplicativo AFPd, e alguns aplicativos que eu mesmo criei no Automator, baseado nos scripts desenvolvidos pelo Spatialviews.com. [...]
Everaldo.com : Blog » Blog Archive » Productivity with iPhone on January 25th, 2008
[...] I use the GTD (Get Things Done) metodology , wich was written by David Allen, to organize my day. At the Mac I use the “Taskpaper” to manage my listo of assignments. Unlike other GTD softwares Taskpaper was develop to simulate the use of paper sheets. A simple and effective method. To syncronyze all the informations with the iPhone Notes I use the application AFPd and the scripts developed by Spatialviews.com. [...]
lars on February 1st, 2008
Needs an update for 1.1.3 firmware on the iphone
I have tried editing the script to reflect the new database path but get some coding back in the text file
Like this
Taskpaper
Test
Go
instead of
Test
Go
What do I need to change in the script?
lars on February 1st, 2008
Edit . the coding cannot be displayed here on the blog because it sees it as formatting.
lars on February 1st, 2008
I I got it, to update for iphone 1.1.3
Do the following
replace this :
cn = sqlite3.connect(”/Volumes/iPhone Root FileSystem/var/mobile/Library/Notes/notes.db”)
with this
cn = sqlite3.connect(”/Volumes/Root’s Home/Library/Notes/notes.db”)
lars on February 1st, 2008
I mean the other way around
this is what it has to be
/Volumes/iPhone Root FileSystem/private/var/mobile/Library/Notes/notes.db
lars on February 1st, 2008
sorry for the formatting, the blog makes it own spaces and enters it seems
tones on February 1st, 2008
Thanks for the tips Lars
I’ll update the blog entries to reflect that you can get this to work on unhacked iPhone’s running 1.1.3 – although did you have to specifically allow usb type storage for the phone in iTunes to get it to work (i’m still on 1.1.2)?
lars on February 1st, 2008
I’m running on a 1.1.3 Jailbraked
official dev release via installer app.
works good
Produtividade com iPhone on February 11th, 2008
[...] No dia-a-dia adotei a metodologia GTD (”Get Things Done”, publicado no Brasil com o criativo nome: “A Arte de Fazer Acontecer”), do escritor americano David Allen. No Mac, uso o TaskPaper para gerenciar minha lista de tarefas. Eu o prefiro, porque diferentemente dos outros softwares GTD, ele é desenvolvido de modo a simular o uso de listas em folhas de papel. Um método simples e eficiente. Para sincronizar com o Notes do iPhone, uso o aplicativo AFPd e alguns aplicativos que eu mesmo criei no Automator, baseado nos scripts desenvolvidos pelo Spatialviews.com. [...]
lynseytit on December 9th, 2009
Oh, good joke) What kind of bird can write? A penguin.
___________________________
–/ [url=http://levira.vigara-usa.info/site_map.html]levira online Chicago[/url] /–





spatialviews » How To: Sync Takpaper and iPhone Notes over wifi (Formatted version) on December 4th, 2007
[...] 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. [...]