FB2
Python package for working with FictionBook2
Usage example
from FB2 import FictionBook2, Author
from urllib import request
book = FictionBook2()
book.titleInfo.title = "Example book"
book.titleInfo.annotation = "Small test book. Shows basics of FB2 library"
book.titleInfo.authors = [Author(firstName="Alex",
middleName="Unknown",
nickname="Ae_Mc",
emails=["ae_mc@mail.ru"],
homePages=["ae-mc.ru"])]
book.titleInfo.genres = ["sf", "sf_fantasy", "shortstory"]
book.titleInfo.coverPageImages = [
request.urlopen("https://picsum.photos/1080/1920").read()]
book.titleInfo.sequences = [("Example books", 2)]
book.documentInfo.authors = ["Ae Mc"]
book.documentInfo.version = "1.1"
book.chapters = [
("Introduction", [
"Introduction chapter first paragraph",
"Introduction chapter second paragraph"]),
("1. Chapter one. FB2 format history", [
"Introduction chapter first paragraph",
"Introduction chapter second paragraph"])]
book.chapters.append(("2. Chapter two. Empty", []))
book.write("ExampleBook.fb2")
Requirements
- iso-639 package
Installation
- From pip:
pip install fb2
Metadata
Release files for fb2maker 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fb2maker-0.1.1.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fb2maker-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.2 kB
Release files / fb2maker-0.1.1.tar.gz
| Download URL | fb2maker-0.1.1.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1676b98bb9f70c9f514229c942bf4805b14004989e576283f5f6cafd31985b1e
|
|
BLAKE2b-256 checksum How to use checksums |
9d07fdac0809fd805d76f69b8417e34b927fc0387406c51765c5ff89f91c5bb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.0 Windows/10
|
Release files / fb2maker-0.1.1-py3-none-any.whl
| Download URL | fb2maker-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
042be28e53954355c35a3ed61a2e1140ac98fbfbd81f91fe17c0548e6c57f2c2
|
|
BLAKE2b-256 checksum How to use checksums |
76ab4a004d0ea0ee604b26b435578ca94185c958185bd2dee9e5162ce616d1ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.0 Windows/10
|