views:

430

answers:

5

I'm looking to create a very small cataloguing app for personal use (although I'd open source it if I thought anyone else would use it). I don't want a web app as it seems like overkill to have an application server just for this - plus I like the idea of it being standalone and sticking it on a USB stick.

My Criterea:

  • Interface must be simple to program. It can be curses-style if that makes it easer to code. My experience with ncurses would suggest otherwise, but I'd actually quite like a commanline UI.
  • Language doesn't really matter. My rough order of preference (highest first):
    • Python
    • C
    • C++
    • Java
    • I'll consider anything linux-friendly
  • I'm thinking sqlite for storage, but other (embeddable) suggestions welcome.

Has anyone done this sort of thing in the past? Any suggestions? Pitfalls to avoid?

EDIT:

Ok, it looks like python+sqlite is the early winner. That just leaves the question of which ui library. I know you get tkinter for free in python - but it's just so ugly (I'd rather have a curses interface). I've done some GTK in C, but it looks fairly un-natural in python. I had a very brief dabble with wxwidgets but the documentation's pretty atrocious IIRC (They renamed the module at some point I think, and it's all a bit confused).

So that leaves me with pyqt4, or some sort of console library. Or maybe GTK. Thoughts? Or have I been too hasty in writing off one of the above?

+5  A: 

I would definitely recommend (or second, if you're already thinking it) - python with sqlite3. It's simple, portable and no big db drivers. I wrote a similar app for my own cataloguing purposes and it's doing just fine.

sykora
What did you use for the front end? I'm finding it hard to find a good 3-way match between language, db and ui.
Draemon
I'm just using a simple command line option interface to interact. I planned on adding a curses ui, but never got to it. My curses programming skills are non-existent.
sykora
A: 

I second (or third) python and sqlite.

As far as suggestions are concerned:

If you're feeling minimally ambitious, I'd suggest building a very simple web service to synchronize your catalog to a server. I've done this (ashamedly, a few times) for similar purposes in the past.

With sqlite, backups can literally be as simple as uploading or downloading the latest database file, depending on the file's timestamp.

Then, if you lose or break your flash drive (smashed to pieces, in my case), your catalog isn't lost. You gain more portability, at least 1 backup, and some peace of mind.

drfloob
A: 

You could also use Bash to make the app

Movaxes
I love bash for short scripts the way I like using a razor to shave. I dislike bash for (even small) apps the way I would dislike using a razor to brush my teeth...
Draemon
Well probably you are right
Movaxes
+2  A: 

I vote for pyqt or wx for the GUI. (And second the Python+sqlite votes to answer the original question.)

Ross