Note Thumbnails banner

Note Thumbnails

5 devlogs
15h 12m 11s

Obsidian plugin that automatically generates thumbnails for notes in the card view.

This project uses AI

AI was used to help with regex. I still don’t fully understand how that stuff works 😭

Demo Repository

Loading README...

James

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.

  • I’ve updated the documentation to include comprehensive installation and usage instructions, including screenshots!
  • Old bugs and features intended for testing have been removed
  • Made the automatic height and width generation generally type safe
  • Generation now works even if the cards view isn’t the first one
  • Other minor changes, such as bumping the minimum app version and adjusting the base file explorer interval

Changelog

0
James

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:)

Changelog

0
James

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.

Attachment
Attachment
0
James

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 :)

Changelog

0
James

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.

Changelog

Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
0