Skip to content

A simple python script for creating epub files from chapters composed by images.

License

Notifications You must be signed in to change notification settings

matteopiffari/PyImg2Epub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PyImg2epub

Status

This is a simple python script for creating epub files from chapters composed by images.


πŸ“ Table of Contents

🏁 Getting Started

To download the source code you just need to type this in a bash:

matteopiffari@main:~$ git clone https://github.com/matteopiffari/PyImg2Epub

Install EbookLib:

matteopiffari@main:~$ pip install EbookLib

Setup the input directory (/chapters in the default config)

To make the script work the directory must be structured in this way:

chapters
β”œβ”€β”€β”€ 001
β”‚    β”œβ”€β”€β”€ 001.jpg
β”‚    β”œβ”€β”€β”€ ...
β”‚    └─── n.jpg
β”œβ”€β”€β”€ 002
β”‚    β”œβ”€β”€β”€ 001.jpg
β”‚    β”œβ”€β”€β”€ ...
β”‚    └─── n.jpg
β”œβ”€β”€β”€ ...
└─── n
     β”œβ”€β”€β”€ 001.jpg
     β”œβ”€β”€β”€ ...
     └─── n.jpg

You can also find this structure inside the file /chapters/STRUCT.md

🎈 Usage

Before start you need to change some variables in the code:

  • TITLE: the title of the book
  • AUTHOR: the author of the book
  • DESCRIPTION: the description or trama of the book
  • OUTPUT_DIR (optional): the output directory where epub files will saved

After that you can run the script in this way:

matteopiffari@main:~$ cd PyImg2Epub
matteopiffari@main:~/PyImg2Epub$ python main.py

You will find the .epub files in the folder named output (or the one specified in the OUTPUT_DIR variable in the code)

✍️ Authors

About

A simple python script for creating epub files from chapters composed by images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages