Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
m040601 opened this issue Sep 20, 2021 · 0 comments

Comments

@m040601
Copy link

m040601 commented Sep 20, 2021

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.
@m040601 m040601 changed the title request: open more than one file at the time and/or request: open more than one file at the time or open many files recursevly in a folder Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant