Welcome to ebook_homebrew’s documentation!¶
ebook_homebrew is command line interface which change file name to only digit name like 001.jpg and make e-book format files.
Badges:
Installation¶
Warnings¶
Warning
Ebook_homebrew Only compatible Python 3.6 and 3.7 now.
Basic Installation¶
Note
The following instructions will install ebook_homebrew.
Install ebook_homebrew with pip:
$ pip install ebook-homebrew
Windows Installation¶
We provide ebook_homebrew binaries for Windows compiled for the matrix of supported Pythons in both 32 and 64-bit versions in wheel, egg, and executable installers.
> pip install ebook-homebrew
macOS Installation¶
We provide binaries for macOS for each of the supported Python 3.5 and 3.6 in the wheel format.
$ pip install ebook-homebrew
Linux Installation¶
We provide binaries for Linux for each of the supported Python versions in the manylinux wheel format.
$ pip install ebook-homebrew
Building From Source¶
Download and extract the `Github.com`_ .
If you want to compile from source, use python setup.py install
$ python setup.py install
Overview¶
The Ebook HomeBrew provides you functional Command-line interface (CLI) which change file name to only digit name like 001.jpg and make e-book format files. And also you can import this modules and use your python codes.
Changing filename only to digit¶
Change file name contains digit like foo001bar.txt to only digit file name like 001.txt.
Also provides you to duplicate file name change manually and add specify string before or after file name after using above method.
Making PDF by digit image files¶
Make pdf file which you use e-books by take in some image files such as jpeg, png and gif.
Making Zip by digit files¶
Make zip file for files which you choose extension.
Provides Rest API¶
Provides Rest API interfaces.
How to use¶
After installation, you can use command line ebookhomebrew
Show help¶
Command option -h shows helps.
$ ebookhomebrew -h
ebookhomebrew command line interfaces provides subcommand.
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.
Also provides 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.
Also provides Options api.
-h, --help show this help message and exit
-p PORT, --port PORT API Server Port
Auto command¶
Rename image file to only digit and Create PDF file.
$ ebookhomebrew auto -s ./tests -d 3,4 -e jpg -f test.pdf
Rest API Reference¶
API Reference
-
POST
/data/upload
¶ Base64 encoded Images
- Status Codes
200 OK – OK
400 Bad Request – BadRequest
-
POST
/convert/pdf
¶ Upload Id witch get upload images and ContentType
- Status Codes
200 OK – OK
400 Bad Request – BadRequest
404 Not Found – UploadIdNotFound
-
POST
/convert/pdf/download
¶ Upload Id witch get upload images
- Status Codes
200 OK – OK
400 Bad Request – BadRequest
404 Not Found – ResultFileNotFound
Deploy to Heroku¶
Deploy for CLI¶
Note
Before push heroku button, create your Heroku account.
Install Heroku for CLI
$ heroku create <app name>
$ heroku stack:set container
$ git push heroku master
$ heroku open
Deploy Heroku button¶
Or Push a Heroku button below
Release Notes¶
Note
Contributors please include release notes as needed or appropriate with your bug fixes, feature additions and tests.