ucollage icon indicating copy to clipboard operation
ucollage copied to clipboard

Reloading opened folder(s) inside ucollage

Open egolep opened this issue 2 years ago • 1 comments

Maybe it's a stupid question, but I can't find a way to reload the folder opened in ucollage without having to close and restart it. I tried to use loadfiles, but it keeps saying that all the images are already loaded even if I manually pasted a new image in the folder (I tried both the actual folder and /tmp/ucollage).

Am I missing something? Or this is not a pre-implemented feature?

egolep avatar Dec 28 '21 11:12 egolep

Hello. Happy new year and sorry for the late answer.

Currently it is not possible to achieve what you want through the program. It is indeed a really useful functionality, but I don't know when I will be trying to implement that and other things that have come to my attention.

If you want to try your skills and make a PR I would gladly check it out.

Reading is happening in filelist.sh and you could utilize the code there to reread the directory, but there are some issues

  1. What happens with expanded directories (we should save the users input during startup for each case)
  2. We should be able to remember the state of the program. What batch of images we are showing. Or we could just forget everything and start from the beginning if a "hard" reload of the files is requested. This is also viable.
  3. What happens to edited images?

I think these are solvable problems, but I currently don't have the time to code a solution.

A first accepted solution would be to:

  1. Use an associative array to store expand answers for the directories passed as command line arguments.
  2. Use these answers to reread the command line arguments.
  3. Restart the original loop without caring about anything else (inform user about potentially lost work).

After that we could try to do the more complex things w.r.t. remembering previous state

ckardaris avatar Jan 07 '22 21:01 ckardaris