One of my biggest hurdles with Obsidian has been the need to write code in order to create some of the more advanced Dataview Queries I would like to use.
Recently, while trying to create a “changelog” for my vault that would create a table showing the most recent file changes in my vault, but excluding several directories, I decided to give ChatGPT a try. Not only did it generate the code, but it also provided a step-by-step explanation of what the code was doing along with an output example.
Perfect, but not quite.
In order to use a Dataview table with Obsidian Publish, it needs to be converted to a simple markdown file. (Obsidian Publish does not recognize dataview queries.)
I went back to ChatGPT and continued in the same conversation: “can you take the results of this query and convert it to a simple markdown file I can use with Obsidian Publish.”
“Certainly,” ChatGPT replied, and generated the necessary code.
I then asked if there was a way to use this to update a “changelog” file? ChatGPT suggested I use Templater and walked me through the steps to create the necessary template to accomplish the task.
Now, I can hit a hotkey and Templater will generate the changes to the “changelog.md” file using the (pretty complex) query written by ChatGPT.
To accomplish this on my own, I would have spent hours searching through forums and YouTube videos to try and cobble together a possible solution and, if history rhymes, I would have likely given up unable to write a workable query on my own.
I am amazed that someone like me with zero knowledge of writing code can create a complex query like this using simple questions and suggestions.