I need to change my YAML setup. Having 1500 notes, the manual route isn’t that appealing. What would you suggest?
This is what I have
titel: A note title
taggar: #atag #asecondtag
zid: [[202012151052 A note title|A note title]]
And this is what I want:
title: A note title
tags: [atag, asecondtag]
So, one the first line, changing “titel” into “title”. On the second, chagning “taggar” into “tags” and changing the tagging syntax. On the third, just keeping the unique id. And on the fourth, chagning “källa” into “source”.
I guess Regex and something like SublimeText are the tools I need?
Backup your vault again and perform these replacements. After each one, go through your notes (if you have too many, just a nice random sample) to make sure there are no unexpected results. There probably will be.
1. Note titles
This assumes that the note title is exactly repeated in three places.
Let me start by stating very clearly that I’m not even an intermediate regex user. I’m not being modest, here. It’s just that regex is so powerful that even a beginner can do amazing things.
I started to learn regex out of necessity, while doing some text cleanup that would otherwise be very tiresome. I found it so useful (and so much fun) that I kind of took it as a game I regularly play.
My advice is to start with practical examples; real-world problems, preferably something close to an immediate need of yours. Like finding all e-mail addresses in your vault. Or all dates. Checkout these awesome playgrounds:
thanks a lot @macedotavares for the awesome helpful reply. It helps a lot and I can’t to start practicing it! I appreciate the awesome suggestions, I’ll take on your offer and reach out if I need help!