3 ms·
I spent a day a couple of years ago writing an app to solve this kind of problem, and more. File format is plain text files stored in directories. Every directo
by barrkel 15y ago
I spent a day a couple of years ago writing an app to solve this kind of problem, and more. File format is plain text files stored in directories. Every directory becomes a tab; every file becomes an entry, with the first line in every file being its title. Along with plain text files, .log files are kept; these keep a log of every edit to the .txt file.
Nothing is ever deleted. No edits are ever lost; the whole undo stack is always there, and if you undo to a particular point and edit it, it just becomes a new revision on top of the old undo stack. There is no save / load - the app uses the directory it was started from, and saves when no edits have occurred for 5 seconds.
It's a combination of notepad, brainstorming log, todo list, and general notes. I keep it in sync across multiple machines with dropbox.
- fernandotakai 15y agoAnd you could share this with everyone!
- barrkel 15y agoDownsides to sharing: it's written in Winforms on .NET (though I expect it would work with Mono just fine); the UI is minimal to reduce clutter, and relies primarily on shortcuts: Alt+Left/Right to select "page" (= text file in directory) - pages are sorted in order of last edit; Alt+Up/Down to select revision (aka undo / redo / playback); middle-click mouse to paste if nothing is selected, or to copy if something is; and some searching etc. Wrapping it all up nicely to share it, document it etc. would take at least another day, but I have many other things on my plate at the moment...
- ptn 15y agoMy very first webapp (now lost) used a similar idea. I wrote a web text editor in plain CGI with Python to allow users to create and edit an unlimited number of files. What the user saw as files in the UI were directories in my FS that contained one file for every revision, with the filename encoding the date and time of the edit; also, there was a symlink called "current" that pointed to the last revision, so I didn't need to parse the filenames to find out which version to show. That was when I learned that Linux's FS is reliable, secure and just all-around awesome.