Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip notes with bad metadata #14

Open
matthewturk opened this issue Dec 28, 2022 · 1 comment
Open

Skip notes with bad metadata #14

matthewturk opened this issue Dec 28, 2022 · 1 comment

Comments

@matthewturk
Copy link

Hi! I use the built-in template engine for daily notes, which leads to having files including frontmatter like:

date: {{date:YYYY-MM-DD}}

But this doesn't parse, because python-frontmatter uses SafeLoader for the YAML loader, and it tries to make these into mappings/embeddings. I'm wondering if it would be possible to have an option to either exclude some directories when creating Notes at the root level of a vault, or to have a allow_errors (or something) option such that if it's set to True it would either skip adding those notes to the Notes object or add them without their metadata.

(On the other hand, perhaps I am doing something very wrong here in having these template variables? But that seems like it's unrelated to py-obsidianmd 😄 )

@matthewturk
Copy link
Author

As a note, I was able to address this by changing how I set up my templates -- feel free to close this, as I can work around it and still use pyomd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant