Obsidian plugin that automatically generates thumbnails for notes in the card view.
AI was used to help with regex. I still donāt fully understand how that stuff works š
Obsidian plugin that automatically generates thumbnails for notes in the card view.
AI was used to help with regex. I still donāt fully understand how that stuff works š
More quality of life changes because we love those! Thisāll be the last devlog before I ship as well, I just ran out of time to make the automatic regeneration.
Log in to leave a comment
Iāve made mostly QoL changes, but there is one new cool feature. The plugin now automatically calculates the height/width of the card instead of relying on hardcoded values! This is still a bit dangerous, so I need to implement custom types and interfaces to meet Obsidianās standard for plugins, but this is progress. I will also work on automatically regenerating the thumbnails next (very soon as Flavortown is about to end D:)
Log in to leave a comment
This was hard⦠A lot of this is outside the specs provided by the Obsidian team in their docs, so it involved a lot of debugging and figuring things out on the fly.
I ultimately did get to find, parse and apply the filters from bases. This is done through a lot of manual process and a crap tonne of recursion, as the filters are a bit weird. Instead of having multiple arrays, you have one item that can either be a string (the filter itself) or another array, which can be a string or array and so on. As such, there are four types you can encounter when working with the filers: and, not, or or a string.
The properties were also a paid, tags, links, properties and folders (parents) had to be handled separately from anything else, which was then kind of alright.
Next, Iāll work on automatically generating and adding the thumbnails as a property. Thisāll include using the proper aspect ratio! After that will be listening to changes in both the base and the files to regenerate thumbnails.
Log in to leave a comment
Image generation has improved! Alongside better padding, the background colour is actually what it is in Obsidian and the font size/resolution has been tuned.
Additionally, the plugin now automatically switching you back to the leaf you were previously on using getMostRecentLeaf()!
A full changelog is below :)
Log in to leave a comment
Had an idea to generate thumbnail previews of notes in bases. Came up with two fairly straightforward methods of generating a thumbnail.
The first method uses Obsidianās built-in MarkdownRender, whereas the second (āqualityā) one simulates a CodeMirror tab in the background and captures that instead.
Now, Iāll be working on reading the YAML config for .base files and probably work on automatically generating it for files and listening to file changes.
Log in to leave a comment