After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 110242 - want option to edit files from cmd line sequentially, instead of all at once
want option to edit files from cmd line sequentially, instead of all at once
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: General
1.x
Other All
: Normal enhancement
: Future
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2003-04-08 08:32 UTC by Jamie Zawinski
Modified: 2018-05-24 10:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jamie Zawinski 2003-04-08 08:32:47 UTC
The thing I use Gimp for most often is doing minor edits of photos I've
taken with a digital camera (cropping, color correction, etc.)

I wish there was a way to do something like

    gimp --sequential *.jpg

and have Gimp open up 001.jpg, and let me edit it; and then, when I save
that file and close its window, *only then* open up 002.jpg; and so on for
each file specified on the command line.

Obviously, when dealing with hundreds of files, I can't just open them all
at once: that makes my machine thrash into the ground.  But, opening them
one after another using File/Open is a huge pain, since I have to scroll
progressively further with each file after the ~10th, since the Open dialog
doesn't remember the last scroll position, I always lose track of which
number I'm on.

It's really easy to do what I want using "xv", if all I care about doing is
cropping and resizing; but I often need the power of Gimp's Levels dialog,
which xv doesn't do well at all.

What do you think?

Perhaps there's some simple script-y way to do this -- if there is, I'd
sure like to know it!

I'm using 1.2.3.
Comment 1 Alan Horkan 2003-07-23 18:41:03 UTC
Changes at the request of Dave Neary on the developer mailing list.  
I am changing many of the bugzilla reports that have not specified a target
milestone to Future milestone.  Hope that is acceptable.  
Comment 2 Tino Schwarze 2003-07-24 11:27:58 UTC
Doesn't smell like easy to implement - settting target milestone to
Future.
Comment 3 Jamie Zawinski 2003-08-23 20:45:53 UTC
When I submitted this bug, I guess I didn't know about gimp-remote.

I wrote an tiny sh script called "gimploop" that does this; the
problem with it is that I have to keep going back to the shell window
 and hitting RET to get the next file (whereas I was hoping for a
solution that caused the next file to pop up automatically when I
saved/closed the file I was currently working on.)

    #!/bin/sh

    for file in $* ; do

      if [ "`pidof gimp`" = "" ]; then
        echo "launching gimp..."
        gimp  >/dev/null 2>&1 &
        sleep 10
      fi

      echo -n "$file..."
      gimp-remote $file
      read line
    done
Comment 4 Stefan Wagner 2006-05-09 12:39:09 UTC
Just use:

for file in *.jpg ; do gimp $file ; done

You will have to close gimp after every picture, but no need to hit enter on the commandline.
Comment 5 weskaggs 2007-12-12 22:19:38 UTC
I just want to add a footnote that this should become easy after the upcoming UI changes.  The plan favored by the UI team is that after the last open image is closed, a "scratch" image would be opened to keep the interface alive.  It would be easy to make it happen that in "sequential" mode, instead of opening a scratch image, GIMP would open the next image in the list.
Comment 6 Akkana Peck 2008-10-08 04:42:22 UTC
That would be very handy! I'd definitely use it if it were available. I usually ls the files that need editing (in a terminal window), then select 3-5 of them at a time and run gimp on those (or gimp-remote with earlier versions). But that requires keeping a terminal open and going back to it after each batch is done to load a new batch. I wouldn't want to loop over starting gimp every time; it takes quite a while to load script-fu and plug-ins.
Comment 7 GNOME Infrastructure Team 2018-05-24 10:50:04 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/38.