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 smugmug.com. Given a directory of photos, you can create a new album on smugmug.com, 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.

REFACTOR

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 smcommands.py 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.

COMMAND LINE OPTION CHANGES

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

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

README

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 http://cloud.github.com/downloads/jmrodri/sm-photo-tool/sm-photo-tool-1.16-2.fc11.noarch.rpm</pre&gt;

Happy uploading! If you run into any problems, leave me a comment or write up an issue here: http://github.com/jmrodri/sm-photo-tool/issues

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s