All Projects → aerkalov → Ebooklib

aerkalov / Ebooklib

Licence: agpl-3.0
Python E-book library for handling books in EPUB2/EPUB3 format -

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Ebooklib

Ruby Hacking Guide.github.com
Ruby Hacking Guide Translation
Stars: ✭ 305 (-59.06%)
Mutual labels:  epub
Epub Press Clients
📦 Clients for building books with EpubPress.
Stars: ✭ 370 (-50.34%)
Mutual labels:  epub
Koodo Reader
A modern ebook manager and reader with sync and backup capacities for Windows, macOS, Linux and Web
Stars: ✭ 2,938 (+294.36%)
Mutual labels:  epub
Thorium Reader
A cross platform desktop reading app, based on the Readium Desktop toolkit
Stars: ✭ 319 (-57.18%)
Mutual labels:  epub
Readium Sdk
A C++ ePub renderer SDK
Stars: ✭ 351 (-52.89%)
Mutual labels:  epub
Readium Js Viewer
👁 ReadiumJS viewer: default web app for Readium.js library
Stars: ✭ 438 (-41.21%)
Mutual labels:  epub
Readium Js
EPUB processing engine written in Javascript
Stars: ✭ 287 (-61.48%)
Mutual labels:  epub
Leanify
lightweight lossless file minifier/optimizer
Stars: ✭ 694 (-6.85%)
Mutual labels:  epub
Fanficfare
FanFicFare is a tool for making eBooks from stories on fanfiction and other web sites.
Stars: ✭ 359 (-51.81%)
Mutual labels:  epub
Calibre Web
📚 Web app for browsing, reading and downloading eBooks stored in a Calibre database
Stars: ✭ 5,616 (+653.83%)
Mutual labels:  epub
Percollate
A command-line tool to turn web pages into beautiful, readable PDF, EPUB, or HTML docs.
Stars: ✭ 3,535 (+374.5%)
Mutual labels:  epub
Lightnovel Crawler
Download and generate e-books from online sources.
Stars: ✭ 344 (-53.83%)
Mutual labels:  epub
Epub.js
Enhanced eBooks in the browser.
Stars: ✭ 4,629 (+521.34%)
Mutual labels:  epub
Unix As Ide
The ebook version of Tom Ryder's series on the Unix programming environment
Stars: ✭ 315 (-57.72%)
Mutual labels:  epub
Google Sre Ebook
Google SRE Book Generator (EPUB/MOBI/PDF).
Stars: ✭ 578 (-22.42%)
Mutual labels:  epub
Redux Offline Docs
Redux documentation in PDF, ePub and MOBI formats for offline reading.
Stars: ✭ 292 (-60.81%)
Mutual labels:  epub
Crowbook
Converts books written in Markdown to HTML, LaTeX/PDF and EPUB
Stars: ✭ 399 (-46.44%)
Mutual labels:  epub
Easybook
Book publishing as easy as it should be (built with Symfony components)
Stars: ✭ 744 (-0.13%)
Mutual labels:  epub
Epr
CLI Epub Reader
Stars: ✭ 657 (-11.81%)
Mutual labels:  epub
Plato
Document reader
Stars: ✭ 473 (-36.51%)
Mutual labels:  epub

About EbookLib

EbookLib is a Python library for managing EPUB2/EPUB3 and Kindle files. It's capable of reading and writing EPUB files programmatically (Kindle support is under development).

The API is designed to be as simple as possible, while at the same time making complex things possible too. It has support for covers, table of contents, spine, guide, metadata and etc.

EbookLib is used in Booktype from Sourcefabric, as well as sprits-it!, fanfiction2ebook, viserlalune and Telemeta.

Packages of EbookLib for GNU/Linux are available in Debian and Ubuntu.

Sphinx documentation is generated from the templates in the docs/ directory and made available at http://ebooklib.readthedocs.io

Usage

Reading

::

import ebooklib
from ebooklib import epub

book = epub.read_epub('test.epub')

for image in book.get_items_of_type(ebooklib.ITEM_IMAGE):
    print image

Writing

::

from ebooklib import epub

book = epub.EpubBook()

# set metadata
book.set_identifier('id123456')
book.set_title('Sample book')
book.set_language('en')

book.add_author('Author Authorowski')
book.add_author('Danko Bananko', file_as='Gospodin Danko Bananko', role='ill', uid='coauthor')

# create chapter
c1 = epub.EpubHtml(title='Intro', file_name='chap_01.xhtml', lang='hr')
c1.content=u'<h1>Intro heading</h1><p>Zaba je skocila u baru.</p>'

# add chapter
book.add_item(c1)

# define Table Of Contents
book.toc = (epub.Link('chap_01.xhtml', 'Introduction', 'intro'),
             (epub.Section('Simple book'),
             (c1, ))
            )

# add default NCX and Nav file
book.add_item(epub.EpubNcx())
book.add_item(epub.EpubNav())

# define CSS style
style = 'BODY {color: white;}'
nav_css = epub.EpubItem(uid="style_nav", file_name="style/nav.css", media_type="text/css", content=style)

# add CSS file
book.add_item(nav_css)

# basic spine
book.spine = ['nav', c1]

# write to the file
epub.write_epub('test.epub', book, {})

License

EbookLib is licensed under the AGPL license.

Authors

Full list of authors is in AUTHORS.txt file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].