croptool

Image cropping tool
git clone git://lumidify.org/croptool.git (fast, but not encrypted)
git clone https://lumidify.org/croptool.git (encrypted, but very slow)
git clone git://4kcetb7mo7hj6grozzybxtotsub5bempzo4lirzc3437amof2c2impyd.onion/croptool.git (over tor)
Log | Files | Refs | README | LICENSE

selectool.1 (3821B)


      1 .Dd May 14, 2024
      2 .Dt SELECTOOL 1
      3 .Os
      4 .Sh NAME
      5 .Nm selectool
      6 .Nd image selection tool
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Op Ar -ms
     10 .Op Ar -f format
     11 .Op Ar -w width
     12 .Op Ar -c color
     13 .Op Ar -z size
     14 .Ar file ...
     15 .Sh DESCRIPTION
     16 .Nm
     17 shows each of the given images and allows them to be selected or deselected.
     18 On exit, the given command is printed for each of the files.
     19 .Sh OPTIONS
     20 .Bl -tag -width Ds
     21 .It Fl m
     22 Disable automatic redrawing when the window is resized (the
     23 .Fl m
     24 stands for 'manual').
     25 This may be useful on older machines that start accelerating global
     26 warming when the image is redrawn constantly while resizing.
     27 Note that this also disables exposure events, so the window has to be
     28 manually redrawn when switching back to it from another window.
     29 .It Fl s
     30 Select all images by default.
     31 .It Fl f Ar format
     32 Set the format to be used when the commands are output.
     33 See
     34 .Sx OUTPUT FORMAT
     35 for details.
     36 .It Fl w Ar width
     37 Set the line width of the cross that is drawn over selected images
     38 in pixels (valid values: 1-99).
     39 Default: 5.
     40 .It Fl c Ar color
     41 Set the color of the cross that is drawn over selected images.
     42 Default: #FF0000.
     43 .It Fl z Ar size
     44 Set the Imlib2 in-memory cache to
     45 .Ar size
     46 MiB (valid values: 0-1024).
     47 Default: 4.
     48 .El
     49 .Sh OUTPUT FORMAT
     50 The command for each selected image is output using the format given by
     51 .Fl f ,
     52 or the default of
     53 .Ql rm -- '%f' .
     54 .Pp
     55 The following substitutions are performed:
     56 .Bl -tag -width Ds
     57 .It %%
     58 Print
     59 .Ql % .
     60 .It %f
     61 Print the filename of the image.
     62 Warning: This is printed as is, without any escaping.
     63 .El
     64 .Pp
     65 If an unknown substitution is encountered, a warning is printed to
     66 standard error and the characters are printed verbatim.
     67 .Sh KEYBINDS
     68 .Bl -tag -width Ds
     69 .It ARROW LEFT
     70 Go to the previous image.
     71 .It ARROW RIGHT
     72 Go to the next image.
     73 .It RETURN
     74 Deselect the current image and go to the next image.
     75 .It SHIFT + RETURN
     76 Deselect the current image and go to the previous image.
     77 .It d
     78 Select the current image and go to the next image.
     79 .It D
     80 Select the current image and go to the previous image.
     81 .It t
     82 Toggle the selection status of the current image.
     83 .It SPACE
     84 Redraw the window.
     85 This is useful when automatic redrawing is disabled with
     86 .Fl m .
     87 .It q
     88 Exit the program, printing the set command for all selected images.
     89 If the window is closed through some other means, no commands are printed.
     90 .El
     91 .Sh EXIT STATUS
     92 .Ex -std
     93 .Sh EXAMPLES
     94 Normal usage to delete selected images:
     95 .Bd -literal
     96 $ selectool *.jpg > tmp.sh
     97 $ sh tmp.sh
     98 .Ed
     99 .Pp
    100 Or, if you're brave:
    101 .Bd -literal
    102 $ selectool *.jpg | sh
    103 .Ed
    104 .Pp
    105 The original use case for
    106 .Nm
    107 was to quickly delete images that have been recovered using programs like
    108 .Xr photorec 8
    109 or
    110 .Xr foremost 8 .
    111 When used on a system partition, these programs generally recover a lot of
    112 images that aren't important, which then need to be sorted manually.
    113 Other programs that the author used for this task in the past were not ideal
    114 because they either were much too slow or allowed mistakes to be made too
    115 easily by deleting images immediately.
    116 .Pp
    117 It is also possible to do more advanced things.
    118 For instance, to move the selected images into a different directory,
    119 something like this can be done:
    120 .Bd -literal
    121 $ selectool -f "mv -- '%f' '/path/to/dir/'" *.jpg | sh
    122 .Ed
    123 .Pp
    124 Note that no great care has been taken to deal with filenames containing
    125 single quotes.
    126 That is left as an exercise to the reader (hint: just don't have
    127 filenames containing quotes).
    128 .Sh SEE ALSO
    129 .Xr croptool 1 ,
    130 .Xr rm 1 ,
    131 .Xr foremost 8 ,
    132 .Xr photorec 8
    133 .Sh AUTHORS
    134 .An lumidify Aq Mt nobody@lumidify.org
    135 .Sh BUGS
    136 The filenames are printed without any escaping, so filenames with
    137 quotes may cause issues depending on the output format.
    138 .Pp
    139 Transparent portions of images should probably be shown differently,
    140 but I'm too lazy to fix that and don't really care at the moment.