Rename image file to only digit name and convert ebook files.
Project description

# ebook_homebrew
[](LICENSE)
[](http://makeapullrequest.com)
[](https://travis-ci.org/tubone24/ebook_homebrew)
[](https://ebook-homebrew.readthedocs.io/en/latest/?badge=latest)
[](https://codecov.io/gh/tubone24/ebook_homebrew)
[](https://codeclimate.com/github/tubone24/ebook_homebrew/maintainability)



[](https://pypi.org/project/ebook-homebrew/)

Change file name to only digit name like `001.jpg` and make e-book format files.
## Getting Started
Ebook_homebrew is a python package, so that you can use `setup.py` or `pip` installer.
### Using setup.py
```bash
$ python setup.py install
```
### Or using pip installer
```bash
$ pip install ebook-homebrew
```
## Usage
You can use global command "ebookhomebrew".
Show help.
```bash
$ ebookhomebrew -h
```
Ex) Rename image file to only digit and Create PDF file.
```bash
$ ebookhomebrew auto -s ./tests -d 3,4 -e jpg -f test.pdf
```
### ebookhomebrew command line interface
#### Subcommands
```bash
Choose subcommands. Usually choose "auto"
{auto}
auto Make only digit file name, convert e-book file such as PDF
```
#### Options
```bash
-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.
```
## Testing
### Unit Test
Using pytest, if you want to test.
```bash
pytest
```
If you get coverage report, run coverage and report.
```bash
$ coverage run --source=ebook_homebrew -m pytest
$ coverage report -m
```
Or pytest-cov param for pytest
```bash
$ pytest --cov=ebook_homebrew --cov-report html --cov-report xml
```
### Integration Test
Using pytest, if you want to test with mark "--it"
```bash
pytest --it
```
### With tox
With tox, you can test multiple python version.(only python3.5, 3.6)
```bash
tox
```
### Travis-CI
This repository uses [Travis-CI](https://travis-ci.org/) and be building jobs by push or PR branches.
## Licence
This software is released under the MIT License, see LICENSE.
## API Document
See `Read the Docs`
[document](https://ebook-homebrew.readthedocs.io/en/latest/)
# Changelog
## [v1.0.0](https://github.com/tubone24/ebook_homebrew/releases/tag/v1.0.0) (2019-1-14)
First release.
"ebook_homebrew_icon")
# ebook_homebrew
[](LICENSE)
[](http://makeapullrequest.com)
[](https://travis-ci.org/tubone24/ebook_homebrew)
[](https://ebook-homebrew.readthedocs.io/en/latest/?badge=latest)
[](https://codecov.io/gh/tubone24/ebook_homebrew)
[](https://codeclimate.com/github/tubone24/ebook_homebrew/maintainability)



[](https://pypi.org/project/ebook-homebrew/)

Change file name to only digit name like `001.jpg` and make e-book format files.
## Getting Started
Ebook_homebrew is a python package, so that you can use `setup.py` or `pip` installer.
### Using setup.py
```bash
$ python setup.py install
```
### Or using pip installer
```bash
$ pip install ebook-homebrew
```
## Usage
You can use global command "ebookhomebrew".
Show help.
```bash
$ ebookhomebrew -h
```
Ex) Rename image file to only digit and Create PDF file.
```bash
$ ebookhomebrew auto -s ./tests -d 3,4 -e jpg -f test.pdf
```
### ebookhomebrew command line interface
#### Subcommands
```bash
Choose subcommands. Usually choose "auto"
{auto}
auto Make only digit file name, convert e-book file such as PDF
```
#### Options
```bash
-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.
```
## Testing
### Unit Test
Using pytest, if you want to test.
```bash
pytest
```
If you get coverage report, run coverage and report.
```bash
$ coverage run --source=ebook_homebrew -m pytest
$ coverage report -m
```
Or pytest-cov param for pytest
```bash
$ pytest --cov=ebook_homebrew --cov-report html --cov-report xml
```
### Integration Test
Using pytest, if you want to test with mark "--it"
```bash
pytest --it
```
### With tox
With tox, you can test multiple python version.(only python3.5, 3.6)
```bash
tox
```
### Travis-CI
This repository uses [Travis-CI](https://travis-ci.org/) and be building jobs by push or PR branches.
## Licence
This software is released under the MIT License, see LICENSE.
## API Document
See `Read the Docs`
[document](https://ebook-homebrew.readthedocs.io/en/latest/)
# Changelog
## [v1.0.0](https://github.com/tubone24/ebook_homebrew/releases/tag/v1.0.0) (2019-1-14)
First release.
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
ebook_homebrew-1.0.1.tar.gz
(11.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ebook_homebrew-1.0.1.tar.gz.
File metadata
- Download URL: ebook_homebrew-1.0.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a155aaa5450fb99920d75fa21523b3d92c2878f84b9b02c98fa56b733fb58e6
|
|
| MD5 |
5762677eb80d7a8377017426b66c8880
|
|
| BLAKE2b-256 |
215596e3a60e39ed424fffd6f8760e86fb35d2f511c78ef7d0dfad2015c08e4a
|
File details
Details for the file ebook_homebrew-1.0.1-py2.py3-none-any.whl.
File metadata
- Download URL: ebook_homebrew-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7aaf95c49644b25e7ad83e0810f469498101b6eb69581355c815d2c4b5a9c7c
|
|
| MD5 |
40470b163062ac9bec1e64d862638431
|
|
| BLAKE2b-256 |
1a0b827543bf6ca4161ca1749b2087cebac9848a3b6bd671d96a363b51abbe4e
|