Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Can't call a script on multiple images #13

Closed
baskerville opened this issue Sep 24, 2011 · 4 comments
Closed

Can't call a script on multiple images #13

baskerville opened this issue Sep 24, 2011 · 4 comments

Comments

@baskerville
Copy link
Contributor

I would be nice to have a way to call a user script with multiple images passed as arguments.
At the moment, only the currently viewed image can be acted on.

@xyb3rt
Copy link
Owner

xyb3rt commented Sep 25, 2011

I'm not sure how I should handle multile file path arguments to external scripts/commands.

The first possible approach is to have only one 'it_' command for everything. This command could then use the environment variables SXIV_IMG and SXIV_SEL_IMGS (or something like that) to refer to the current image or all selected images. This would be powerful but maybe error-prone, because the latter variable would be empty, if no images are selected.

The second approach is to have a new 'it_' command next to it_open_with & it_shell_cmd which only differs from it_shell_cmd in using SXIV_SEL_IMGS instead of SXIV_IMG.

For both approaches one more problem has to be solved: How to select multiple images? In image mode a selected image could be marked with a special character in the title string. But I'm not sure what easy (easy as in easy to do with pure Xlib) approach should be taken to mark selected images in thumbnail mode.

Any ideas?

@baskerville
Copy link
Contributor Author

Bert Münnich a écrit :

I'm not sure how I should handle multile file path arguments to external scripts/commands.

The first possible approach is to have only one 'it_' command for everything. This command could then use the environment variables SXIV_IMG and SXIV_SEL_IMGS (or something like that) to refer to the current image or all selected images. This would be powerful but maybe error-prone, because the latter variable would be empty, if no images are selected.

The second approach is to have a new 'it_' command next to it_open_with & it_shell_cmd which only differs from it_shell_cmd in using SXIV_SEL_IMGS instead of SXIV_IMG.

I'm not sure neither.
I think I prefer the first approach.

For both approaches one more problem has to be solved: How to select multiple images? In image mode a selected image could be marked with a special character in the title string. But I'm not sure what easy (easy as in easy to do with pure Xlib) approach should be taken to mark selected images in thumbnail mode.

Any ideas?

Maybe the simplest solution would be to draw a border (with configurable color) around each selected image?
Also, if the current image is part of a selection, its border could be drawn with a bicolor dashed stroke.

@baskerville
Copy link
Contributor Author

Any ideas?

In fact, I think the elegant way of representing the selection visually
would be to draw the perimeter of the selected region and not every
border of every selected image but I don't think it would be easy to do.

I'm not sure if this feature is really important after all.

@xyb3rt
Copy link
Owner

xyb3rt commented Jan 28, 2012

Seems not important enough to me. I will not implement this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants