A script for Quickadd plugin to fetch book data into your vault using Google Books!

googleBooksDemo

Based on the movies and series script proposed by @Christian, this script uses Google Books API to fetch data.

If anyone is interested, here is a link to the Github repo of this script, including a tutorial on how to use and install.

If the script helped you and you wish to support this work :wink: :

Please make sure you understand the script before using it, I’m not a programmer so use with caution !

Related script

If you enjoyed this script, you may also be interested by the script I posted last week, to fetch videogame data into your vault:

12 Likes

This is awesome. Thank You!
The Google Books environment has a much richer set of meta data. Downside is you’ve triggered my interest, I will not get much sleep tonight:)

2 Likes

Thanks @writtenfool ! If you have been able to try it, I hope it was useful to you :wink:

Hello @JamesKF! Thank you for this exceptional piece of script; I must say, you’ve triggered my interest too, and I’m trying to implement it in my Vault.

Following the instructions, everything seems to be working fine, but when I run the scripts (after choosing title, autor, recommender and comment) this show up:

image

Should I change some part of the script? I’ve simply copied the “script_googleBooks_quickAdd.js

Thanks :slightly_smiling_face:

Hello @stfrigerio,

I’ve sent you a MP : we can try to solve it there, and I’ll update this thread once we’ve found a solution :wink:

Thanks

Update : Problem was solved, forgot to update here. To others it may help : load the script from QuickAdd (following instructions on the github page), not from templater.

Update v2.0 :

Due to QuickAdd update 0.5.0, this script now also works on mobile!

1 Like

This has totally replaced Goodreads for me now.

Is there a way to get an excerpt as well?

Mmm, I don’t think we can get an excerpt with the Google Books API (you can look at all the available data in the Google Books API documentation here).

However, if you are interested, it’s possible to get a synopsis of the book, which I’ve not added yet.

For that, you just have to replace the following lines of the script :

		// A short personal comment on the book.
		comment
	};
}

By the following lines :

		// A short personal comment on the book.
		comment,
		// Synopsis of the book
		synopsis: selectedBook.description
	};
}

And in Obsidian, in your book template, get this value with {{VALUE:synopsis}}.

Should still be working with latest Obsidian version (1.5.3) :slight_smile: