file-hash-1.0.1
توضیحات
Simple hashing script for files.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | file-hash-1.0.1 |
| نام | file-hash |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Joshua Avalon |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://git.joshuaavalon.io/joshuaavalon/file_hash |
| آدرس اینترنتی | https://pypi.org/project/file-hash/ |
| مجوز | - |

# file-hash
file-hash is a simple command line hashing utility written in Python.
## Requirements
* Python 3.7+
* Jinja2 2.10+
You should able to use this with Python < 3.7 if you have [dataclass back port](https://github.com/ericvsmith/dataclasses).
## Usage
### Create a hash
```bash
file_hash hash file.txt
```
### Validate a hash
```bash
file_hash validate file.txt
```
## Options
```bash
usage: file_hash [-h] [-a <algorithm>] [-d] [-r] [-s] [-p <path>]
[-P [<prefix> [<prefix> ...]]] [-S [<suffix> [<suffix> ...]]]
[-R <regex>] [-K <size>] [-J <size>]
<command> <path>
Simple hashing script for files.
positional arguments:
<command> hash or validate
<path> Starting path
optional arguments:
-h, --help show this help message and exit
-a <algorithm>, --algorithm <algorithm>
Algorithm to calculate hash. (Default: md5)
-d, --dry-run Enable dry run to check what file will be generated.
-r, --recursive Go through directories recursively. Use carefully with -s
-s, --symlink Follow symlink. Use carefully with -r
-p <path>, --report <path>
Generate a HTML report.
-P [<prefix> [<prefix> ...]], --ignore-prefix [<prefix> [<prefix> ...]]
Ignore files and directories that start with those prefix. (Default: ["."])
-S [<suffix> [<suffix> ...]], --ignore-suffix [<suffix> [<suffix> ...]]
Ignore files and directories that end with those suffix. (Default: all hashing algorithm)
-R <regex>, --regex <regex>
Only hash the files that match the regular expression. (Default: None)
-K <size>, --min-size <size>
Minimum file size to be hashed. Default unit is Byte.
Support KB, GB, TB, PB. e.g. 1KB (Default: None)
-J <size>, --max-size <size>
Maximum file size to be hashed. Default unit is Byte.
Support KB, GB, TB, PB. e.g. 1KB (Default: None)
```
Note than `algorithm` and `dry-run` does not work on `validate`.
نیازمندی
| مقدار | نام |
|---|---|
| ==2.10 | Jinja2 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl file-hash-1.0.1:
pip install file-hash-1.0.1.whl
نصب پکیج tar.gz file-hash-1.0.1:
pip install file-hash-1.0.1.tar.gz