hello again.
so we shifted back to the backend model and most of the time was spent on designing the architecture of how the frontend would control the backend.
so yeah. pretty much it. designing file manipulation functions and testing them.
one major update is that maybe we might have to/ be able to only parse tags from inside file yaml and not file body. thing is that reading these tags is easy and clean, but manipulating them requires me to manipulate the file via a cache. if consecutive manipulations are made and the cached file is not updated in between, the function ends up slicing the file wrong, corrupting the data.
metadata has specific functions that cleanly handle reads and writes. so im a bit confused about what i should be doing.
see ive already implemented a command to pull all tags from the body into the frontmatter without manipulating the file. this is great. so i kinda loose nothing. users who write tags inside the body itself, just have to call this command. or maybe we call this command before constructing the tree. idk. but its a solvable problem
the issue wil probably come when i want to implement chunks. idk how ill controll chunks if i cant assign tags to a chunk inside the body.
one solution that i think i can use is that we dont just add tags. we add chunk specifc tags that look like “chunk_1770208637_tagname”. the timestamp is the unix time corresponding to the chunk time. thus the body is only read and the yaml is modified at any point.
issue is what happens when u accidentallly modify the time of a chunk? or i have to really modify the time of a chunk? (all inside the editor)
maybe i can provide another function where i can place the cursor inside a chunk and then call the method. provide it the tags i want to add and then it reconstructs the tag in the yaml…..?
chunks is gonna be a complex one.