3 ms·
It's a tricky situation. I'm not sure which is best. The advantage of using a directory for your format is that it's easy to use preexisting tools on the conten
by seagreen 11y ago
It's a tricky situation. I'm not sure which is best. The advantage of using a directory for your format is that it's easy to use preexisting tools on the contents of a note.
Say your note looks like the Quiver example:
B59AC519-2A2C-4EC8-B701-E69F54F40A85.qvnote/
├── content.json
├── meta.json
└── resources
└── BCA3F8A8-C8CC-4FE5-AABB-C4262134B9E7.tiff
You can examine and modify the .tiff file using normal command line tools. This is nice!
Whether this adds to the complication of the project depends on your perspective. From the user's perspective this is simpler, they can now use normal tools to work on resources without having to manually extract and then reinsert the resource.
But from an overall perspective (which is probably more important), I think you're right that this is more complicated. Directories are higher level than JSON files -- we don't always have tools that can work with them. A JSON file has a both a single Unicode and byte representation, not so for directories. Losing this to make things easier on the user is no small deal.
Perhaps the right answer _is_ to put the whole note in a single JSON file. From there it can be transformed into directory with FUSE for modification by standard tools (or for export purposes if the user wants to move away from our note type). I'm still not sure about this though.