geeqie icon indicating copy to clipboard operation
geeqie copied to clipboard

rename/copy based on exif tags

Open anarcat opened this issue 4 years ago • 3 comments

hi!

i would like to be able to batch-move (or copy?) images based on their exif tags. I want to use geeqie more in my workflow, and it would be great as a first stage processing tool to weed out bad shots. what i'm missing is an easy way to move images in my existing data structure, which goes something like this:

~/Photos/YYYY/MM/DD/ROLL/ORIGINAL_NAME.EXT

For example, a photo in:

/media/anarcat/sdcard/DCIM/DSCF_0001.JPG
/media/anarcat/sdcard/DCIM/DSCF_0001.RAF

would be moved to this location if it was taken today and labeled "geeking":

~/Photos/2019/12/10/geeking/DSCF_0001.JPG
~/Photos/2019/12/10/geeking/DSCF_0001.RAF

I'm currently using rapid-photo-downloader for this purpose, but it doesn't allow me to delete photos at all, or move them, which makes the process kind of klunky. it also doesn't allow me to view the photos full screen and do all the good stuff that geeqie otherwise does. but since I mostly need to batch-move the photos at this point, RPD is still a better choice. it's only this feature that's missing, as far as I can tell...

is this something that's feasible in geeqie now?

anarcat avatar Dec 11 '19 02:12 anarcat

Unfortunately there is no way for Geeqie to automatically generate sub-folder names.

Geeqie has the possibility to run a plugin (i.e. a shell script) on the files selected. It would be up to you to generate a shell script which processes the files in the way you wish. To create a script which generates sub-folders on exif date and exif comment and moves the files to that folder is not a big problem. But to create a solution that is flexible enough to satisfy many users (as RPD has done) is difficult.

[In RPD it is possible to create presets which define where the files should be moved to. If it were possible to run RPD from the command line specifying a preset, then Geeqie could simply make that call from a plugin. But I don't see that RPD can do that.]

caclark avatar Dec 11 '19 12:12 caclark

Unfortunately there is no way for Geeqie to automatically generate sub-folder names.

which part do you mean here? the ROLL or the date?

Geeqie has the possibility to run a plugin (i.e. a shell script) on the files selected. It would be up to you to generate a shell script which processes the files in the way you wish. To create a script which generates sub-folders on exif date and exif comment and moves the files to that folder is not a big problem.

Yeah, I wrote many such things over the years. It's the main reason I switched to RPD, so that I wouldn't have to do this myself anymore. The last incarnation of this was this plugin:

https://gitlab.com/anarcat/scripts/blob/master/photos-import

It would feel like a regression to go back to this system... but maybe I could simplify the script and allow it to be passed a list of files, then only prompt for a "roll" name...

How do scripts work anyways? How do filenames get passed?

[In RPD it is possible to create presets which define where the files should be moved to. If it were possible to run RPD from the command line specifying a preset, then Geeqie could simply make that call from a plugin. But I don't see that RPD can do that.]

Correct. RPD is not pluggable, either in or out...

https://discuss.pixls.us/t/plugins-or-extensions/5961/2

this is why i had high hopes for geeqie. :)

anarcat avatar Dec 11 '19 15:12 anarcat

which part do you mean here? the ROLL or the date?

Sorry, I misunderstood your original comment - but either way you need to use a script to create a folder name.

How do scripts work anyways? How do filenames get passed?

Take a look at Edit/Configure Plugins/New You already have a script which does what you need; just include a call to zenity or yad to prompt for a Roll name.

n.b. Geeqie groups files with the same filename-without-extension e.g. DSCF_0001.JPG, DSCF_0001.RAF, are displayed a single item. Geeqie send only one of these filenames to the plug-in. Within the plug-in script use: geeqie --remote --get-sidecars:"$1" to get a list of all the files in the group.

The plug-in can be called from a menu, a keystroke or an icon on the toolbar.

caclark avatar Dec 12 '19 15:12 caclark