Update old notes to match new template

So I’m sure many of us evolve our templates as we build up our vault, now some notes’ format are then outdated, which becomes a bit of a problem for a control freak like me, or at least problematic when trying to query your note using dataview, so my question is below:

What do you think is a good approach to adapt old notes with old templates into new formats based on new templates?

Below is a list of things that I want to be able to do:

  • e.g. move tags from body to frontmatter
  • e.g. find certain key::value pair and put them right below H1
  • e.g. add divider after certain key::value pair
  • something else similar?

Possible approaches:

  1. Is this possible with current features and/or plugins?
  2. Is some other tools able to help achieve this?
  3. Maybe something that needs a little bit of coding?

Thank you!

3 Likes

I don’t know if there is any plugin that could help, but your use case is very probably quite personal so even if these plugins would exist, they wouldn’t perfectly fit to your need.

I would use custom-made templaters with a bunch of sophisticated find & replace regex-based routines

I hope you are familiar with regex as this will probably require a bit of advanced stuff !

You’ll also need a little bit of work (not too hard I guess) to have your templater run in all notes of a folder, instead of launching it note by note.

You can create a test note which has all the edge case broken things you want to change, and then go to regex101.com, copy paste your note and start building regex that will hopefully detect and capture all stuff you correct / move around.

The templater thread in Obsidian discord is very active and there are a lot of experts around that could help you getting started.

You could also look into the Linter plugin. I am not completely familiar with it, but know that it has some functionality that could prove useful in this context. Good luck!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.