Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.84k stars 321 forks source link

File Browser: Write Selection File #6323

Open Randalix opened 3 years ago

Randalix commented 3 years ago

There should be an option to write out a plain text file containing full paths of selected images. This would enable advances scripting possibilities e.g. passing the selection to file browsers like nnn, uploading the selected files or compressing them, etc.. The file could be written each time a selection event occurs or it could be an entry in the right click menu and/or a shortcut.

Randalix commented 3 years ago

Would you accept a pull request adding this feature?

Thanatomanic commented 3 years ago

@Randalix Could you first give an example of a common use case?

Lawrence37 commented 3 years ago

Writing the file names to a file seems like a specific and rare use case. However, I would be in favor of an option to copy the selected images' paths to the system clipboard. It is easier to implement and more flexible.

Randalix commented 3 years ago

The main idea is to add advances scripting possibilities and to follow the unix philosophy: Do one thing and do it well. Store data in flat text files etc. RawTherapee should not need to implement filebrowser specific features or features to upload images to the cloud, send them in a email, compress them, encrypt them, pass them to any other application... Anything you could think of. A plain text file is the most universal way of interacting with other programs, programming languages.

Randalix commented 3 years ago

@Thanatomanic it seems like the examples I mentioned are not valid to you. If you mean by common use case something that every user will use. The answer is: There is none. It's for people who want to have some kind of pipeline/workflow. I select some images; trigger my script; those images get renamed by some naming convention; placed in a freshly generated folder with proper naming (maybe involving some meta data) on my nas drive. You could go further and encrypt them, compress them, send them as a mail, open them in some third party application (photo stitching, denoising, etc)

lukasloetkolben commented 3 years ago

This is exactly the feature i was looking for! I would love to see a PR

Lawrence37 commented 3 years ago

I'm not yet convinced that the use cases of this feature justify the potential complexity it adds. It would help to explain the specifics of how it will look like for users. For example, how do you specify the name and location of the text file, if it can be set at all? Is the file automatically updated or is there a button for saving the names? How is the file formatted?

Also, there is a hack you can try if you are using scripts. RT saves the queue in a file (/batch/queue.csv). You can put the selected images to the queue and use a script to parse the CSV.

Randalix commented 3 years ago

@Lawrence37 /batch/queue.csv is exactly what I was looking! Creating a queue and removing it is a little cumbersome, but it works. I think the issue can be closed then.