1

What I am looking for is a quick and simple photo viewer, like the default Eye of Gnome, but with the one extra feature of being able to press a key on some of the photos to toggle a "selection" flag, and then at the end being able to do a global action on all the selected photos, such as copy them all to another directory.

Use case: I come back from a trip and I've taken upwards of 6000 gigantic photos with my DSLR, of which I want to select the "best" ones (about 1 in 20 or so). I batch-resize them to a size like 1000x1000, suitable to see reasonable detail about sharpness etc but small enough that I can flick through them quickly with Eye of Gnome. But then, when I find one I like, I have to note the number and go through the file system to copy it manually to another directory by drag and drop, which is a pain. Wouldn't it be much nicer if I could just press space to mark the ones I like, and copy them all later? (In fact what I'd do is take the file names of the selected photos and, from that, go back to the original large ones and process them.)

EOG does have a feature whereby you can control-click on the image gallery to select multiple pictures, but it's essentially useless when you're viewing thousands at a time because as soon as you click on a new picture you lose the previous selection. (Same happens if you control-click in Nautilus while using previews, which by the way are too small to see if a photo is sharp.)

I hope someone can point me at a viewer that is as quick and simple as EOG and already has this feature or something close to it. I am not in the least interested in programs that insist on importing all my photos into their "library" in the style of Apple---I want to keep working with my photos organised just with the plain vanilla file system folders.

  • Have you tried digikam, it will render thumbnails of a folder, allow you to assign a tag - like "accepted" [default alt+F3] then you can select all images with that tag, add them to a batch queue and process them. You may be able to skip the assigning of tags, or whatever (I use star scores for sifting, 3* or above is "accept"), but for me the batch window gets foregrounded when adding direct to batch queues. – pbhj May 14 '18 at 13:37
1

Shellscript tool with GUI

I modified a shellscript tool, that can create a list of selected pictures selected.txt. You can use the Enter key to select a picture, or the Escape key to skip it.

You can also redo the selection by appending files to the list, and you can skip the remaining files with the 'Skip other pictures' window.

The following files are created (in the current directory)

names.txt    # a list of all the files in the current directory tree
list.txt     # a working list of selected files, that may contain duplicates
selected.txt  # the final list of selected files

You need the viewer feh to show the pictures and xterm to help get the window with the question on top (according to tests in Kubuntu and Lubuntu).

sudo apt install feh xterm

The shellscript is tested in

  • Lubuntu and Ubuntu 16.04 LTS
  • Ubuntu 17.10
  • Kubuntu Bionic (18.04 LTS).

Here is the shellscript:

#!/bin/bash

# Copyright 2018 Nio Wiklund
#
# GPLv3: GNU GPL version 3
#
# This shellscript works with files in the current directory and its
# subdirectories. There is also an assumption that you
#
# batch resize the files to jpg and/or png files.
#
# This can be modified in the lines starting with 'find'
#
# You may need to select another 'sleep time' in order to
# get the question window on top of the picture window,
# if the files load slowly into the file viewer 'feh'.
#

########################################################################

marker () {

 xterm -geometry 10x1 -e bash -c \
 "zenity --title='Select this picture' --question --text='Select picture?' \
 --width=240 2> /dev/null && echo $1 >> list.txt"
}

skipper () {

 ( zenity --title="Skip other pictures" --width=480 --height=240 \
 --question --text="Are you sure that you want to skip all the other pictures?" \
 2> /dev/null && > skip ) &
}

counter () {

 cnt=$(wc -l "$1" | sed 's/ .*//')
 echo "$cnt pictures are listed in '$1'"
}
########################################################################

# main

########################################################################

if test -e skip
then
 rm skip
fi

if test -s selected.txt
then
 zenity --title="Create a new list or append?" --question \
 --width=360 --text="You can use the mouse, but maybe it is
 easier to use the 'Enter' and 'Escape' keys

 Append to previous selection?" 2> /dev/null

 if [ "$?" == "0" ]
 then
  cp selected.txt list.txt
 else
  > list.txt
 fi
fi

skipper

find -iname "*.jpg" | sort > names.txt
find -iname "*.png" | sort >> names.txt
counter names.txt

ifs0="$IFS"
while IFS='' read -r line || [[ -n "$line" ]]; do
 if test -e skip
 then
  break
 fi
 feh -g 1024x1024 "$line" & pid=$!
 sleep 0.5
 marker "$line"
 kill "$pid"
done < names.txt
IFS="$ifs0"

if test -s list.txt
then
 sort -u list.txt | tr -s '\n' '\n' > selected.txt
 counter selected.txt
else
 echo "No picture selected"
fi

Screenshots

The following screenshots were created in Ubuntu 17.10 (with Wayland).

feh-create-new-list-or-append.png:

enter image description here

feh-select-picture.png:

enter image description here

feh-skip-other-pictures.png:

enter image description here

feh-terminal-output.png:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.