this post was submitted on 14 Oct 2024
36 points (97.4% liked)

Linux

48316 readers
819 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Can anyone recommend a tool to manage photos at the cmdline? I just want to move photos into dirs based on their metadata (YYYY/DD), occasionally fix up metadata (adjust dates), rename photo filenames to match a template and/or query my photos for certain things. It doesn't need to be a gallery or image touch-up tool, I have other things for that.

I'm aware of exiftool and ImageMagick, perhaps they can do the job but they seem quite low level, really need to build scripts around them - I'd like something that operates at a slightly higher level so I don't have to do too much scripting.

A quick search turned up chee (GPLv3) which can:

  • search photos using a simple query language
  • manage named queries (called collections)
  • copy/symlink images into a custom folder structure

...but it's not had an update in a few years (maybe it's feature complete tho!) Any other suggestions? Thanks.

top 9 comments
sorted by: hot top controversial new old
[–] 9488fcea02a9@sh.itjust.works 8 points 1 month ago* (last edited 1 month ago) (2 children)

Probably not what you want to hear, but I think exiftool + bash script really is the way to go. A few years ago I had a similar need and searched for hours online... I ended up hacking together a "good enough" bash script that reads all the dates of my pictures and does some stuff. It took 30 mins of reading some basic bash scripting basics. Way less time than searching for a tool that probably doesnt exist.

In 2024, you can probably just ask chatgpt to write a quick and dirty bash script for you and it might require another 10mins of debugging/begging chatgpt to fix its mistakes

[–] electricprism@lemmy.ml 4 points 1 month ago (1 children)

Add in manual btrfs snapshots prior to usage too, having a "undo" on thousands of photo alternations is optimal if the script eats your photos.

[–] IanTwenty@lemmy.world 3 points 1 month ago

💯 ! I been considering git-annex too which might let me treat all the photos like any git repo without the bloat.

[–] IanTwenty@lemmy.world 2 points 1 month ago

I think you've hit the nail on the head so to speak....it's just too small/custom a thing for anyone to have built a dedicated tool it seems. In the end I am looking at using my file manager (nautlius) to automatically run a custom exiftool/bash script on chosen files so I can just click and rename/fix metadata etc as I browse through the files. Probably good enough for now.

[–] NeoNachtwaechter@lemmy.world 5 points 1 month ago

There's a lib/tool called exiftool iirc. It can be used from the commandline.

[–] joeldebruijn@lemmy.ml 4 points 1 month ago* (last edited 1 month ago) (1 children)

Not for Photos specific but F2 seems to fit some of your use cases. https://github.com/ayoisaiah/f2

Even can use Exif fields as variables in the naming scheme. https://github.com/ayoisaiah/f2/wiki/Built-in-variables#3-exif-variables

[–] IanTwenty@lemmy.world 1 points 1 month ago

That looks a very useful tool, thanks. I think it could be just the thing for bulk renaming photos to standard names.

[–] strubbl@lemmy.ml 3 points 1 month ago (1 children)
[–] IanTwenty@lemmy.world 1 points 1 month ago

Thank you for this. I think this has some of the operations I need, I will dig into the code.