Made an Obsidian Plugin

For more than five years I’ve moved all my notes and documents – personal and professional – into Obsidian, a super-powerful app for organising and maintaining notes using markdown. I’m quite fanatical about the app. And now, I’ve written a plugin that I’ve just submitted be included in the Obsidian Community Plugins directory. It’s my first-ever bit of coding that I’ve felt I should share.
I moved to Obsidian after using OneNote from the year 2000 to keep my resources and notes as a teacher. I was an early adopter of OneNote when Microsoft first released its tablet pcs. Over the years I accumulated hundreds of “notebooks” filled with handwrtten notes, PDFs, images, audio files, videos. Then in about 2018 I tried to export one of my notebooks into another app and found that it was pretty much impossible to do so. That sent me down a rabbit hole of realising how trapped I’d let myself become by propriety software – including ones that claimed interoperability or easy export but didn’t make it at all possible. (I’d used Evernote and Apple Notes as well for personal stuff – but they were, admittedly easier to export from.) I learned that keeping notes in text files was about the most reliable and so, after trying out a range of apps, settled on Obsidian which was gaining popularity due to the ways in which it could be enhanced through plugins and themes.
My Obsidian vaults (the name given to the collections of notes made by the app) are synced between laptops, ipads and my phone using Syncthing which means I can acces and add to them anywhere. Because I keep my vaults synced like this, I’ve learned to keep my vaults lightweight and containing only text files. Which means that I self-host other media like images, PDFs and audio files separately. (I used to do this using OneDrive and the webhost here where I maintain my blog but now self-host off a server in my house.) Everything works excellently…
… Except that Obsidian embeds PDFs in notes only if they’re kept in the vault. There are workarounds that do things like creating virtual folders and symlinks – but they still require copying the PDFs to a local device. Images aren’t treated like that: you can keep them in your vault or you can embed them from whichever website they’re hosted. I embed lots of images and have tried to embed PDFs over the years with no success. I’ve had lots of conversations online with other Obsidian users who’ve told me that it’s not possible to embed a PDF from an external source. Stubbornly, I just couldn’t understand why it wasn’t possible if other media – including audio and video files – could. It was something that I just couldn’t let go.
So, after installing Paperless-NGX as a repository for all my documents in PDF, I decided to work on a way of embedding a PDF in an Obsidian note. I have a rudimentary knowledge of javascript, which is the language used for Obsidian plugins and began to write the code. Of course, it didn’t work. So I asked some AI tools for assistance in checking my code and suggesting improvements. The AIs were useful in picking out areas and suggesting ways that the plugin could be improved – though, several times, they sent me off on the wrong track. Eventually, the plugin sort of worked… until it sort of didn’t. I found that I needed to make sure that it could work on iOS – and that threw up a massive security issue because Apple don’t seem to like PDFs being embedded on mobile devices. Some sort of security issue that I don’t understand. Then, with a bit of recoding, I managed to get it working across all platforms I had access to: Windows, OSX, Linux and iOS. A little more recoding to enable PDFs to be embedded from local files on a device external to the Obsidian folder and it was pretty much finished.
So, what does my plugin, External PDF, actually do? It’s very simple and fills a hole in what I think should be basic functionality in Obsidian. It lets you embed a PDF hosted on a website in a note without having to download the PDF and save it in your vault. In your note, you just need to add something like this (with your link to the PDF document online, of course):
```external-pdf
https://example.com/document.pdf
```
…and the PDF will be visible in your note, embeded in a reader frame. There are options to include title, sizes and the ability to embed PDF files kept locally on your computer but not in your Obsidian vault. Even if no one else in the world is at all interested in embedding PDFs like this, it is something I’ve wanted to be able to do for a very long time. And now I can.
Just in case someone else is interested in this, I’ve put my plugin up on GitHub and submitted it to Obsidian to be included in their community plugins repo. While I realise this isn’t a big deal for someone who programs, it’s the first time I’ve made something like this that works and the first time in a long, long time that I’ve felt I’ve improved my tech knowledge.
Made an Obsidian Plugin
For more than five years I’ve moved all my notes and documents – personal and professional – into Obsidian, a super-powerful app for organising and maintaining notes using markdown. I’m quite fanatical about the app. And now, I’ve written a plugin that I’ve just submitted be included in the Obsidian Community Plugins directory. It’s my…
Riverworld
From time to time I think about the books that I read when I was young. That they still have resonance all these years later and I can remember the profound effect that they had on my thinking and my imagination is testimony to their writing. Of course, novels like The Lord of the Rings…
Autechre, Artist in Residence
Thoroughly enjoyed an absorbing Radio 6 mix by Autechre (the first of four!) which was almost all new to me and has provided a wealth of music and musicians to follow up – particularly the startling hip hop tracks. The show is described as: Step into the genre-bending world of Autechre, the legendary duo whose…
Unwelcome Website Woes
THINGS haven’t been great with my blog over the last week or so. That’s an understatement. I’ve spent a great deal of time working out how to save all the content I’ve put up here for the last five years. I’ve maintained blogs of some sort or another since the late 1990s and more consistently…
Thomas Covenant, The Unbeliever
Another charity shop find! A mere £1 for the trilogy of Stephen Donaldson’s The Chronicles of Thomas Covenent, The Unbeliever. It’s a fantasy series started in the mid-1970s in that early wave of post-Toklien novels and I read the first volume way-way-back when I was in my middle-teens (recomended by the owner of Stargate One…
Book Evocation
A discussion about the merits of reading a physical book rather than a digital copy led to considerations about the way that books – like songs – are associated with a particular moment in time in memory. There’s some truth to this. I often recall the first copy of a selection of Thomas Hardy’s poetry…
The Book of Alien, 1979
Another find at our local Oxfam bookshop, The Book of Alien. Published in 1979 to accompany the release of the movie, it’s a behind-the-scenes account of the production with lots of art (mainly by Ron Cobb but also by Moebius and Chris Foss) and photos. There are sections on spaceship design, sets and spacesuits, the…
Another Thrilling Star Wars Adventure!
Love these (fake) book covers for the first three Star Wars movies in the style of sixties pulp paperbacks. Illustrator Russell Walks is amazing!
The Dead of Night
Bought for £1 at the local hospital’s League of Friends bookshop. Onions is one of the great twentieth-century ghost story writers. This volume does include The Beckoning Fair One which Robert Aickmam described as “one of the (possibly) six great masterpieces in the field”. There’s an intense, manic quality to Onions’ writing that is incredibly…
-2,147,483,648 Hours and 24 Minutes
Decided to reinstall OSX on the macbook air that I mostly use at home. I bought it in 2012 and, other than upgrading it to Catalina (which is as new as OSX will go without using OCLP) it’s always worked great. Over the years I’ve installed a lot of apps, fiddled with the settings and…
Weeknotes wb 16 September 2024
I have to admit that I’m struggling to maintain these weekly notes (though I will endeavour to do so). Mainly it’s that I’m over-thinking the detail and it’s taking me far too long to put the notes together. So here’s something shorter… The “Season of mists” is most definitely upon us and I’m waking to…
Radio Times Lord of the Rings Cover
Lovely piece from 2021 by Brian Sibley about the cover to the 7th March 1981 issue of Radio Times. Sibley writes about the illustration, Eric Fraser, and his acquistion of the original artwork. Much like Jimmy Coulty’s stunning 1976 poster illustration for the novel, Sibley’s BBC dramatisation which was originally aired between March and August…
Make Something to Your Taste
At the bottom of Jay Springett’s latest post, Destination Distraction, he’s added a short video, Make Something to Your Taste, his latest 301 Permanently Moved podcast episode, which caught me at exactly the right time. It’s a mesmerising video where Springett is convincing in reinforcing the importance of creativity and a call to “Make a…
The Hartnell Years
Picked up a copy of The Doctor Who Production Diary: The Hartnell Years by David Brunt. I’m in the middle of watching the first season of Doctor Who from 1963-4 and, while I make great use of both the first volume of About Time and The Television Companion – both of which I’ve owned for…
Weeknotes wb 2 September 2024
Weather’s changed and there’s now a definite sense that Autumn’s begun. It’s cooler – almost cold – and darker during the day and we’re experiencing sudden showers. By the end of the week the children were both back at school (fairly happily, which is a relief) and I’m getting to grips with how things seem…
Agatha: A Tale of Three Witches
I’ve just backed Andrew MacLean’s Kickstarter project, Agatha: A Tale of Three Witches. It’s a prequel to MacLean’s fantastic quarterly series, Head Lopper, a comic I’ve bought from its first issue. (The last issue, #16, was released in 2021.) Anything Head Lopper gets an automatic “must buy” from me. There are a range of “rewards”…
Weeknotes wb 26 August 2024
September has always been the pivot on which the year turns. My birthday is in a couple of days and, as a child, it would be the signal that the return to school would shortly follow (though in those days, the start of school seemed to be about a week after my birthday). And here…
Weeknotes wb 19 August 2024
There’s a definite sense that summer is coming to an end. It’s feeling cooler in the mornings and grey clouds and rain have dominated many of the days this week. Come to that late-summer point where I’m genuinely uncertain about which day of the week it is. Doing (or should that be Done?) Another “summer…
Weeknotes wb 12 August 2024
This is the first of my attempt at maintaining a weekly “weeknotes” used to intentionally review and reflect on the last seven days. I know that the format of this weeknotes isn’t quite right and will undoubtedly undergo changes. I’ve enjoyed reading the weeknotes and, after some recent posts by bloggers talking about why they…
Hüsker Dü Live
Spent a couple of hours today listening to some of the live recordings of Hüsker Dü that can be found on the Internet Archive. It’s a mixed bag: some pretty good ones that sound as if recorded at the mixing desk, while others are just muffled noise with the occasionally recognisable vocal. I can understand…
Control
Eventually picked up a copy of Control, a five year-old game I didn’t realise I wanted to play until the release of Alan Wake 2 revealed that it was set in a shared universe. Described as “a solid comedy pastiche of the X-Files, right down to a mysterious smoking man” by Rock, Paper, Shotgun reviewer…
“it’s the nameless non-slop that matters”
Wonderful post by John Higgs which ranges from the Trump assassination attempt, the Olympics opening ceremony to “knobbing about”. Higgs makes the best analysis of the Olympic opening ceremony I’ve seen, dscribing it as “slop”, which he defines as The ceremony was a lot like modern digital culture. We are bombarded with seemingly unconnected ideas…


