Some time ago I bought an account with SmugMug for my pictures. SmugMug is pretty nice, and has more or less the features I need.
I quickly ran into a problem with uploading a lot of pictures. There are different tools for it, but nothing which really fit my needs: Execute a script with a list of files as arguments, print a list of available albums, enter the correct album, and upload the images (with a progress meter).
Luckily, there's the SmugMug API, which is a nice REST interface, and it didn't take long to hack a shell-script together using curl and the other usual suspects like grep and sed. I've now polished the script a little so it does some error handling, so now it's available here as smugup.sh. It requires curl, sed and grep, probably in the GNU versions.
Username and password can be set as arguments with -u and -p, but they can also be set in ~/.smugup like this:
-
EMAIL="recht@somewhere"
-
PASSWORD="passhere"
The script is used by simply giving the pictures to be uploaded as argument to the command:
-
smugup.sh /data/pictures/*.jpg
The script will then print a list of available albums and expect the selected album ID as input, and then it will begin uploading.




Trying to use your script to upload a bunch of images that were in gallery2. Not getting far. Here are the steps I tried…
1) sh smugup.sh -u [email] -p [pass] *.jpg
It came back with the response that no password was given.
Hard coded my email and password in the script (lines 13 & 16).
2) sh smugup.sh *.jpg
Same response. Password not given.
Removed the test statements.
3) sh smugup.sh *.jpg
Received “unable to login”.
Any idea(s)?
TIA!