npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

joplin-plugin-calibre-import

v1.1.0

Published

This is a Joplin plugin.

Downloads

9

Readme

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:

  1. Look at the configuration settings and change them if you decide to do so. Overtake these settings to make them active.
  2. Select the sub folder where to import the Calibre metadata
  3. Invoke the import command and select a Calibre Library folder, then choose okay
  4. 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):

  1. The used genre field
  2. The used content field (can be left empty)
  3. A filter for book titles. This can be SQL LIKE expression
  4. A filter for genres. This again can be SQL LIKE expression
  5. The cover height, used in a style section
  6. The Merge Mode controls how conflicts between existing and new content are solved
  7. 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.

A generated genre tree

It follows a generated Note, one version with Spoilers collapsed, the other version with expanded Spoilers.

A generated note, spoilers expanded

Spoilers expanded:

A generated note

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:

  1. Lists (level 1 and embedded lists, ordered and unordered and task lists)

  2. Paragraphs

  3. Block quotes

  4. Headings

  5. Tables

  6. Horizontal Rulers

  7. Code Fences. The surrounding <span> tag is equipped with attributes.

  8. 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:

  1. Equip the generated Html with class names or ids and use those in style definitions
  2. Continue ordered lists with the start attribute
  3. Make the bullets of lists disappear (list-style-type: none)
  4. 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:

Generated view of lists

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