You are not logged in.

#501 2016-07-04 12:33:18

progandy
Member
Registered: 2012-05-17
Posts: 3,082

Re: sxiv - Simple image viewer written in C

drtebi wrote:

That is why I used the `tr` command... I am not sure if I could achieve the same without?

Yes, it is possible, for example:

find . -type f -iname '*.jpg' -not -iname '*.lzn.*' | sxiv -i

Last edited by progandy (2016-07-04 12:34:18)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#502 2016-07-04 13:40:08

likytau
Member
Registered: 2012-09-02
Posts: 133

Re: sxiv - Simple image viewer written in C

Doh. Yeah, -i 's the way to go (and in case it's not clear from progandy's example, the criteria for find can be arbitrarily complex, using -not, -or and parentheses to built as complex conditionals as you need)

Offline

#503 2016-07-04 22:40:28

drtebi
Member
Registered: 2013-02-09
Posts: 96

Re: sxiv - Simple image viewer written in C

Thanks again. I can see it was definitely worth posting here ☺

I really need to study the man pages a bit more to end up with the most simple and fastest command line... I didn't know about the `-i` option of sxiv either.

My final line now is:

find . -type f -iname '*.jpg' -not -iname '*.lzn.*' | sxiv -ifbt

But now I wonder if any kind of sorting could be implemented... most of my file organization is like so:

YYYY/YYYY-MM-DD - <camera> - <text>/<camera>-<roll>-<img-no>.jpg

(I shoot mostly film and use a few different cameras, in case you wonder about "roll" and "camera".)

`find` and `sxiv` don't have a sorting option as far as I can see, so piping the find output through sort would be the only option:

find . -type f -iname '*.jpg' -not -iname '*.lzn.*' | sort | sxiv -ifbt

That works...

I already wrote a little script that allows me to just view images of a certain camera; I think I will expand on that to include displaying images from a certain year.

OK, enough of that, not sure if this is the right place to discuss these kinds of scripts, which are not 100% sxiv related.

Offline

#504 2017-02-21 00:40:34

drtebi
Member
Registered: 2013-02-09
Posts: 96

Re: sxiv - Simple image viewer written in C

Just out of curiosity: Why does sxiv use it's own cache directory and mechanism for thumbnails, as opposed to what is recommended by freedesktop.org?

I am not complaining... just wondering.

Offline

Board footer

Powered by FluxBB