unicode art tool
Project description
UnicodeArt
本项目是基于asciifier做了些调整和改进:优化了程序结构、优化了一些细节处理、增加了对宽字符的处理(基于特定混合等宽字体)。
主要功能为:根据输入的文本或图片生成相应的字符画。
使用方法
python src/unicodeart/console.py [-h] [-c CONFIG] (-i IMAGE | -t TEXT) [-a CHARS] [-o OUTPUT] [-e HEIGHT] [-w WIDTH] [-f FONT] [-r RATIO] [-v] [-m MATRIX] [-p PRINT]
options:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
配置文件路径
-i IMAGE, --image IMAGE
任何cv2支持的图像文件
-t TEXT, --text TEXT 一些文本字符串
-a CHARS, --chars CHARS
用来构成字符画的基本字符
-o OUTPUT, --output OUTPUT
生成文件的路径
-e HEIGHT, --height HEIGHT
输出高度,即行数,也用作字体大小
-w WIDTH, --width WIDTH
输出宽度,即字符画横向对应的字符数
-f FONT, --font FONT 用于显示的文本字体
-r RATIO, --ratio RATIO
每个字符相对于其宽度的高度倍数
-v, --invert 反转图像
-m MATRIX, --matrix MATRIX
用于采样的矩阵大小
-p PRINT, --print PRINT
执行print(all:全部,为默认值;spec:指定,用于外部调用;no:不执行print输出)
示例
python src/unicodeart/console.py -o output.txt -t "黑白あき123ABab" --font "C:\Windows\Fonts\SimSun.ttc" --height 20
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 unicodeart-0.0.5.tar.gz.
File metadata
- Download URL: unicodeart-0.0.5.tar.gz
- Upload date:
- Size: 141.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bfa0fe68555fa1c2a2aeb6133c40ad50778837fae32d7adc21b4fe6c03ed28b
|
|
| MD5 |
237ade1d5b095d0e474fa4f0a1b284e4
|
|
| BLAKE2b-256 |
73046d1b122c0a6e01a01ebd22cc66cb0f9d1ebe648d44d7851a3c2a419e8637
|
File details
Details for the file unicodeart-0.0.5-py3-none-any.whl.
File metadata
- Download URL: unicodeart-0.0.5-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2aeafa6b2cc4999b897c7e920206c5bdbb0cc7a0878f7f4a8490707b0eb16116
|
|
| MD5 |
ecf991f4fe55bbf776b4cb62fb96d9a4
|
|
| BLAKE2b-256 |
95af8f4b68b2ee6ea00707436d436459560a9350c185200760be33b1b10ca402
|