3 ms·
Chrome implements APIs that allow accessing files on the disk. So Edna either stores notes in localStorage or in a directory of your choosing on disk. In Edna
by kjksf 2y ago
Chrome implements APIs that allow accessing files on the disk.
So Edna either stores notes in localStorage or in a directory of your choosing on disk.
In Edna you can right-click for context menu to switch between localStorage and disk.
If you ask: "how do the browser APIs work", you can look at https://github.com/kjk/edna/blob/main/src/fileutil.js https://github.com/kjk/edna/blob/main/src/fileutil.js
Basically, there's `window.showDirectoryPicker()` to ask user for permission to access directory (either read only or read write). And then using that directory handle you can read list of files, read / write files or create new files.
- wernsey 2y agoOh, man, many years ago I used Tiddlywiki (and later Wiki-On-A-Stick) as a browser-based note taking app, but stopped using it because the API they used to save the file to disk got deprecated and removed. History not repeating but rhyming, I suppose... Anyway, thanks for this. I've just added it to my bookmarks.