Corrected the type of OMG.md_files in the README.md

This commit is contained in:
The Wobbler 2025-04-10 11:41:21 +02:00
parent 8c827f40e7
commit 5521f73291

View file

@ -38,7 +38,7 @@ omg.py .
### Python API ### Python API
To use the script as a module, simply import it and create an instance of the OMG class with the `path`-parameter set To use the script as a module, simply import it and create an instance of the OMG class with the `path`-parameter set
to your vault path. The metadata is stored as a dict in `instance.md_files`. to your vault path. The metadata is stored as a list[dict] in `instance.md_files`.
Example: Example:
@ -46,7 +46,7 @@ Example:
from omg import OMG from omg import OMG
metadata = OMG("/home/user/.obsidian/myVault") metadata = OMG("/home/user/.obsidian/myVault")
as_dict = metadata.md_files as_list = metadata.md_files
``` ```
To write the metadata, you can use `instance.dump(path: Pathlike=None, indent=2)`. To write the metadata, you can use `instance.dump(path: Pathlike=None, indent=2)`.