olivierkes / manuskript

A open-source tool for writers
http://www.theologeek.ch/manuskript
GNU General Public License v3.0
1.77k stars 235 forks source link

Adding A Trash To The Editor #1080

Open TheShadowOfHassen opened 2 years ago

TheShadowOfHassen commented 2 years ago

I really like what you are doing with this project. It is great that it is open source and also free and gives me everything I need to write my stories. With it so far I have written three novels and am working on another.

However, late last night I was finishing a chapter, and as I always do when I finish a chapter, I created a new folder for the next chapter. I didn't see it, so I added another one. Then I noticed it was still selected on one of my scenes of the previous chapter. I noticed that the two folders were also in my previous chapter. So I selected the previous chapter in notecard mode and renamed one of the folders, (because for me that's the easiest way to do that). I do that, and then I go to delete the other one through the notecard (which I now know doesn't work). I hit delete. It tells me I am deleting one file. I clicked yes, and because it was selected on my chapter, I deleted the entire chapter. Hours of work gone and no way to get it back.

Maybe I should have paid more attention, but that mistake got me thinking. A lot of published writers say never to delete your work-- even the bad stuff. In the podcast Writing Excuses they say they keep graveyards of ideas and failed stories.

This is a really long way to get around to the feature that I think would be great if it were added.

The Trashcan: it would work exactly like a computer's Trash. When you delete something, it would go to the trash can where you would be able to review it before it is deleted forever. It would stop unfortunate accidents like what happened to me, and if you added a note, it might remind beginner writers to not delete bad chapters but put them in a deleted scene folder.

To get more technical. (Forgive me if I mess up the terminology I know Gtk, Pygobject not Qt) I think it would be good if it was a treeitem appended on the bottom of the file selectors named trash. In it the files and folders would go when they where deleted and somehow when you right-click them they would have the extra options of 'restore' or 'delete immediately' and in the file or edit dropdown menus you could have an 'empty trash function. The trash in the saving of manuskript could be a different file and along with the markdown tags you could add one saying where it originally came from and then in the restore code if the file where had been was renamed it would restore it to the main tree and tell you about it.

Thank you all for putting so much work into this project!

TheJackiMonster commented 2 years ago

One thing I would like to implement is a new revision system (#871) to replace the old (and broken) one. This should also safe your work in the future without a trash bin which is essentially making deletions to flagging files "as deleted" before actual deletion.

The new revision system would utilize Git or Svn in the background to create a history for all of your files. This would allow you to jump back to old versions, merge changes from different systems and synchronize files easily with other remotes. But as cool as it sounds, unfortunately it will take some time until I can work on it. Still figuring out how I fix and optimize file access. Also I'm not sure yet whether we want to stick with Qt or move to Gtk for example (#836).

AlanDunaway commented 2 years ago

I usually use a Rejected folder as Trash.