Skip to content

Calibre plugin for remove the scraps CSS in HTML comments

License

Notifications You must be signed in to change notification settings

un-pogaz/Comments-Cleaner

Repository files navigation

Comments Cleaner

MobileRead History License calibre Version Status

Comments Cleaner is a small plugin that clean comments from superfluous and unwanted CSS rules (background-color, text color, font-family, among other things), but keeps the basic elements (italic, bold). The plugin will also try to convert plain-text comments.

The plugin has the following options:

  • Keep or remove Hyperlinks
  • Weights management
    • Round the value to the hundred (only below Calibre 6)
    • Round to Bold
  • Remove Strikethrough, Underline and Italic
  • Headings management
    • Converte to a paragraph
    • Converte to a paragraph but keep the bold
  • Text alignment
  • Automatic justification
    • Force justification
    • Remove alignment
  • Specific alignment for lists
  • Keep or Delete the ID and CLASS attributs
  • Remove all formatting (NO MERCY!!)
  • Try a conversion from Mardown format (the key word is TRY)
  • Remove Multiple Line Return
    and create a new paragraph instead
  • Convert 'Line Return' into Paragraph or Space
  • Management of empty paragraphs
  • Removing images
  • Ability to specify others CSS rules to keep in addition to the basic CSS rule
  • Possibility to apply the cleaning to others custom HTML columns
  • Support of Category Notes

Basic CSS rules keep by default:

text-align
font-weight
font-style
text-decoration

Installation

Open Preferences -> Plugins -> Get new plugins and install the "Comments Cleaner" plugin. You may also download the attached zip file and install the plugin manually, then restart calibre as described in the Introduction to plugins thread

The plugin works for Calibre 5 and later.

Page: GitHub | MobileRead

Note for those who wish to provide a translation:
I am French! Although for obvious reasons, the default language of the plugin is English, keep in mind that already a translation.



configuration panel button menu example of cleaned comment selection of notes to clean