epub2pdf


Nameepub2pdf JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/mashu3/epub2pdf
SummaryConvert fixed-layout manga/comic files(epub, azw3, mobi) to PDF file.
upload_time2023-09-11 06:32:13
maintainer
docs_urlNone
authormashu3
requires_python
licenseGPLv3
keywords epub mobi azw3 pdf converter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # epub2pdf
## Overview
This is a Python script for converting fixed-layout EPUB/MOBI files such as comics and manga to PDF file, which can be executed from the command line with some arguments.
This Python script only supports DRM-free EPUB/MOBI files of a specific format.

## Requirement
The script uses the Python libraries **[img2pdf](https://pypi.org/project/img2pdf/)** and **[pikepdf](https://pypi.org/project/pikepdf/)** to do the conversion.
Moreover, it uses **[lxml](https://pypi.org/project/lxml/)** to read the EPUB files and  **[mobi](https://pypi.org/project/mobi/)** to handle both MOBI and AZW files.

It requires the installation of these packages in order to work properly.

## Usage
The program can be executed from the command line with the following options:
- The `input_path` argument is the path to the input file. To execute the Python script correctly, specify the `input_path` argument as the path to the input file containing manga or comic images in one of the supported formats, such as `epub`, `mobi`, or  `azw`.
- The `output_path` argument is the path to the output PDF file. To use the script, simply run the Python script with the path to the input EPUB file as the argument. If the `--output` option is not specified, the output file name will be generated from the input EPUB file name.
- The `pagelayout` argument is the page layout of the PDF file. The `pagelayout` parameter can take in the following values:
    - `SinglePage` -> Single page display
    - `OneColumn` -> Enable scrolling
    - `TwoPageLeft` -> Spread view
    - `TwoColumnLeft` -> Spread view with scrolling
    - (default) `TwoPageRight` -> Separate Cover, Spread View
    - `TwoColumnRight` -> Separate Cover, Scrolling Spread View
- The `direction` argument is the reading direction of the PDF file. The `direction` parameter can take in the following values:
    - `L2R` -> Left Binding
    - (default) `R2L` -> Right Binding

By default, the page layout is set to `TwoPageRight` and the reading direction to `R2L`, which are suitable for Japanese manga.

There is a possibility that the script will not run correctly if an unexpected EPUB format is encountered, as the script may not be able to handle it correctly.

### Installing directly from the Git repository
To install the package directly from the Git repository, run the following command:
```
$ pip install git+https://github.com/mashu3/epub2pdf.git
```
### Installing by cloning the Git repository
To install the package by cloning the Git repository, follow these steps:
```
$ git clone https://github.com/mashu3/epub2pdf.git
$ cd epub2pdf/
$ pip install .
```

## Examples
- To convert `my_manga.epub` to `my_manga.pdf` using the default settings:

    `$ python epub2pdf.py my_manga.epub`

- To convert `my_manga.epub` to `my_manga_spread.pdf` with a spread view and right binding:

    `$ python epub2pdf.py my_manga.epub -o my_manga_spread.pdf`

- To convert `my_comic.epub` to `my_comic.pdf` with a TwoPage view and left binding:

    `$ python epub2pdf.py my_comic.epub -o my_comic.pdf -p TwoPageLeft -d L2R`

Once the arguments are given, the program will convert the EPUB file to PDF.

## Credits
[KindleUnpack](https://github.com/kevinhendricks/KindleUnpack)

## Author
[mashu3](https://github.com/mashu3)

[![Authors](https://contrib.rocks/image?repo=mashu3/epub2pdf)](https://github.com/mashu3/epub2pdf/graphs/contributors)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mashu3/epub2pdf",
    "name": "epub2pdf",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "epub mobi azw3 pdf converter",
    "author": "mashu3",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/bd/9b/3ed4117e3bcc0f48d8bf38e466608e405ba36d16e4b53d2488bdd0a7563b/epub2pdf-0.1.0.tar.gz",
    "platform": null,
    "description": "# epub2pdf\n## Overview\nThis is a Python script for converting fixed-layout EPUB/MOBI files such as comics and manga to PDF file, which can be executed from the command line with some arguments.\nThis Python script only supports DRM-free EPUB/MOBI files of a specific format.\n\n## Requirement\nThe script uses the Python libraries **[img2pdf](https://pypi.org/project/img2pdf/)** and **[pikepdf](https://pypi.org/project/pikepdf/)** to do the conversion.\nMoreover, it uses **[lxml](https://pypi.org/project/lxml/)** to read the EPUB files and  **[mobi](https://pypi.org/project/mobi/)** to handle both MOBI and AZW files.\n\nIt requires the installation of these packages in order to work properly.\n\n## Usage\nThe program can be executed from the command line with the following options:\n- The `input_path` argument is the path to the input file. To execute the Python script correctly, specify the `input_path` argument as the path to the input file containing manga or comic images in one of the supported formats, such as `epub`, `mobi`, or  `azw`.\n- The `output_path` argument is the path to the output PDF file. To use the script, simply run the Python script with the path to the input EPUB file as the argument. If the `--output` option is not specified, the output file name will be generated from the input EPUB file name.\n- The `pagelayout` argument is the page layout of the PDF file. The `pagelayout` parameter can take in the following values:\n    - `SinglePage` -> Single page display\n    - `OneColumn` -> Enable scrolling\n    - `TwoPageLeft` -> Spread view\n    - `TwoColumnLeft` -> Spread view with scrolling\n    - (default) `TwoPageRight` -> Separate Cover, Spread View\n    - `TwoColumnRight` -> Separate Cover, Scrolling Spread View\n- The `direction` argument is the reading direction of the PDF file. The `direction` parameter can take in the following values:\n    - `L2R` -> Left Binding\n    - (default) `R2L` -> Right Binding\n\nBy default, the page layout is set to `TwoPageRight` and the reading direction to `R2L`, which are suitable for Japanese manga.\n\nThere is a possibility that the script will not run correctly if an unexpected EPUB format is encountered, as the script may not be able to handle it correctly.\n\n### Installing directly from the Git repository\nTo install the package directly from the Git repository, run the following command:\n```\n$ pip install git+https://github.com/mashu3/epub2pdf.git\n```\n### Installing by cloning the Git repository\nTo install the package by cloning the Git repository, follow these steps:\n```\n$ git clone https://github.com/mashu3/epub2pdf.git\n$ cd epub2pdf/\n$ pip install .\n```\n\n## Examples\n- To convert `my_manga.epub` to `my_manga.pdf` using the default settings:\n\n    `$ python epub2pdf.py my_manga.epub`\n\n- To convert `my_manga.epub` to `my_manga_spread.pdf` with a spread view and right binding:\n\n    `$ python epub2pdf.py my_manga.epub -o my_manga_spread.pdf`\n\n- To convert `my_comic.epub` to `my_comic.pdf` with a TwoPage view and left binding:\n\n    `$ python epub2pdf.py my_comic.epub -o my_comic.pdf -p TwoPageLeft -d L2R`\n\nOnce the arguments are given, the program will convert the EPUB file to PDF.\n\n## Credits\n[KindleUnpack](https://github.com/kevinhendricks/KindleUnpack)\n\n## Author\n[mashu3](https://github.com/mashu3)\n\n[![Authors](https://contrib.rocks/image?repo=mashu3/epub2pdf)](https://github.com/mashu3/epub2pdf/graphs/contributors)\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Convert fixed-layout manga/comic files(epub, azw3, mobi) to PDF file.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/mashu3/epub2pdf"
    },
    "split_keywords": [
        "epub",
        "mobi",
        "azw3",
        "pdf",
        "converter"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f6ef91ee9993c25a9edcdb86cf240a70b9b533c362f8d983f421183743c5eefa",
                "md5": "dea3411a81436ef4db40b15707b9845d",
                "sha256": "363d82750a803d7a1c700d8f21cc832f4810f1e0b0111318c947ff47bbb4c1f6"
            },
            "downloads": -1,
            "filename": "epub2pdf-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dea3411a81436ef4db40b15707b9845d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6062,
            "upload_time": "2023-09-11T06:32:11",
            "upload_time_iso_8601": "2023-09-11T06:32:11.547718Z",
            "url": "https://files.pythonhosted.org/packages/f6/ef/91ee9993c25a9edcdb86cf240a70b9b533c362f8d983f421183743c5eefa/epub2pdf-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd9b3ed4117e3bcc0f48d8bf38e466608e405ba36d16e4b53d2488bdd0a7563b",
                "md5": "a90774b1ffb37c7c293f88f0e0b40097",
                "sha256": "fc6565fd1fea8d70594cdbea78ed1bd5312f02fb8878e21b0a937f3ca6ea65cd"
            },
            "downloads": -1,
            "filename": "epub2pdf-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a90774b1ffb37c7c293f88f0e0b40097",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5923,
            "upload_time": "2023-09-11T06:32:13",
            "upload_time_iso_8601": "2023-09-11T06:32:13.295370Z",
            "url": "https://files.pythonhosted.org/packages/bd/9b/3ed4117e3bcc0f48d8bf38e466608e405ba36d16e4b53d2488bdd0a7563b/epub2pdf-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-11 06:32:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mashu3",
    "github_project": "epub2pdf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "epub2pdf"
}
        
Elapsed time: 0.11774s