This commit is contained in:
hyugogirubato
2023-02-06 10:42:08 +01:00
parent 1629a79694
commit b0a8cde0f0
25 changed files with 786 additions and 186 deletions
+34 -21
View File
@@ -1,25 +1,38 @@
# CBZ-Helper
In order to be able to save digital books from images while saving metadata, this library will allow you to do it simply in python without having to go through a graphical client or external commands.
# pydvdfab
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
Python library to create a cbz file with metadata.
# Usage
### Basic Usage
## Use
```python
import cbzhelper
if __name__ == '__main__':
pages = [{'page_number': 0, 'content': b'', 'double_page': False}]
helper = cbzhelper.Helper('eBook', 'Volume 1', replace=True)
for page in pages:
helper.addPage(page['page_number'], page['content'], double_page=page['double_page'])
helper.addMetadata({
'Title': 'Volume 1',
'Series': 'Exemples',
'Number': '1',
'Volume': 1
})
helper.saveCBZ()
>>> import os
>>> from pycbzhelper import Helper
>>> metadata = {
>>> "Title": "T1 - Arrête de me chauffer, Nagatoro",
>>> "Series": "Arrête de me chauffer, Nagatoro",
>>> "Number": "1",
>>> "Count": 8,
>>> "Volume": 1
>>> ...
>>> }
>>> ...
>>> helper = Helper(metadata)
>>> helper.save_cbz(
... path=os.path.join("eBooks", "Arrête de me chauffer, Nagatoro"),
... file="T1 - Arrête de me chauffer, Nagatoro",
... clear=False,
... replace=True
... )
```
---
*This scripts are created by __hyugogirubato__.
Find us on [discord](https://discord.com/invite/g6JzYbh) for more information on projects in development.*
# Installation
To install, you can either clone the repository and run `python setup.py install`
## About
- Graphical metadata editing software [here](https://github.com/comictagger/comictagger)
- Standard ComicInfo file structure information [here](https://github.com/Kussie/ComicInfoStandard)
- New version of ComicInfo file structure [here](https://github.com/anansi-project/comicinfo)