How to auto-create Zettelkasten prefixes?

Hi Everyone,

which other programming languages - like Mermaid - I can use inside my notes, and how?

I tried Python and Ruby but was unsuccessful means nothing happened in the preview.


def index
  puts "hello world"

Fenced code blocks were never meant to execute code, but instead to display code nicely (probably even with syntax highlighting).

They have been “abused” in Obsidian to actually do things (like with mermaid and query), which in turn only works within Obsidian (and not other Markdown tools).

So don’t expect too much to happen in this respect—some of us still want to just display code and not execute it … Imagine how horrible it’d be if something like rm -rf / would suddenly get executed in the shell …

Thanks @Moonbase59 , you are right.

The background of my question was this.

I am using the Zettelkasten prefixer, but if I create a new link in a note, which is unlinked (because there is no note for this link so far) and after I click on this link Obsidian craetes a new note but NO zettelkasten note, means the title has the name of the link.

Now I just wanted to create something “small” with IF… THEN which checks the title and changes or offers me an updated title based on the zettelkasten prefixer and the name

Sounds like a vaild use case (though not for fenced code blocks), and I seem to remember there has been a feature request for it somewhere.

I would like to build something like

the title of this note is not 20xxxxxxxxxx (something with REGEX)
{{title}} = {{date}}{{time}} {{title}}

For the users who want to have a zettelkasten prefix

I don’t use ZK prefixes, so maybe you want to change the title of your post to get some help from ZK users? Like maybe “How to auto-create Zettelkasten prefixes?” or the like?

1 Like

I found a solution for the beginning.

My template folder is called🦎

My zettelkasten prefix is YYYYMMDDHHMM

So via search I can find the files without ZK prefix with:
path:- “:lizard:” - file: /(19[0-9]{2}|2[0-9]{3})(0[1-9]|1[012])([123]0|[012][1-9]|31)([01][0-9]|2[0-3])([0-5][0-9])

And by query in a note it would be

 path:-"🦎" - file: /(19[0-9]{2}|2[0-9]{3})(0[1-9]|1[012])([123]0|[012][1-9]|31)([01][0-9]|2[0-3])([0-5][0-9])

Two relevant requests:

Also note:

1 Like