Rename image file to only digit name and convert ebook files.
Project description
Ebook_homebrew
The Ebook_homebrew is changing file name to only digit name like 001.jpg and make e-book format files.
ebook_homebrew is command line interface which change file name to only digit name like 001.jpg and make e-book format files.
Getting Started
The Ebook_homebrew is a python package, so that you can use setup.py or pip installer.
Using setup.py
$ python setup.py install
Or using pip installer
$ pip install ebook-homebrew
Usage
You can use global command ebookhomebrew .
Show help.
$ ebookhomebrew -h
Ex1) Rename image file to only digit and Create PDF file.
$ ebookhomebrew auto -s ./tests -d 3,4 -e jpg -f test.pdf
Ex2) Run Rest API Server for converting pdf from images.
$ ebookhomebrew api -p 8080
ebookhomebrew command line interface
You can use ebookhomebrew command line interface.
Subcommands
Choose subcommands. Usually choose "auto"
{auto,api,makezip}
auto Make only digit file name, convert e-book file such as PDF
api Provides Rest API interfaces
makezip Make zip file for adding specify extension files.
Options auto
-h, --help show this help message and exit
-s SRC_DIR, --src_dir SRC_DIR
Source directory which put original image files.
--dst_dir DST_DIR Destination directory which put e-book file.
-d N,N, --digit N,N Serial number digits you remain file name
-e EXT, --extension EXT
Destination directory which put e-book file.
-f FILENAME, --filename FILENAME
Destination directory which put e-book file.
-m, --manual Duplicate file name, solving manually.
-r, --remove Remove original image file.
-y, --assume_yes no verify users.
Options api
optional arguments:
-h, --help show this help message and exit
-p PORT, --port PORT API Server Port
Testing
Unit Test
Using pytest, if you want to test.
$ pytest
If you get coverage report, run coverage and report.
$ coverage run --source=ebook_homebrew -m pytest
$ coverage report -m
Or pytest-cov param for pytest
$ pytest --cov=ebook_homebrew --cov-report html --cov-report xml
Integration Test
Using pytest, if you want to test with mark “–it”
$ pytest --it
With tox
With tox, you can test multiple python version.(only python3.5, 3.6)
$ tox
Travis-CI
This repository uses Travis-CI and be building jobs by push or PR branches.
Examples
Stand Alone Web GUI
Stand alone Web GUI. Such as Create PDF from your images by using Flask.
Command Line Tools with using Rest API
Command Line Tools which client app for REST API.
Vue.js Frontend App
Using Vue.js, Call REST API.
Deploy API to Heroku
Deploy Ebook-homebrew to Heroku app.
Push a button below.
DEMOS
REST API
The ebook-homebrew REST API DEMO is deploy to Heroku.
With Vue.js Front
Using Vue.js, Call REST API DEMO App, deploy to Heroku.
Licence
This software is released under the MIT License, see LICENSE.
API Document
The Document write by Sphinx.
Changelog
v1.0.0 (2019-1-14)
First release.
v1.1.0 (2019-02-05)
Rename to digit filename a little bit speedy for using asyncio
More Testcase(Windows)
v2.0.0 (2019-04-20)
Rest API Interface.
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
Built Distributions
Hashes for ebook_homebrew-2.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9032ebf27d08f61ac122b46dfe639b14e4a6319a4c8c6b1a27cbdb334abfbd6 |
|
MD5 | 920dcf29ca0418ee353ae1b4d9f1429c |
|
BLAKE2b-256 | 73724b3dbb72750a5f131a5ba17c098d8cd3b9e96e41bba6b13c4ca4371bb610 |