Fork FB2 with updates
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fb2maker-0.1.1.tar.gz
(7.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
fb2maker-0.1.1-py3-none-any.whl
(11.7 kB
view details)
File details
Details for the file fb2maker-0.1.1.tar.gz.
File metadata
- Download URL: fb2maker-0.1.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1676b98bb9f70c9f514229c942bf4805b14004989e576283f5f6cafd31985b1e
|
|
| MD5 |
1a5206c0b96fb39706a4d5f62b873662
|
|
| BLAKE2b-256 |
9d07fdac0809fd805d76f69b8417e34b927fc0387406c51765c5ff89f91c5bb1
|
File details
Details for the file fb2maker-0.1.1-py3-none-any.whl.
File metadata
- Download URL: fb2maker-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
042be28e53954355c35a3ed61a2e1140ac98fbfbd81f91fe17c0548e6c57f2c2
|
|
| MD5 |
d4da0c5aabd3ee03008641984d10f900
|
|
| BLAKE2b-256 |
76ab4a004d0ea0ee604b26b435578ca94185c958185bd2dee9e5162ce616d1ec
|