Tony Herrera32 downloadsSearch for books, save each one as a note with its cover, and keep a library overview note. Works with Open Library without an API key.
Search for books, save each one as a note with its cover, and keep a library overview note. Works with Open Library without an API key.
Type a title, an author, or an ISBN, pick the book, and Library Notes creates a note from your template, saves the cover image in your vault, and lists the book in a library note with a table of all your books.
Requires Obsidian 1.13.0 or later. The library table needs the Dataview plugin.
main.js, manifest.json, and styles.css from the latest release..obsidian/plugins/library-notes/ and copy the three files into it.Select the library icon in the ribbon, or open the command palette (Ctrl/Cmd+P) and run one of these commands:
| Command | What it does |
|---|---|
| Library Notes: Create new book note | Search for a book and create its note. |
| Library Notes: Toggle read status | Mark the open book note as read or unread. Available when a note in your books folder is open. |
| Library Notes: Regenerate library note | Rebuild the library table, or add it to a library note you made yourself. You confirm first. |
If a note for that book already exists (small differences such as capital letters or ’ vs ' don't count), you're asked whether to Open existing, Create copy (such as Dune 2), or Cancel.
Open Library groups all editions of a book. When you search by title or author, the note describes the edition whose cover is shown in the list, so the cover, page count, and ISBN belong to the same book. When you search by ISBN, the note describes exactly that edition.
Templates/Book note.md.Library Notes keeps everything in one library folder, which can be inside another folder (such as Synced Notes/Library):
Library/
├── Library MOC.md ← the library note, with the table of all your books
├── Books/ ← one note per book
└── Covers/ ← cover images
All four names are settings. Missing folders are created the first time you add a book. Existing folders and notes are never renamed, moved, or deleted.
Cover images are named after the book and its ISBN (or the source's ID when there's no ISBN), such as Dune - 9780441013593.jpg, so two books with the same title never share a cover.
The library note shows a table of every note in your books folder:
| Cover | Title | Author | Category | Note | Read | AudioBook | EBook |
|---|
The table is a Dataview query, so Dataview must be installed and enabled for it to show. Library Notes doesn't install it for you; if it's missing or turned off, you get a notice explaining what to do, and the settings show its status.
The library note is created with cssclasses: library-notes-moc, which makes that note use the full width of the window so the table fits. To keep the normal width, remove that class from the note's properties.
The generated query, with the default folders:
```dataview
TABLE WITHOUT ID
choice(localCover, embed(link(regexreplace(string(localCover), "^!?\[\[|\|.*$|\]\]$|^/", ""), "80")), "") AS Cover,
default(title, file.name) AS Title,
author AS Author,
category AS Category,
file.link AS Note,
choice(read, "🟩", "🟥") AS Read,
AudioBook AS AudioBook,
EBook AS EBook
FROM "Library/Books"
SORT default(title, file.name) ASC
```
The cover column shows covers stored in any of these forms: a link ("[[Covers/Dune.jpg]]", what Library Notes writes), an embed ("![[Covers/Dune.jpg]]"), or a plain path (/Dune.jpg, as written by some other book plugins). If a cover image file is missing, the cell is left empty.
Regenerate library note rebuilds the table from your current folder settings. It always asks first, and only changes the table:
%% library-notes:start %% and %% library-notes:end %% markers.Your properties (such as a banner) and any other text stay as they are. If your library note's name differs from the setting only in capital letters (LIbrary MOC and Library MOC), Library Notes uses your note instead of creating a second one.
| Setting | Default | Description |
|---|---|---|
| Library folder | Library |
Holds the library note and the books and covers folders. Can be inside another folder. |
| Books folder | Books |
Inside the library folder. One note per book. |
| Covers folder | Covers |
Inside the library folder. Cover images are saved here. |
| Template file | (empty) | A note to use as the template. Leave empty to use the built-in template. |
| Create an editable template | Saves the built-in template to Templates/Book note.md and selects it, so you can change it. |
|
| Open note after creating it | On | Opens the new note in the current tab. |
Library note
| Setting | Default | Description |
|---|---|---|
| Library note name | Library MOC |
The overview note in the library folder. |
| Dataview | Shows whether Dataview is installed and enabled. | |
| Regenerate library note | Same as the command. |
Sources
| Setting | Default | Description |
|---|---|---|
| Default source | Open Library | Where searches go first. Google Books appears once its API key is set. |
| Try the next source if the default one fails or finds nothing | On | Uses your other sources, in order. A notice says when another source answered. |
| Preferred language | en |
Two-letter code. Open Library shows editions in this language first; Google Books shows only books in this language. Leave empty for no preference. |
| Open Library → Check | Makes one small request to check that Open Library can be reached. |
Google Books
| Setting | Default | Description |
|---|---|---|
| API key | Your Google Books API key. It's kept in Obsidian's keychain, not in the plugin's settings file. | |
| Check API key | Makes one small request to Google Books with your key. Shown once a key is set. |
Google Books no longer answers requests without a key. A key is free:
Google sets a daily limit on requests for each key; if you reach it, Library Notes says so and you can search Open Library instead.
A template is a normal note containing {{variables}}. When a book note is created, each variable is replaced with information about the book. Variables Library Notes doesn't recognize are left as they are, so syntax from other template plugins keeps working.
When a variable is the whole value of a property, such as author: {{author}}, Library Notes formats it so the properties stay valid: lists become list properties, page counts become numbers, and text is quoted when needed. Don't add your own quotes around these variables.
| Variable | Contents |
|---|---|
{{title}}, {{subtitle}} |
Title and subtitle |
{{author}} |
Authors (a list property; "A, B" in the note body) |
{{category}} |
Genres, up to three, such as Science fiction (a list property) |
{{publisher}} |
Publisher |
{{publishDate}} |
Publication date, as precise as the source knows: 2021-05-04, 2021-05, or 2021 |
{{year}} |
Publication year |
{{pageCount}} |
Number of pages |
{{isbn}} |
ISBN-13, or ISBN-10 if there's no ISBN-13 |
{{isbn10}}, {{isbn13}} |
Each ISBN separately |
{{description}} |
Description |
{{language}} |
Language code, as the source gives it (such as eng or en) |
{{coverUrl}} |
Web address of the cover image |
{{localCover}} |
Link to the saved cover, such as [[Library/Covers/Dune - 9780441013593.jpg]]; empty when there's no cover |
{{localCoverPath}} |
Path of the saved cover, without the link brackets |
{{source}} |
Where the information came from (Open Library or Google Books) |
{{sourceUrl}} |
The book's page on that site |
{{libraryLink}} |
Link to the library note, such as [[Library MOC]] |
{{date}}, {{time}} |
When the note was created (YYYY-MM-DD, HH:mm) |
{{date:FORMAT}}, {{time:FORMAT}} |
Same, in a Moment.js format, such as {{date:YYYY-MM-DD HH:mm:ss}} |
Templates from the Book Search plugin mostly keep working: {{authors}}, {{categories}}, {{totalPage}}, and {{localCoverImage}} are also available.
Not every source provides every field; an unavailable field is left empty.
---
tags:
- 📚Book
title: {{title}}
subtitle: {{subtitle}}
author: {{author}}
category: {{category}}
publisher: {{publisher}}
publishDate: {{publishDate}}
pageCount: {{pageCount}}
isbn: {{isbn}}
description: {{description}}
cover: {{coverUrl}}
localCover: {{localCover}}
read: false
rating: N/A
AudioBook: N/A
EBook: N/A
source: {{source}}
sourceUrl: {{sourceUrl}}
created: {{date:YYYY-MM-DD HH:mm:ss}}
link:
- {{libraryLink}}
---
# Summary:
# Notes:
# Quotes:
localCover is stored as a link, so Obsidian updates it if you rename or move the image. read is the property that Toggle read status changes and the library table shows. link points back to the library note.
Library Notes can work with a library you started with Book Search:
localCover values such as /Book.jpg still show their cover when the image is anywhere in your vault, and notes without a read property show 🟥 until you mark them read.publish or total), copy the built-in template and rename its properties to match.Library Notes needs an internet connection to search for books. It sends only what you type in the search window to the services below, plus your API key to Google Books if you use it. Its requests identify Library Notes with a link to this repository; the cover thumbnails in the results list are loaded by Obsidian like any image.
| Service | Used for | Account needed |
|---|---|---|
Open Library (openlibrary.org), run by the Internet Archive |
Searching (default source) and book details | No |
Open Library Covers (covers.openlibrary.org, which redirects to archive.org) |
Cover thumbnails in the results list, and the cover saved with each note | No |
Google Books (www.googleapis.com, cover images from books.google.com) |
Searching and book details, only if you add an API key | Yes. A Google account and a free API key. Use is subject to the Google APIs Terms of Service. |
Adding a book sends a few requests: one search, then (for Open Library) one each for the book and the edition, and one for the cover. Requests to Open Library are spaced one second apart, as Open Library asks. Open Library searches and details are remembered for 30 minutes (until Obsidian closes), so repeating a search doesn't ask again.
Library Notes has no telemetry or analytics, and it doesn't read or send your notes. Each service may log requests under its own policies.
covers.openlibrary.org rather than from copies.| Message | What to do |
|---|---|
| You appear to be offline | Check your internet connection. Open Library searches from the last 30 minutes still work. |
| No books found | Try fewer words, the author's name, or the ISBN. |
| … has received too many requests | Wait a few minutes, or turn on Try the next source… in the settings. |
| … is having problems / took too long to respond | The service is down or slow. Try again later, or switch source in the search window. |
| … has no cover for "…" | The note was created without a cover; add an image yourself if you like. |
| Google Books rejected the API key | Check the key in Settings → Library Notes → Google Books. |
| The Books API isn't turned on for your key's Google Cloud project | In the Google Cloud console, enable Books API for the project the key belongs to. |
| Your Google Books API key has used up today's quota | Try again tomorrow, or search Open Library. |
| The table in "Library MOC" needs the Dataview plugin | Install Dataview from Community plugins and enable it. |
| Template "…" was not found | The template file was moved or deleted. Choose it again in the settings. |
| "…" is a file, not a folder | A file has the name of one of the library folders. Rename it or choose another folder. |
npm install
npm run dev # rebuild on every change
npm run build # type-check and production build
npm run lint # Obsidian's official ESLint rules
npm test # offline test suite
npm run test:record # make real requests and save new recordings for the tests
If a test-vault/ folder exists in the project, npm run dev copies main.js, manifest.json, and styles.css into test-vault/.obsidian/plugins/library-notes/ after every build. Open test-vault/ as a vault to try changes without touching your real notes; the Hot Reload plugin reloads the plugin automatically. test-vault/ is gitignored. Development builds also have a Run developer checks (dev build only) command, which release builds leave out.
The code is organized by job: src/core/ (network, files, templates, covers), src/sources/ (one module per book source, behind the BookSource interface in src/sources/types.ts), src/books/ (creating a book note), src/library/ (the library note and read status), and src/ui/ (windows). The tests in tests/ run the real code with stand-ins for Obsidian (tests/support/) and recorded answers from Open Library (tests/fixtures/http/).
npm version patch (or minor / major). This updates package.json, manifest.json, and versions.json, commits, and creates a tag such as 1.0.1 (no v prefix).git push --follow-tags.main.js, manifest.json, and styles.css. Review it on GitHub, then publish it.