Craft By Zen

Obsidian Logo
Obsidian Logo

1 min read

#pkm   #programming

Using my custom book macro for Obsidian QuickAdd Plugin

I started taking notes on Morgan Housel’s book, The Psychology of Money, and I wanted to have an automatic note created in my Obsidian vault.

I have Nick Milo’s Ideaverse installed and wanted to take advantage of the QuickAdd plugin. The example they give for the BookFinder script was easy to follow and extend.

I created a gist for it. The original script did not have much error handling. Something to expand on in the future is to have that error handling within Obsidian, which I would like to see.

Also, I used the suggester API to give the user options on which returned item they care about using the Google Books API.

And here’s my personal template using Obsidian properties.

by: "{{VALUE:authors}}"
title: "{{VALUE:title}}"
  - "#highlights/waiting"
  - "[[Books]]"
year: {{VALUE:year}}
published: "{{VALUE:publishedDate}}"
category: "{{VALUE:categories}}"
pages: "{{VALUE:pageCount}}"
publisher: "{{VALUE:publisher}}"
isbn10: "{{VALUE:isbn10}}"
isbn13: "{{VALUE:isbn13}}"
created: "{{date:YYYY-MM-DD}}"

# {{VALUE:title}}


- Subtitle: {{VALUE:subtitle}}

### My Notes  

### Details  


If you have any questions about the script, please let me know. I may create a personal repo of different Macros that fetch data from other APIs.