Description
Imports a Calibre Db into (Sub-) Notebook. Also includes a content plugin supporting attributes (see documentation)
Additional Information
Links: | |
---|---|
Maintainers: | mick2nd |
Version: | 1.1.0 |
Minimum app version: | 2.13 |
Downloads: This version: | 332 |
Last updated: | 2024-01-03T08:38:01Z |
Calibre Import Joplin Plugin
This is a Joplin plugin.
Two Plugins in One Package
There are two plugins in this package.
The first one is the Calibre Import plugin. It is able to import a Calibre Library database into Joplin.
The second one is the Attributes Content plugin. It intercepts the Markdown-it token stream and detects embedded Attribute definitions. Those are used to equip the next HTML element with attributes. This second plugin is used by the first one to implement a Html to Markdown translation.
The Calibre Import
After the installation you can import Calibre Library metadata into Joplin. The imported data include the title, the authors, the cover (if one exists), links to the existent book formats, the comments section and an additional content section (custom field).
The data are imported into the selected Joplin sub folder, taking into account the book genres, a hierarchical arranged custom field.
All working can be controlled by a set of settings in the Calibre Import settings page, the most of which can be used as is for first trials.
The General Processing Order
To import the data of a library, follow these steps:
- Look at the configuration settings and change them if you decide to do so. Overtake these settings to make them active.
- Select the sub folder where to import the Calibre metadata
- Invoke the import command and select a Calibre Library folder, then choose okay
- The processing begins. After a short delay the data should be present and you can examine the results
Possibilities for Configuration
A list of configuration settings follows (incomplete):
- The used genre field
- The used content field (can be left empty)
- A filter for book titles. This can be SQL LIKE expression
- A filter for genres. This again can be SQL LIKE expression
- The cover height, used in a style section
- The Merge Mode controls how conflicts between existing and new content are solved
- The Cleanup Mode controls cleanup behavior after the import is complete. This defaults to deletion of the content not present in the input
Sample Screen Shots of Generated Notes
The images are partly in German.
The following is a generated Genre tree.
It follows a generated Note, one version with Spoilers collapsed, the other version with expanded Spoilers.
Spoilers expanded:
The Embedded Attributes Plug-in
For What it was Meant
Primarily this content plug-in is to be used by the Calibre Import. The import translates Html into MD for consistency reasons. The Html can contain lists with attributes. That's why sometimes attributes are required to give a compatible view.
For What it can be Used
You can equip the following MD constructs with attributes:
-
Lists (level 1 and embedded lists, ordered and unordered and task lists)
-
Paragraphs
-
Block quotes
-
Headings
-
Tables
-
Horizontal Rulers
-
Code Fences. The surrounding
<span>
tag is equipped with attributes. -
Images and Links. The surrounding
<p>
tag (paragraph) is equipped with attributes. To equip a link with styles, you can, for instance, use the following construct:///attributes:id=link [Web](https://google.com) ... #link a { background-color: yellow; }
What can be done:
- Equip the generated Html with class names or ids and use those in style definitions
- Continue ordered lists with the start attribute
- Make the bullets of lists disappear (list-style-type: none)
- Generally all attributes for the Html tag in question are possible, for instance:
- id
- class (classes are added to pre-existing classes)
- style (e.g. inline style)
- other supported attributes
Samples
The following MD suppresses bullets in the succeeding list, then a list with start number 10 follows:
///attributes:style=list-style-type:none
1. Item 1
2. Item 2
///attributes:start=10
1. Item 1
2. Item 2
This gives us the following view:
Release Notes
1.1.0
The scope of the attributes content plug-in was extended by (see above):
- table cells (header and body)
The attributes in a cell must have the following shape:
///attributes:<attributes definitions>::<cell content>
Additionally Calibre custom columns are supported. Up to 10 custom columns can be configured in the Settings. They are taken from an existing Calibre library. Without such an existing Calibre library (to be configured) the extra functionality is not available.
1.0.3
The scope of the attributes content plug-in was extended by (see above):
- headings
- tables
- horizontal rulers
- code fences
- images and links
1.0.2
- Added tags to the imported data
1.0.1
- Error handling was improved
- Documentation was improved
- Added typedoc to the project including class diagrams
- Bug fix: interference with other plug-ins, for instance Code Section
- Bug fix: notes could not be exported to PDF after installing the plug-in
1.0.0
- The first release