Unix command line uploader project
neuron
Registered Users Posts: 30 Big grins
Hi,
Since I choosed smugmug as my web album base (thank you all the people creating such wonderfull site), I am looking for a means of uploading images. I have quite a few of them. And since I like the simplicity and power of unix commandline, here we go
There already exists smugup, which got me inspired, but I would like to focus on several differences.
a) Run anywhere. I'm using POSIX shell, sed etc. utilities. It's working on solaris as it is working on linux.
b) Use wget instead of curl, as wget is more common than curl is (again I'm having solaris worksatation, which lacks curl).
c) Use latest api (1.2.0)
Currently I can upload multiple images with the (attached) script.
The final revision should take your photos directory tree, and synchronize it to smugmug (creating the galleries & categories as it goes through the tree). Later if you change (add/delete/modify) some photographs, the script should reflect those changes on smugmug (uploading only new and modified photographs and not everything again).
I wrote some sort of REST framework in the shell, so if you would like to have other abilities, let me know.
I'm releasing first public version (as an attachment to this thread), what do you think ? :deal
Thanks again for smugmug
--
neuron
Since I choosed smugmug as my web album base (thank you all the people creating such wonderfull site), I am looking for a means of uploading images. I have quite a few of them. And since I like the simplicity and power of unix commandline, here we go
There already exists smugup, which got me inspired, but I would like to focus on several differences.
a) Run anywhere. I'm using POSIX shell, sed etc. utilities. It's working on solaris as it is working on linux.
b) Use wget instead of curl, as wget is more common than curl is (again I'm having solaris worksatation, which lacks curl).
c) Use latest api (1.2.0)
Currently I can upload multiple images with the (attached) script.
The final revision should take your photos directory tree, and synchronize it to smugmug (creating the galleries & categories as it goes through the tree). Later if you change (add/delete/modify) some photographs, the script should reflect those changes on smugmug (uploading only new and modified photographs and not everything again).
I wrote some sort of REST framework in the shell, so if you would like to have other abilities, let me know.
I'm releasing first public version (as an attachment to this thread), what do you think ? :deal
Thanks again for smugmug
--
neuron
0
Comments
Command line tools would be a great addition to the Smug arsenal. I'll definitely have a look.
Thanks
--
neuron
This way I can loop/pipe stuff directly from my local "smug" mimmicking repo of images, directly into my smug.
Hi,
the development is slowly going forward. With my last putback http://smugmugsh.svn.sourceforge.net/viewvc/smugmugsh I have the engine prepared for categories and subcategories manipulation (querying and creating). It's about the time to put it together with image uploading. Question is what should be the layout of files on disk ? I can think of several types. To ilustrate, let's say that smugmug.sh is executed with directory name
smugmug.sh dir
Now if
a) the dir is full of jpeg files, I will create gallery named "dir" in category "Other" and upload all the images
b) the dir has directories inside which contain images I will create category "dir" and upload galleries "folder a" and "folder b" with category "dir"
c) This would mean category "Dir", subcategory "subdir" and gallery named "folder a"
Would you think off any other layout
Thanks
--
neuron
I was also thinking a FUSE-based filesystem "smugmugfs" would be cool, but it turns out that's been started too ( http://code.google.com/p/smugmugfs/ ). There isn't any code yet.
I haven't been using SmugMug long, but I've quickly become frustrated with some of the basic limitations. The CLI tools will help alleviate some of the pain, and I hope your project matures quickly. Your work will help the rest of us save time.
Thanks for sharing.
That looks like a neat idea also, though I can see some implementation details issues. Well, we will see I guess.
Thanks for your kind words. Frankly I'm not yet 100% sure to go with smugmug also, since I don't seem to be able to name my galleries with my national characters, and generally make them bi-lingual easily (I know that tere are some CSS hacks out there, but haven't played with the idea yet). Other thing is that it seems to be sometimes quite slow (displaying images). But since smugmug owners granted me the Pro account, I want to first give something back and then we'll see.
Hi,
I have first usable version. Grab it from here: http://sourceforge.net/projects/smugmugsh/
Usage is simple. First create your directory layout
mkdir /somewhere/galleries
cd /somewhere/galleries
mkdir -p Animals/dogs/events Animals/dogs/my_dogs
mkdir -p Sports/bike
mkdir unsorted
cp *.jpg Animals/dogs/events
cp *.jpg Animals/dogs/my_dogs
cp *.jpg Sports/bike
cp *.jpg unsorted
Then upload galleries
$ smugmug.sh -g /somewhere/galleries
You should get four galleries created
Animals->dogs->events
Animals->dogs->my_dogs
Sports->bike
Other->unsorted
If it breaks, I would like to hear it, If it's usefull to you I would like to hear it too
Oh, and if there are any issues, turn on '-d' commandline option and send me the output (erasing your password !)
Things I want to do
* support for image description (I want to convert my old gallery with descriptions to smugmug)
* use api 1.2.2 (currently it's 1.2.0)
Anything else ?