I'm curious why you are considering expanding the links to include their full file names. What if a filename changes? Of course, this assumes that a note's title is also its filename, and you might want to change the title on a future review or refactoring.
Will Simpson
My zettelkasten is for my ideas, not the ideas of others. I don’t want to waste my time tinkering with my ZK; I’d rather dive into the work itself. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time. kestrelcreek.com
@DavidWJ It's not built into The Archive, so there's no easy way, no.
It's possible to approach this with an automation tool or script.
⚠️ Make a backup (e.g. Zip/compress the folder) first!
The following is almost a blueprint that can make ChatGPT generate a script for you
Assuming that all UIDs are date-time stamps of 12 digits,
Collect all filename in your notes folder.
Transform the filenames collection into a hashmap aka dictionary of UID-to-filename. Check that all file UIDs are unique in the process. Report (print) which are used multiple times, and abort.
For each file from the collection:
Read its content (read-write mode) to replace all wiki links. Wiki links are denoted by UIDs enclosed in double brackets, which is represented by this regular expression: /[[(\d{12})]]/
For each matched wiki link:
Replace the matched UID with the full filename. For example, if the UID 202312061552 corresponds to the filename 202312061552 My best note ever.txt, replace the match with "202312061552 My best note ever.txt". The prepared dictionary of UID-to-filename pays off here.
Replace the file contents with the replaced version.
Comments
I'm curious why you are considering expanding the links to include their full file names. What if a filename changes? Of course, this assumes that a note's title is also its filename, and you might want to change the title on a future review or refactoring.
Will Simpson
My zettelkasten is for my ideas, not the ideas of others. I don’t want to waste my time tinkering with my ZK; I’d rather dive into the work itself. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
kestrelcreek.com
@DavidWJ It's not built into The Archive, so there's no easy way, no.
It's possible to approach this with an automation tool or script.
⚠️ Make a backup (e.g. Zip/compress the folder) first!
The following is almost a blueprint that can make ChatGPT generate a script for you
/[[(\d{12})]]/
202312061552
corresponds to the filename202312061552 My best note ever.txt
, replace the match with"202312061552 My best note ever.txt"
. The prepared dictionary of UID-to-filename pays off here.I went ahead and asked ChatGPT with some instructions:
https://chat.openai.com/share/7609ad5c-8c4b-477f-b3e8-48e3f554eca6
Untested Python script output in case the link breaks and someone wants to refine this:
Author at Zettelkasten.de • https://christiantietze.de/