I would like to provide feedback.
For context, I am NOT a developer but I can (to some extent) read the code of others and makes sense of it. I consider myself a heavy users of Obsidian, lots of plugins and templates, daily use for multiple topics (work and private), lots of METADATA work. So that’s me, my “persona”.
This library is so HELPFULL to me. I have just started to TEST doing stuff in the proposed dummy vault, and it has been so wise to do it that way, because of course I made mistakes (and I think I found a bug, also).
Right now I am in the process of carefully crafting test notes with both simple and corner cases, and making sure that I can easily move back and forth metadata from FRONTMATTER to INLINE and revert that. Interestingly, I learned that if you have the metadata as INLINE within a CALLOUT (which looks lovely), you have to do an extra step to move it to FRONTMATTER (first you have to move the INLINE to standard format, i.e., remove the callout).
Currently, I am testing stuff like…
- Collecting all INLINE metadata in diff places and grouping at the top or bottom of the note
- Moving/removing tags
- … more
For example, I created a test note called Test1 with both FRONTMATTER and INLINE metadata, and I am testing to manipulate exclusively all INLINE metadata, sort both the KEYS and the VALUES. And I have placed the metadata Dataview fields all over the note, even some hidden with ‘%%’. The order of appearance of the keys is out of alphabetical order, and within the keys, the values are also out of order. So I am doing this:
- Filter notes by name
- Sort INLINE metadata keys in ASC order
- Sort INLINE metadata values in ASC order
- Group all INLINE metadata into one location, regardless of where in the nodes is located
- Place INLINE metadata at the top
- Write the INLINE in “standard” format
from pyomd import Notes
from pyomd.metadata import MetadataType
from pathlib import Path
from pyomd.misc import Order
path = Path('/Users/FGS/Documents/Obsidian/TestVault/Media')
notes = Notes(path)
notes.filter(starts_with="Test1")
notes.metadata.order(k=None, o_keys=Order.ASC, o_values=Order.ASC)
notes.update_content(inline_inplace=False,inline_position="top",inline_tml="standard")
notes.write()
And it works!
Amazing!
Thanks so much to the creator of this library!