You are not logged in.
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
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
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
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
Hi,
I have a newbie question here.
I cannot get sxiv to open jp2 files.
When I use sxiv in the command line to open jp2 files I get the following:
sxiv: ./Downloads/509893-Color In Business, Science And Industry_jp2/509893-Color In Business, Science And Industry_0425.jp2: Error opening image
sxiv: no more files to display, aborting
thanks
Offline
Hi,
I have a newbie question here.
I cannot get sxiv to open jp2 files.When I use sxiv in the command line to open jp2 files I get the following:
sxiv: ./Downloads/509893-Color In Business, Science And Industry_jp2/509893-Color In Business, Science And Industry_0425.jp2: Error opening image
sxiv: no more files to display, abortingthanks
just to check: Did you not use quotes around the file path? If not, try:
sxiv "./Downloads/509893-Color In Business, Science And Industry_jp2/509893-Color In Business, Science And Industry_0425.jp2"
Offline
Hi,
I have a newbie question here.
I cannot get sxiv to open jp2 files.When I use sxiv in the command line to open jp2 files I get the following:
sxiv: ./Downloads/509893-Color In Business, Science And Industry_jp2/509893-Color In Business, Science And Industry_0425.jp2: Error opening image
sxiv: no more files to display, abortingthanks
Actually, it looks like sxiv doesn't support jp2 files. You would need to convert the files to another format first to view them with sxiv. For example, you can install imagemagick:
sudo pacman -S imagemagick
And then convert the file with its convert script (note the "jpg" extension in the second argument):
convert "509893-Color In Business, Science And Industry_0425.jp2" "509893-Color In Business, Science And Industry_0425.jpg"
And then open the jpg result with sxiv:
sxiv "509893-Color In Business, Science And Industry_0425.jpg"
'hope that helps!
Offline
Has anyone got a script to reload the current image set after renaming an image?
My use case is typically to open a directory with images in sxiv, and then to rename using the following key-handler script:
"w")
name="$(dmenu -p "Rename $file to: ")" 2> /dev/null
ext="$(echo "$file" | sed -r "s/^.*\.(.*\$)/\L\1/" | dmenu -p "Use extension as: ")"
if ! [ -z "$name" ]; then
mv "$file" "$(dirname $file)/$name.$ext"
fi ;;
This removes the image from the set (no longer visible in thumbnails). If I add a & before the ;;, it keeps the image there, but under the old name. This is especially a problem if I want to re-rename it (made a mistake), as the above script wouldn't find the new file name.
I'm wondering if anyone has implemented a solution where it reloads the directory (or set of images I'd loaded in with the original command) under its new name.
Offline