Skip to content

request: open more than one file at the time or open many files recursevly in a folder #61

@m040601

Description

@m040601

I had previously questioned about this in another non related issue, some time ago.
I decided to open this issue, specific only to this question, should this request ever be taken in consideration.

Currently jfbview only accepts one file as it's input.
So, for example if I'm in a folder, containing many pdf files, or, a folder containing many pictures, this will happen:

  $ jfbview *.jpg
Please specify exactly one input file. Try "-h" for help.

or

    $ jfbview *.pdf
Please specify exactly one input file. Try "-h" for help.

Specifying a folder as input:

CASE 1: One file only inside a folder:

    $ ls ./some_folder/
some_picture.jpg
    $ jfbview some_folder/
error: read error: Is a directory
error: cannot recognize version marker
error: read error: Is a directory
error: read error: Is a directory
error: cannot tell in file
Failed to open document "some_folder/".

This will work:

$ jfbview some_folder/*.jpg

CASE2: With more than one file inside a folder, it will not work:

$ cp another_picture.jpg some_folder/

    $ ls ./some_folder/
some_picture.jpg  another_picture.jpg
    $ jfbview some_folder/*.jpg
Please specify exactly one input file. Try "-h" for help.

    $ jfbview some_folder/
error: read error: Is a directory
error: cannot recognize version marker
error: read error: Is a directory
error: read error: Is a directory
error: cannot tell in file
Failed to open document "some_folder/".

I would be nice if all this was possible.

Accetping the usual shell expansion "*." :

jfbview /path/to/some-folder/full-of-images-or-pdfs/*.pdf

And even better if it could be made recursively

For example, with a "-r" flag, or
Something like:

jfbview -r /path/to/pictures/

pictures/
├── 2020
│   ├── family
│   ├── vacation
│   └── work
├── 2021
│   ├── family
│   ├── vacation
│   └── work
└── 2022
    ├── family
    ├── vacation
    └── work

12 directories, 0 files

is the intention that it'd automatically switch to file 2 when you reach the end of file 1 and so on?

yes, something like that. If you keep pressing "n" or "Space" it opens the next file, "p" or "Backspace" the previous, and "q" quits.

Something like the way sxiv and feh do it:

sxiv /path/to/folder-with-pictures/

or recursevly

sxiv -r /path/to/folder-containing-subfolders-with-pictures/

man sxiv:

   -r     Search the given directories recursively for images to view.

feh /path/to/folder-with-pictures/

recursevly

feh -r /path/to/folder-containing-subfolders-with-pictures/

man feh:

-r, --recursive
         Recursively expand any directories in the command line arguments to the content of those directo‐
         ries, all the way down to the bottom level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions