plugins Package — EbookLib 0.20 documentation

# plugins Package

## `base` Module

class ebooklib.plugins.base.BasePlugin

  Bases: `object`

  after_read(book)

    Processing after save

  after_write(book)

    Processing after save

  before_read(book)

    Processing before save

  before_write(book)

    Processing before save

  html_after_read(book, chapter)

    Processing HTML before read.

  html_before_write(book, chapter)

    Processing HTML before save.

  item_after_read(book, item)

    Process general item after read.

  item_before_write(book, item)

    Process general item before write.

## `booktype` Module

class ebooklib.plugins.booktype.BooktypeFootnotes(booktype_book)

  Bases: `BasePlugin`

  NAME = 'Booktype Footnotes'
  html_before_write(book, chapter)

    Processing HTML before save.

class ebooklib.plugins.booktype.BooktypeLinks(booktype_book)

  Bases: `BasePlugin`

  NAME = 'Booktype Links'
  html_before_write(book, chapter)

    Processing HTML before save.

## `sourcecode` Module

class ebooklib.plugins.sourcecode.SourceHighlighter

  Bases: `BasePlugin`

  html_before_write(book, chapter)

    Processing HTML before save.

## `standard` Module

class ebooklib.plugins.standard.SyntaxPlugin

  Bases: `BasePlugin`

  NAME = 'Check HTML syntax'
  html_before_write(book, chapter)

    Processing HTML before save.

ebooklib.plugins.standard.leave_only(item, tag_list)

## `tidyhtml` Module

class ebooklib.plugins.tidyhtml.TidyPlugin(extra=None)

  Bases: `BasePlugin`

  NAME = 'Tidy HTML'
  OPTIONS = {'char-encoding': 'utf8', 'tidy-mark': 'no'}
  html_after_read(book, chapter)

    Processing HTML before read.

  html_before_write(book, chapter)

    Processing HTML before save.

ebooklib.plugins.tidyhtml.tidy_cleanup(content, **extra)