sm-photo-tool release – 1.20

Version 1.20 of sm-photo-tool is ready to go. You can download it from github:

The following are new configuration options:

  • square thumbs
  • hide owner
  • world searchable
  • smug searchable
  • sort method
  • max size option added to create

Bugs fixed:

  • If filename ends with +, append instead of overwriting log file
  • prompt for password if not in config file
  • invalid login no longer throws a stack trace

Thanks got Lloyd Cha for contributing the fixes for this release.

prompting for password

can I have a do over?

The next webapp I write, I think I’m going with some of the new hotness: NoSQL datastore, RESTful API, and Ruby. On a recent project I chose to use a RESTful API which I really like, but it definitely changes how you think of things coming from the XML-RPC way of doing APIs, but I still like its simplicity.

Unfortunately, I went with Java as the implementation instead of something like python or Ruby, and looking back I don’t know why I did that. I should know by now that python and Ruby are much easier to work with than Java has proven to. Hell even the build environment is a pain: ant – write xml build file from scratch, maven – reminds me of make with lot’s of pom.xml files, or buildr – ruby based maven replacement, annoys all Java people. If I had a do over on this I’d choose Ruby as the implementation language.

Since we’re using Java and needed a database we went with Hibernate. If I had to redo this decision, I most certainly would’ve gone with a NoSQL datastore like MongoDB or CouchDB, this way I could avoid the annoying mapping of domain model to relational tables which is highly annoying.

So if you’re planning a new webapp avoid the boring, traditional webapp design of using a relational database with ORM and compiled languages πŸ™‚

To C or Ruby that is the question :)

I’m trying to decide whether to pick up C again (as it’s been almost 13 years since I’ve done it) or Ruby. I’ve spent the last 13 years in the Java world, as of late I’ve been working with python as much as humanly possible. Ruby keeps me in the web side of things, but C would open up a bunch of Linux opportunities which I find interesting. I know one of my friends would say neither go for Erlang πŸ™‚


Evil Robot Conference (no robots allowed)

On Saturday, I attended the Evil Robot Conference held at Red Hat HQ.

I got there a bit late, but I caught the tail end of Clinton Ebadi’s talk on “UnCommon Web: A Common Lisp Tale of Continuations, Multimethods,
Metaclasses, and Web Applications”. While Lisp can be hard to understand, what you can do with it from a web programming perspective made Java webapps look quite lame considering the amount of code you have to write to make them do anything.

Had lunch at El Cerro with Kevin Smith, from Hypothetical Labs, and a few other folks attending the conference. A good time was had by all, and the salsa was quite spicy but oh so good today πŸ™‚

After lunch, I sat through Dan DeMaggio’s “Anti-databases (NoSQL): Where they came from and where they’re going”. I learned a lot of alternatives to the old school single database setup. There’s a lot of cool stuff out there for this such as redis, Cassandra, couchdb, BigTable.

Dan’s talk was followed by Kevin’s “Intro to Erlang” which was most excellent as well. Kevin seemed very comfortable talking and definitely knows his stuff. Great job!

Last but not least, I got to hear what BRTFS was from Josef Bacik. Very cool stuff, most of the time I forget how much cool stuff goes into OS development compared to the webapps I do for a living.

All in all, it was a great day long conference. I hope we can make it at least a yearly event.

PS. Sorry I missed your talk Max πŸ™‚ and thanks for the donuts.

sm-photo-tool 1.16 released!

Hey there Smugmuggers!

I’m releasing version 1.16 of sm-photo-tool tonight. For those that don’t know, sm-photo-tool is a command line program that aids in managing your photos on Given a directory of photos, you can create a new album on, then upload all of the pictures in the directory into that newly created album.

[jmrodri@firebird ~]$ cd myphotos
[jmrodri@firebird  myphotos]$ sm-photo-tool create 'my photos album'
[my photos album] created with id [9164554]
[jmrodri@firebird myphotos]$ sm-photo-tool update
./spaceshuttlehuge.jpg...[OK] 939321 bytes 24 seconds 38KB/sec ETA 0
24 939321 bytes 38KB/sec

This release is mainly a maintenance release but I also refactored the code from a single python file to a series of modules, and cleaned up the available commands.


Version 1.15 of sm-photo-tool contained a single python script, while this is easy to use, it is a bear to maintain. All of the commands were moved into as new classes.Β  I then replaced all of the horrible option parsing from the previous script in the individual command classes. Thanks to yum and tito project for the inspiration in moving the commands to a separate module.


In the process of refactoring I deemed a few of the commands as redundant and merged them into other commands.

[jmrodri@firebird ~]$ sm-photo-tool 

Usage: sm-photo-tool [options] MODULENAME --help

Supported modules:

	create         creates a new gallery and uploads the given files.
	list           Lists the files in an album, or lists available galleries
	upload         Upload the given files to the given gallery_id.
	full_update    Mirror an entire directory tree.
	update         Updates gallery with any new or modified images.
  • create_upload no longer exists, it was replaced by create –upload
  • galleries merged with list
  • list gained two new options album and galleries
[jmrodri@firebird ~]$ sm-photo-tool list --help
Usage: sm-photo-tool list 

Lists the files in an album, or lists available galleries

  -h, --help           show this help message and exit
  --login=LOGIN username
  --password=PASSWORD password
  --quiet              Don't tell us what you are doing


If you download the tarball, do the following:

  • cd /opt/
  • sudo tar -zxf ~/Download/sm-photo-tool-1.16.tar.gz
  • cd sm-photo-tool-1.16/src/
  • copy the smugmugrc to $HOME/.smugmugrc
  • add your login and password to .smugmugrc
  • ./sm-photo-tool –help

Fedora users have an easier time πŸ™‚ <pre>rpm -Uvh</pre&gt;

Happy uploading! If you run into any problems, leave me a comment or write up an issue here:

Busy weekend

It was a busy weekend, Liz went away for the weekend while I watched the 3 kids. They were actually very well behaved and gave me little to no trouble. I was expecting quite a bit πŸ˜€ We went to their Friday playgroup, afterwards had the kid’s favorite: McDonald’s for dinner. On Saturday, we went to Border’s to get the kid’s some books, I went with the intention to buy Doctor Who Season 2, but didn’t want to pay the $68 for it. I ended up getting a Doctor Who book instead, yeah I’m as surprised as you that I ended up with a book.

In the evenings I spent the time catching up on my sci-fi shows: finished watching Doctor Who Season 4, saw all of Season 1 (I started with Season 2), and I started watching Firefly (thanks robin). I also managed to get 2 patches submitted and accepted to redstone-xmlrpc, and I submitted the package to jpackage for review. Another library I use all the time is jdbcLogDriver written by a former colleague of mine, I got commit access to it this weekend as well. Today I started to shake the dust off zmugfs. I still haven’t been able to add write access to the file system, and the read mode is extremely slow at startup. I need a better algorithm for downloading the photos and caching them.