LWN.net Logo

For the sake of precision

For the sake of precision

Posted May 3, 2009 10:26 UTC (Sun) by sitaram (subscriber, #5959)
In reply to: For the sake of precision by man_ls
Parent article: Tomboy, Gnote, and the limits of forks

I don't know, do you consider "gphoto2 -L" to be a low-level system call? I certainly call it from a shell script. That produces a nice list of files on the camera, eminently processable from shell, which I parse to look for files I want to actually download. The ones I want are then downloaded using "gphoto2 -p".

I've been using such a shell script (my photo handling needs are somewhat complex in terms of where the files go, and how I want to recognise something that has already been downloaded, etc), since about 2006.

If you meant shell literally as in "nothing but bash, no perl, no sed, no add-on tools [like gphoto2 in this case]", then you are right, it cannot be done.

But when most people say "do it in shell" they do pre-suppose a bit of this sort of stuff.

Even so, I'm not necessarily saying every nuance of f-spot can be done. But I bet the bulk of it can. Maybe a little perl-Tk or some Qt binding for a bit of GUI "cream on top".


(Log in to post comments)

For the sake of precision

Posted May 3, 2009 10:46 UTC (Sun) by man_ls (subscriber, #15091) [Link]

No, you are right: that would nicely fit the task. So there is actually a shell utility that can import pictures, good to know!

That doesn't show a preview of every picture on the camera, so there is still some work to be done. Any takers? :D

For the sake of precision

Posted May 3, 2009 12:33 UTC (Sun) by sitaram (subscriber, #5959) [Link]

Without going into too much detail about the arcana of how I handle photos, I should mention that I have a completely separate shell script to handle photo classification, using xli to throw up a smaller version of the photo being processed. Single key presses quickly tag them with predefined tags. (Each photo can have multiple tags). I can process over 30 photos a minute without even thinking too hard. I've been meaning to upgrade it with a "preview next few pictures" features and assign a number keystroke to say "tag this and next N-1" with this tag :-)

Perhaps I should combine these two scripts :-)

For the sake of precision

Posted May 3, 2009 17:27 UTC (Sun) by rahulsundaram (subscriber, #21946) [Link]

... and release it as Free software so that others can benefit as well.

For the sake of precision

Posted May 3, 2009 18:55 UTC (Sun) by sitaram (subscriber, #5959) [Link]

That goes without saying; I have no interest in hoarding stuff except perhaps to avoid embarrassment :-)

But right now these two scripts together are barely a couple hundred lines of shell, completely tailored to my specific needs -- my preferred workflow is more akin to a "PIM sync" (like say jpilot) for a camera than a typical photo app!

And while I'm sure the basic stuff is doable "in shell", it won't be pretty (hey that was not in the original discussion so I'm safe!)

So you see there's a bit of a gap there :-) Still, I guess I'll give it a shot, just for kicks...

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds