imv icon indicating copy to clipboard operation
imv copied to clipboard

Piping commands to sort images results not all images to be shown

Open Faalagorn opened this issue 4 years ago • 8 comments

A follow up to https://github.com/eXeC64/imv/issues/146#issuecomment-760482770 – not sure if that is some limit/bug on my system, it seems that doing something like find . -type f | sort -V | imv sort files properly, but not all files are shown in my folder.

  • imv * shows all 34676 files (just not sorted) screenshot_2021-02-14-225319
  • find . -type f | sort -V | imv shows less files (it seems to be random, once it's 4895, then it's 5507 files) (properly sorted) screenshot_2021-02-14-225410

Faalagorn avatar Feb 14 '21 21:02 Faalagorn

How many files does find . -type f | sort -V give you (you should be able to pipe it to wc -l to get the number of files)?

n3f4s avatar Jul 13 '21 09:07 n3f4s

How many files does find . -type f | sort -V give you (you should be able to pipe it to wc -l to get the number of files)?

Word count counts it properly:

[faalagorn@faalagorn-pc ZomboidTiles]$ find . -type f | sort -V | wc -l
34676

However, piping it to imv does not. (currently getting 1632 items on that folder) screenshot_2021-07-14-205342

Faalagorn avatar Jul 14 '21 18:07 Faalagorn

Are there some special files in the directory (links, ...)? I haven't managed to reproduce the bug.

n3f4s avatar Jul 15 '21 12:07 n3f4s

If you pipe the files to disk and run imv using that file as input does the same problem occur? i.e. find . -type f | sort -V > images; cat images | wc -l; imv <images

eXeC64 avatar Jul 15 '21 21:07 eXeC64

This doesn't seem to change anything sadly @eXeC64 125870903-e297dea5-76fe-4895-bca2-6851647f9fcb

I don't think there are any symlinks there really, just a lot of files , some do have weird names though, not sure if that's the case. I'm using f2fs currently. screenshot_2021-07-16-013820

Faalagorn avatar Jul 15 '21 23:07 Faalagorn

I don't think imv can read xcf images. If you cycle through all the images (using the arrow keys) when calling imv *, does the number of images drop?

EDIT: I've tried with a directory containing those images:

5.jpg
Sélection_002.xcf
\.xcf

And both find . -type f | sort -V | imv and imv * give me the same number of files

n3f4s avatar Jul 16 '21 09:07 n3f4s

I don't think imv can read xcf images. If you cycle through all the images (using the arrow keys) when calling imv *, does the number of images drop?

Actually, it does, it starts with 34677 images, then when I go back it's 34676 , then after two more 34675 and so on. It seems that it happens to images ending with _? Maybe it's something from my locale? I'm using en_DK.UTF-8

[faalagorn@faalagorn-pc ZomboidTiles]$ cat /etc/locale.conf
LANG=en_DK.UTF-8
[faalagorn@faalagorn-pc ZomboidTiles]$ localectl
   System Locale: LANG=en_DK.UTF-8
       VC Keymap: pl
      X11 Layout: n/a

Faalagorn avatar Jul 17 '21 08:07 Faalagorn

The number of images reduce because imv encounter xcf images which it can't read do it removes them from the list (and update the total number of images).

n3f4s avatar Jul 17 '21 09:07 n3f4s