Use a flat directory structure to store collections
Collections/libraries shall be stored in a flat directory structure. Basically, the directory shall be organized like this:
- A single directory represents a collection/library. The directory is sub-structured only in year/month, where an item created in year XXXX and month YY is stored in a sub-folder XXXX/YY.
- Any file starting with a dot in its file name is supposed to be a "meta data" file containing e.g. sync information.
- Any other file shall be names UUID.otl where UUID is the globally unique ID of an item (which can be any top level item or a todo or a task).
- Files attached to an item (e.g. image files) shall be named UUID.res.ext, where UUID is an arbitrary generated GUID for the file and the "-res" part is added to indicate this is not an item metadata file but a resource file.
- There shall be a file library.json which contains the meta data of the library itself.