FB2 libraries for Python
- PyMuPDF opens FB2 files as paged documents: extract text, read metadata and the table of contents, render pages, convert to PDF. AGPL-3.0 or commercial.
- FB2 (
pip install fb2) creates FB2 files from Python objects: title info, authors, genres, cover, chapters with subchapters, images. MIT. Write only.
To read FB2 metadata or text without rendering, the standard library is enough: parse the file with xml.etree.ElementTree (or lxml) using the namespace http://www.gribuser.ru/xml/fictionbook/2.0.
- FB2 The FB2 Python package creates FB2 (FictionBook 2) e-books: title info, authors, genres, cover, chapters with subchapters and images. Installation.
- PyMuPDF PyMuPDF opens FB2 (FictionBook) e-books in Python: extract text, read title, author and table of contents, render pages and convert FB2 to PDF. Installation.