selimrbd / py-obsidianmd

Python interface to your Obsidian notes
BSD 3-Clause "New" or "Revised" License
262 stars 21 forks source link

Possibility to configure how YAML is written YAML Block vs. Flow Style #27

Open hasselk opened 1 year ago

hasselk commented 1 year ago

Hi Selim,

thanks a lot for this great tool. Maybe i have missed it, is it possible to select how the YAML is written? So that one can select Block vs. Flow Yaml style?

YAML Block Style

This is the style I use for all Obsidian tags.

---
tags:
  - toys
  - gifts
---
# Heading
Content begins here...

YAML Flow Style Alternative, compact style that is still valid YAML, but handling it is not a very high priority for these tools. This is particularly the case for the tools designed to have minimal dependencies, which don't have an actual YAML parser.

---
tags: [toys, gifts]
---

Best Regards Hassel

markfaine commented 1 year ago

I tried everything, even built the string manually by concatenating values and when it saved it's still did not save it as I had specified. (yaml flow style)