note-mark
note-mark copied to clipboard
(feat) More storage structure options
Does it fit the projects scope?
- [x] This is relevant
Why?
What I like about Note Mark is that the content of notes is saved as plain text on disk. This opens the door for interoperability.
What I like less is the chosen directory structure. Currently the structure from the data directory root is <first two letters of note UUID>/<note UUID>/note.md. Without Note Mark's database, it is impossible to know which note belongs to whom.
Solution?
What I would like to see is more configuration options for dynamic paths. For example:
<configurable unique user ID>/<notebook slug>/<note slug>/note.md
Notice that all these values are unique, preventing duplicate values from occurring. This structure is also compatible with the existing ability to attach assets, since the contents of the note directory is not changed, just its location.
The configurable unique user ID should be something that the user configures. Examples include the unique user ID Note Mark generates, a claim from OIDC (such as sub or preferred_username), etc.
When configured to use the same type of usernames, this will allow access to a user's own "raw" notes through other software, such as Nextcloud. That would be a great first step in the ability to integrate Note Mark in other software. 😃
Alternatives?
No response
Extra Context
No response
Good idea. I have originally documented it in #47, however when I migrated to using Projects to list the roadmap it never got added back. Woops!
In V1 the app will use a file/folder based storage backend, so all usernames, note-slugs and folder-slugs and assets will be stored normally. The database will still be used, but not required for seeing note data. It will also allow for nested folders to be finally implemented.
Example of future structure:
leo/
index.md
personal/
ideas/
my-idea.md
assets/
idea-pic.jpg
However, V1 will not be released for a good while. It will take quite a lot of work. With each V0.x I'm slowly rewriting stuff to allow the future V1 release.
I don't have any further features planned for Note Mark V0, so after V0.17 I can put V1 as a priority.
*relates to #92, #244
@enchant97
No pressure. I understand if my suggestions will take a while or might not even see the light of day. Therefore I am already happy that they are acknowledged. 😄
So take your time! 👍
Will this structure be compatible with Obsidian?
@bogdanr the idea is you will be able to store your notes in whatever structure you want. I think Obsidian just stores markdown files in a folder structure, so it probably will be possible to just copy them in. I don't use Obsidian so I could be wrong.