- Open Logseq.
- Enter the ISBN of the book you want to fetch data for.
- Use the slash command
/Book Fetch
in the editor.
The plugin will fetch the book data and insert it into the current block.
(Go Top)
- Fetch book data based on an ISBN using the Google Books API.
- Insert fetched book data into the current block in Logseq.
- Provide a slash command
/Book Fetch
for easy access to the plugin. - Configure which data to insert into the current block.
Data | Description |
---|---|
Title | The title of the book. |
Author | The author(s) of the book. |
Publisher | The publisher of the book. |
Publication | The publication date of the book. |
Description | A brief description of the book. |
Categories | The categories or genres of the book. |
Page Count | The total number of pages in the book. |
Language | The language in which the book is written. |
Image | The cover image of the book. |
ISBN | The ISBN of the book. |
Maturity Rating | The Maturity Rating of the book. |
The template is used to format the fetched book data that is inserted into the current block in Logseq. You can customize the template to fit your needs.
The template is a string that contains various keys enclosed in double curly braces ({{key}}
). Each key is replaced by the corresponding value from the book data. The available keys are:
thumbnail
: The URL of the book's thumbnail image.title
: The title of the book.isbn
: The ISBN of the book.authors
: The authors of the book, separated by commas.publishedAt
: The publication date of the book.categories
: The categories or genres of the book, separated by commas.pages
: The total number of pages in the book.language
: The language in which the book is written.publisher
: The publisher of the book.maturityRating
: The maturity rating of the book.description
: A brief description of the book.
You can use \n
to insert a line break in the template. For example, the following template:
Note: If you edit the content directly in the
settings.json
file of the Logseq plugin configurations, you should use\\n
for line breaks. However, if you edit it through the Logseq app, you only need to use\n
.
Here are some examples of how you can use the template configuration:
{{title}} by {{authors}}
- Title: {{title}}\n- Authors: {{authors}}\n- ISBN: {{isbn}}\n- Published At: {{publishedAt}}\n- Categories: {{categories}}\n- Pages: {{pages}}\n- Language: {{language}}\n- Publisher: {{publisher}}\n- Maturity Rating: {{maturityRating}}\n- Description: {{description}}
Note: If you edit the content directly in the
settings.json
file of the Logseq plugin configurations, you should use\\n
for line breaks. However, if you edit it through the Logseq app, you only need to use\n
.
| ![Book Cover]({{thumbnail}}) | {{title}} | {{isbn}} | {{authors}} | {{publishedAt}} | {{categories}} | {{pages}} |
(Go Top)
To build the project, run
pnpm run build
To start the development, run
pnpm run dev
(Go Top)
@logseq/libs
axios
LuloDev
(Go Top)