Idea: text files plus svn for iPhone list makers

[Note: What follows is just an idea, very possibly a flawed one. I doubt I'll try to build this any time soon. Feel free to beat me to it!]

I just switched from the iPhone's built-in Notes app to an app called Notebook, by Appigo. It's nicely done and looks really good in Verdana 14, but of course it isn't exactly what I want, because no text editor in history has ever been perfect for anyone.

Besides looking as nice as Notebook, here are three features I'd like in an iPhone notes app. If such an app exists, I'd love to know about it.

  • Svn for online storage: Do svn checkouts and commits against a repository where I've stored text files. Do svn adds and deletes as appropriate.
  • Paragraph-based operations:
    • Have gestures for moving the current paragraph up and down. This would help move a paragraph without having to stupidly delete it and retype it.
    • Have gestures for cutting and pasting the current paragraph. If you're a vi user, think "dd", then navigating somewhere else in the doc, then "p" or "P". Unlike in a desktop app, cutting shouldn't be allowed if the paste buffer has something in it, and pasting should clear the paste buffer. This is to prevent accidentally blowing away something I'd cut and meant to paste somewhere.
    • Have a separate gesture for deleting the current paragraph without affecting the paste buffer.
    • The paste buffer should survive between launches of the app.
  • Randomness: View five random paragraphs.

"Svn for online storage" comes from the fact that I want to edit my files on both my iPhone and my computer.

"Paragraph-based operations" comes from the fact that I use text files for lists. I've tried list-oriented apps but I keep coming back to text files.

"Randomness" comes from the fact that I jot down all kinds of things in a single text file on my iPhone. (Indeed, I might not mind if my hypothetical app only supported one text file.) My text file contains not only to-dos but odd things people said, random philosophical musings, ideas for apps I wish existed, the attendance list from the last CocoaHeads (no reason, I'm just a packrat for this kind of info), book titles I see at the store and want to Google when I get home, and so on. I don't prune the list as often as I should and sometimes stuff in there is months old.

I think it might trigger interesting thoughts to see a random sampling once in a while. Imagine shaking the iPhone, or doing some other gesture that means "random," and seeing the following appear (actual items from my list):

  • Hot dog rebar
  • Bear little brain simple caveman
  • Pacquiao Hatton
  • Try Bee apps
  • Exploit my appetites

("Hot dog rebar" is a technique one of my coworkers mentioned for making meatloaf.)

It seems to me the hardest technical and design challenge would be using svn. Appigo's app lets you sync your notes online if you have a Toodledo account, and this works very nicely, but it doesn't merge changes: the last update of a file wins. So if I make some edits on my phone, then get home and without thinking make some edits via the web site, doing a normal sync will cause me to lose data.

This is why I've been keeping the to-do list for AppKiDo in a text file in svn. I can edit it on my laptop or my desktop without having to remember which machine has the latest edits.

I don't know if the iPhone can be an svn client. It might have to upload files to a hosted directory somewhere that would be a proxy for the iPhone, and tell the host to perform the svn operations. This means writing server code, but might be the only/easiest solution.

What about svn conflicts? Offhand I don't think I want to resolve conflicts on the phone. It's too ugly a task even in a desktop app. My first thought is to check first if there's a conflict, and if so, don't do the svn operation. Then I need to figure out some other way to get the changes from the iPhone into the document and get the merge back down into the iPhone.

Svn diffs would be tricky to do well, but could be valuable so I'm reluctant to leave the feature out altogether. It would be nice to come up with a nice way to view diffs on the phone, but worst case, I could view the raw output of svn diff.

Just to play my own devil's advocate for a minute: instead of all the work of figuring out an svn-based solution, maybe I could live with the Toodledo model, and just be careful to sync my iPhone frequently.

I haven't thought much about a name for this hypothetical app. How about "iNapkin"?

UPDATE: A possible alternative to solving the svn problem, which may or may not make sense: how about when you "upload" the file from the iPhone, the entire file gets HTTP-POSTed to an "upload URL" that you specify. The response is some XML that may contain a modified version of the file that will replace the file you uploaded. Then people can implement the server side of this — the thing the URL points to — however they want. There's probably some smarter pattern/implementation for this already. Just putting the idea out there — and now I have to run to something I'm late for…

UPDATE: I have switched editors again.

6 thoughts on “Idea: text files plus svn for iPhone list makers

  1. Have you tried notespark? It's an iPhone / web notes app and under the hood, we built a synchronization server that is, essentially, a mini-revision control system. It was the only way we could get merging to work in complex situations.

    The server keeps track of which version you have "checked out" from the phone, and does three way merges when conflicts arise. This might have been a bit of over-engineering, but we wanted the system to be robust when multiple people edit the note simultaneously.

    The server keeps a history of every revision of every note. We don't expose that to users because.. um.. it seemed like overkill for a notes app. 🙂

  2. I would buy the first hand held mobile device to have an SVN client. I like SVN.

  3. I also would pay for a text editor that let me check out and check in a single file to a revision control system.

  4. Regarding the using svn as a storage system. Currently svn is not designed to checkout and commit single files so it would be cumbersome for a notes app to use svn. However I am the developer of an svn client the for iphone, it's called iVersion and is available in the app store. Commit support is not available at present, but will be added soon.

  5. Ben, thanks, I'll check out (so to speak) iVersion. Not sure what you mean about svn not designed for single files? I check out and commit single files all the time.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.