Thought I would share this because maybe there are others with the same need.
I typically use an app called YouNote which is free in the AppStore. I like it better than Notes because you can have text notes, audio notes, web notes, drawing notes, etc.
Well the other day I had just done a restore and didn't have YouNote installed, only Notes. I took some important notes during a meeting, then later when I had YouNote back installed, I wanted those same notes into YouNote. As we all are painfully aware, there is no copy and paste yet on the iphone so I had to devise another solution (other than manually retyping all my notes).
My other issue was that I wanted to find a way to backup my notes via SSH rather than the horrid iTunes backup process.
So, through my research, here's what I came up with. First off, both Notes and YouNote store their information in a SQLite database file (SQLite is an open source database engine).
For YouNote, the file is called notedb.db and is located in the following directory:
/private/var/mobile/Applications/903E5A3E-C1F1-4E65-ADCB-F9CECD34F5FC/Documents
(One thing to note here is that I'm still not clear on how these GUIDs in the folder name are created and mapped to each app, and if they are consistent across phones. If you don't see a folder with the same long number as what I have listed above, just browse the folders that are in the Applications folder until you find one that has the YouNote.app folder inside. This will be the folder you use instead of the path above.)
For the Notes application, the file is called notes.db and is located here:
/private/var/mobile/Library/Notes
So one problem is solved at this point in that I can copy the entire Documents folder over to my desktop computer via SSH and now I have a backup of all my notes (for YouNote) and/or I can copy the notes.db file for Notes.
Now I needed a way to copy specific text from Notes to YouNote. I found a very nice SQLite GUI manager called SQLite2008 Pro Enterprise Manager that is freeware and can be downloaded here.
I copied both .db files from the phone to a directory on my computer, and of course made backups of each in case something went wrong.
Using the manager tool and some very basic SQL skills, you can open the .db file for each app and query the tables that hold the note data, then export that data out to other formats. To make it easier, I first created a test note in YouNote so that I'd have a record in the database table to work with.
In the Notes db file, the main table to be concerned with is called note_bodies. I was able to do a simple query on that table (SELECT * FROM note_bodies) to see all the data and then save it off (right click the record and choose Export).
In the YouNote db file, the table we care about is called note. First I did a similar select query as above and found my test note. There is a field called id which is important, its how we tell the database which record to update. The other field we care about is called text, its where the body of the note is stored. The id value for my test note was 7, so I wrote a simple update query as such: UPDATE note SET text = '<my copied data that I pasted into this query>' WHERE id = 7.
This updated the record with my Notes data that I had saved off, so I just copied the YouNote db file back into the same directory on my phone and presto, my note was copied. This process can be repeated for as many notes as you want to copy, plus you can manipulate the data however you want (i.e. copy multiple notes into one, etc).
This probably sounds like more work than it is, but truly it only took me a few minutes and was definitely faster than retyping my information.
So there you have it, hope you find some or all of this info useful. Happy hacking--
I typically use an app called YouNote which is free in the AppStore. I like it better than Notes because you can have text notes, audio notes, web notes, drawing notes, etc.
Well the other day I had just done a restore and didn't have YouNote installed, only Notes. I took some important notes during a meeting, then later when I had YouNote back installed, I wanted those same notes into YouNote. As we all are painfully aware, there is no copy and paste yet on the iphone so I had to devise another solution (other than manually retyping all my notes).
My other issue was that I wanted to find a way to backup my notes via SSH rather than the horrid iTunes backup process.
So, through my research, here's what I came up with. First off, both Notes and YouNote store their information in a SQLite database file (SQLite is an open source database engine).
For YouNote, the file is called notedb.db and is located in the following directory:
/private/var/mobile/Applications/903E5A3E-C1F1-4E65-ADCB-F9CECD34F5FC/Documents
(One thing to note here is that I'm still not clear on how these GUIDs in the folder name are created and mapped to each app, and if they are consistent across phones. If you don't see a folder with the same long number as what I have listed above, just browse the folders that are in the Applications folder until you find one that has the YouNote.app folder inside. This will be the folder you use instead of the path above.)
For the Notes application, the file is called notes.db and is located here:
/private/var/mobile/Library/Notes
So one problem is solved at this point in that I can copy the entire Documents folder over to my desktop computer via SSH and now I have a backup of all my notes (for YouNote) and/or I can copy the notes.db file for Notes.
Now I needed a way to copy specific text from Notes to YouNote. I found a very nice SQLite GUI manager called SQLite2008 Pro Enterprise Manager that is freeware and can be downloaded here.
I copied both .db files from the phone to a directory on my computer, and of course made backups of each in case something went wrong.
Using the manager tool and some very basic SQL skills, you can open the .db file for each app and query the tables that hold the note data, then export that data out to other formats. To make it easier, I first created a test note in YouNote so that I'd have a record in the database table to work with.
In the Notes db file, the main table to be concerned with is called note_bodies. I was able to do a simple query on that table (SELECT * FROM note_bodies) to see all the data and then save it off (right click the record and choose Export).
In the YouNote db file, the table we care about is called note. First I did a similar select query as above and found my test note. There is a field called id which is important, its how we tell the database which record to update. The other field we care about is called text, its where the body of the note is stored. The id value for my test note was 7, so I wrote a simple update query as such: UPDATE note SET text = '<my copied data that I pasted into this query>' WHERE id = 7.
This updated the record with my Notes data that I had saved off, so I just copied the YouNote db file back into the same directory on my phone and presto, my note was copied. This process can be repeated for as many notes as you want to copy, plus you can manipulate the data however you want (i.e. copy multiple notes into one, etc).
This probably sounds like more work than it is, but truly it only took me a few minutes and was definitely faster than retyping my information.
So there you have it, hope you find some or all of this info useful. Happy hacking--