ArrangePy icon indicating copy to clipboard operation
ArrangePy copied to clipboard

Add the option to undo last arrange

Open prashantsengar opened this issue 5 years ago • 9 comments

If I do a wrong arrange, or due to any other reason, I might want to undo the last arrange.

How to undo We will have to save the last arrange done. Or maybe all the arranges. A single text document should work as well with two entries.

1. SOURCE_ADDRESS/file1.jpg
2. DESTINATION_ADDRESS/file1.jpg
3. SOURCE_ADDRESS/file2.jpg
4. DESTINATION_ADDRESS/file2.jpg
.
.

This file can be saved at the RESULT_DIR. When someone wants to undo, you will have to ask the user to enter the RESULT_DIR address.

Create a function that takes an argument result_directory and commit an undo.

Also modify the main file to take command line arguments like this

python arrange.py /path/to/result_dir undo

to directly call the undo function.

Todo:

  • [ ] Save files
  • [ ] Undo function
  • [ ] Command line arguments

prashantsengar avatar Dec 13 '20 14:12 prashantsengar

I will do this if no one else takes it up. Will take me some time though since I have other issues to solve too.

skcy2001 avatar Dec 15 '20 14:12 skcy2001

Hello, i can work on this. can you please assign it to me

koolgax99 avatar Dec 18 '20 05:12 koolgax99

Sure @koolgax99

prashantsengar avatar Dec 18 '20 13:12 prashantsengar

@koolgax99 are you still working on this issue?

prashantsengar avatar Dec 23 '20 13:12 prashantsengar

Yes @prashantsengar I am working on the issue

koolgax99 avatar Dec 23 '20 13:12 koolgax99

Cool!

prashantsengar avatar Dec 23 '20 13:12 prashantsengar

@koolgax99 How and where are you saving the state of last or history of arranges , can you please tell.

kssvrk avatar Dec 25 '20 06:12 kssvrk

I am saving it in a text file.

koolgax99 avatar Dec 25 '20 06:12 koolgax99

The ideal method would be to create a hidden folder in $HOME directory of linux and C://Users//user folder of windows which will store the state of the software and then create a last arrange file there. Just give a thought

kssvrk avatar Dec 25 '20 07:12 kssvrk