1

I am on Debian testing. I have come across this problem before and haven't found any resolution so far using search-engines, perhaps not precise enough, dunno.

The thing is I have a folder/directory called 'Pictures'. Now while I can sort the files through date-wise, seeing them through an image viewer, the images come up randomly. There isn't and doesn't seem to be a way to tell the image viewers to show the images date-wise. I am looking at the accessed and modified dates to be used as the date rather than the creation date of the file. Is there anyway to do that ?

shirish
  • 11,967
  • 27
  • 107
  • 190
  • I suppose the image viewer fetch them in the order they appear in the directory. However, you may be able to pass them as command-line arguments in a predefined order (i.e. `image-viewer first second third ...`). Check if your viewer supports it and please tell us what it is. Are you open to installing other viewer if not? – Quasímodo Dec 09 '20 at 17:16
  • I am open to install another viewer, I do have feh, eom, eog, queegie, you name it. If there is some other let me know. I have around 400 or so images in the directory so the method you have shared on the CLI does not scale, sorry. – shirish Dec 09 '20 at 23:32
  • Look for "sorting files by modification date", then you can write a script that pass sorted files as arguments. I'm pretty sure Zsh has a simple one liner to do that. – Quasímodo Dec 10 '20 at 12:32
  • I am using bash at the moment due to many reasons. If you do come across a script or two please share. I did try github to see but perhaps my fu is not strong. Wasn't able to find anything. Maybe didn't know the right key-word. – shirish Dec 11 '20 at 20:48
  • 2
    `ristretto` is an extremely lightweight image viewer that has a setting: Edit->Sorting->by date. It sorts by date of modification of the file. – meuh Mar 07 '21 at 16:17

3 Answers3

1

Good news: I just wrote a plugin for GNOME Image Viewer (Eye of GNOME) that allows sorting by modification date. I tested on Ubuntu 21.10 but it should work on Debian and other distros that use GNOME. You can download the plug-in here. Cheers. https://github.com/cybereality/eog-modified-date-plugin

  • Tried it, didn't get anything or dunno how its supposed to work. Made the directory under ~/.local/share/eog/plugins and then moved it. $ mv eog-modified-date-plugin-1.0.2 ~/.local/share/eog/plugins/ Now I have no idea whether its working or not :( eog 41.0 for what it matters. – shirish Oct 31 '21 at 21:58
  • Thanks for trying it out. You have to copy the plug-in folder called "modified-date" which will be inside the "eog-modified-date-plugin-xxx" folder. That should work. – Andres Hernandez Nov 01 '21 at 22:59
  • I did that. This is how it looks - ~/.local/share/eog/plugins/eog-modified-date-plugin-1.0.2/modified-date$ ls gschemas.compiled modified-date.glade modified-date.plugin modified-date.py – shirish Nov 02 '21 at 07:51
  • Can you share screenshots as to where and how I know that the plugin is there and working. AFAI saw, EOG doesn't have anyway to let the user know if a new plugin has been installed. – shirish Nov 02 '21 at 20:01
  • I have put up a screenshot here, unable to see the date in the status bar :( https://i.postimg.cc/jqpVKsBR/where-is-the-date.png – shirish Nov 02 '21 at 20:21
  • Sorry, I realize the instructions were not clear. You only need to copy the "modified-date" folder, not the parent folder "eog-modified-date-plugin". Your path should look like this: `~/.local/share/eog/plugins/modified-date` Hope that fixes it, I will update the readme when I get a chance so this is explained better. – Andres Hernandez Nov 03 '21 at 08:25
  • Did that, sadly no change :( – shirish Nov 03 '21 at 15:27
  • If you run EOG from the command line so you see any errors? Also make sure the plugin is enabled in the preferences menu. It will be listed there if it's in the right folder. – Andres Hernandez Nov 04 '21 at 21:31
  • Tried, no change. It is as it was before, sorry :( – shirish Nov 08 '21 at 21:20
  • I created a new release with an easier install. I believe maybe you have the wrong folder or folder structure. Please go the the GitHub page and download the latest release and read the new install instructions. Thanks. https://github.com/cybereality/eog-modified-date-plugin – Andres Hernandez Nov 11 '21 at 17:40
  • Did it, dunno what you changed but now it showed up as a proper plugin. – shirish Nov 16 '21 at 06:46
  • And yet unable to see the date, see https://i.postimg.cc/6qHrxZ0p/eog-modified-date-issue.png – shirish Nov 16 '21 at 06:51
  • Okay that is good to hear. The plugin only changes the order of the images when you cycle through or inside a slideshow. It doesn't display any additional information. Sorry. – Andres Hernandez Nov 17 '21 at 07:08
1

The plio viewer can sort by modification date (and many other properties too): https://codeberg.org/klartext/plio

If someone is willing to package it for debian, there is a RFP: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036637

P.S. (edited): I'm affiliated with plio

Aeng3LiD
  • 11
  • 2
  • I had issues while trying to compile locally, Couldn't get freeimage.h as shared. Using gcc 12.3 ''$ gcc --version gcc (Debian 12.3.0-5) 12.3.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.'' – shirish Jul 10 '23 at 13:11
  • Also here - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036637#10 – shirish Jul 10 '23 at 13:13
  • Was able to fix it by downloading and installing the freeimage-dev package. The next issue seems to be the mono-spaced font. I did change it to /usr/share/fonts/truetype/oxygen/OxygenMono-Regular.ttf in config.h and the issue was no longer there. Perhaps you can add that font in config.h ?? – shirish Jul 10 '23 at 13:35
1

With zsh,

feh ./*.jpg(Om)

Would pass the list of jpg files in the current working directory Ordered by modification time (oldest to newest) to feh (replace feh with your favourite image viewer).

Stéphane Chazelas
  • 522,931
  • 91
  • 1,010
  • 1,501