Name | pic2asc JSON |
Version |
0.0.2
JSON |
| download |
home_page | None |
Summary | turn pic to ascii with color |
upload_time | 2024-10-03 16:12:00 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | MIT License Copyright (c) 2024 Boooooom030 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
ascii art
picture
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pic2asc
A tool to print picture on your terminal or into file
## install
```
pip install pic2asc
```
require python 3.12+, beacuse I use `type`
## Usage
### use in cmd
```
usage: pic2asc [-h] [--size WIDTH HEIGHT] [--no-color] [--mode {3bit,4bit,256bit}] [--file FILE] [--replace-str REPLACE_STR] path
positional arguments:
path pictrue path
options:
-h, --help show this help message and exit
--size WIDTH HEIGHT size of asciipic. like --size 50 50. defalut is your terminal witdh/2, it is because two char with eque one char height
--no-color print no color ascii picture
--mod {3bit,4bit,256bit}
3bit 4bit or regular RGB mod
--file FILE print ascii into file
--replace-str REPLACE_STR
the chr you wang to show on the ascii pic, the string will be mapped to 0-255 in order
```
### use as module
```python
from pic2asc import pic2asc, color_type
p = pic2asc("path",show_color=False,mod = color_type.bit4)
p.pic2ascii(size=(50,50))
```
## Example
picture:
![karby](karby.jfif)
1. `color_type.bit3`
![Karby-3bit](./karby-3bit.png)
2. `color_type.bit4`
![Karby-3bit](./karby-4bit.png)
3. `color_type.bit256(default)`
![Karby-3bit](./karby-256bit.png)
Raw data
{
"_id": null,
"home_page": null,
"name": "pic2asc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "ascii art, picture",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/25/69/5dabb75670f314cb71f40329e6a7dfd6bc80c3687ec3b7e7b55e9c8b0117/pic2asc-0.0.2.tar.gz",
"platform": null,
"description": "# pic2asc\r\n\r\nA tool to print picture on your terminal or into file\r\n\r\n\r\n## install\r\n```\r\npip install pic2asc\r\n```\r\nrequire python 3.12+, beacuse I use `type`\r\n## Usage\r\n\r\n### use in cmd\r\n```\r\nusage: pic2asc [-h] [--size WIDTH HEIGHT] [--no-color] [--mode {3bit,4bit,256bit}] [--file FILE] [--replace-str REPLACE_STR] path\r\n\r\npositional arguments:\r\n path pictrue path\r\n\r\noptions:\r\n -h, --help show this help message and exit\r\n --size WIDTH HEIGHT size of asciipic. like --size 50 50. defalut is your terminal witdh/2, it is because two char with eque one char height\r\n --no-color print no color ascii picture\r\n --mod {3bit,4bit,256bit}\r\n 3bit 4bit or regular RGB mod\r\n --file FILE print ascii into file\r\n --replace-str REPLACE_STR\r\n the chr you wang to show on the ascii pic, the string will be mapped to 0-255 in order\r\n```\r\n### use as module\r\n```python\r\nfrom pic2asc import pic2asc, color_type\r\n\r\np = pic2asc(\"path\",show_color=False,mod = color_type.bit4)\r\n\r\np.pic2ascii(size=(50,50))\r\n```\r\n## Example\r\n\r\npicture:\r\n\r\n![karby](karby.jfif)\r\n\r\n1. `color_type.bit3`\r\n \r\n ![Karby-3bit](./karby-3bit.png)\r\n2. `color_type.bit4`\r\n \r\n ![Karby-3bit](./karby-4bit.png)\r\n3. `color_type.bit256(default)`\r\n \r\n ![Karby-3bit](./karby-256bit.png)\r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Boooooom030 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "turn pic to ascii with color",
"version": "0.0.2",
"project_urls": {
"Source": "https://github.com/Boooooom030/pic2asc"
},
"split_keywords": [
"ascii art",
" picture"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "db86c1443d4652f9373698889d79fb014b62185cc7b3b5ee3692a59717d8e4aa",
"md5": "33587853e4a24761156a9065a6a9f0d3",
"sha256": "62c297a42f1ac03a8f020372bcec7071ab2db8dbc328b1aae3da2b5fbb0f26a5"
},
"downloads": -1,
"filename": "pic2asc-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "33587853e4a24761156a9065a6a9f0d3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 6851,
"upload_time": "2024-10-03T16:11:57",
"upload_time_iso_8601": "2024-10-03T16:11:57.754924Z",
"url": "https://files.pythonhosted.org/packages/db/86/c1443d4652f9373698889d79fb014b62185cc7b3b5ee3692a59717d8e4aa/pic2asc-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "25695dabb75670f314cb71f40329e6a7dfd6bc80c3687ec3b7e7b55e9c8b0117",
"md5": "94fbf44a9e22c6c0f8507399097d6e16",
"sha256": "58afa0be226486d4422d5a27ea4d6d55a114d60b95794aaaf5ee54fbfd65dac6"
},
"downloads": -1,
"filename": "pic2asc-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "94fbf44a9e22c6c0f8507399097d6e16",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 249826,
"upload_time": "2024-10-03T16:12:00",
"upload_time_iso_8601": "2024-10-03T16:12:00.258205Z",
"url": "https://files.pythonhosted.org/packages/25/69/5dabb75670f314cb71f40329e6a7dfd6bc80c3687ec3b7e7b55e9c8b0117/pic2asc-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-03 16:12:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Boooooom030",
"github_project": "pic2asc",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pic2asc"
}