ASCII Forge CLI Tool
Overview
The ASCII Forge CLI tool is a command-line utility that converts images into ASCII art. It provides various options to customize the output, including width, color, inversion, and file-saving capabilities.
Features
- Convert images to ASCII art.
- Adjustable output width for clarity.
- Invert ASCII output for different visual effects.
- Choose a color scheme for the output.
- Save output as a
.txtfile. - Save output as a
.pngfile.
Installation
To install the ASCII Forge CLI tool, use the following command:
pip install ascii-forge
Usage
To run the tool, use the following command:
ascii_forge <image_path> [OPTIONS]
Arguments
image_path(required): The path to the image file to be converted.
Options
| Option | Short Flag | Default | Description |
|---|---|---|---|
--width |
-w |
100 | Width of the ASCII output (affects clarity). |
--invert |
-i |
False | Invert ASCII output. |
--color |
-c |
None | Choose a color scheme from COLOR_MAP. |
--save-as-txt |
-st |
None | Save ASCII output to a .txt file. |
--save-as-png |
-sp |
None | Save ASCII output to a .png file. |
Example Usage
Basic Conversion
ascii_forge input.jpg
Adjusting Width
ascii_forge input.jpg --width 150
Inverting ASCII Output
ascii_forge input.jpg --invert
Saving Output as a Text File
ascii_forge input.jpg --save-as-txt output.txt
Saving Output as a PNG (best accuracy)
ascii_forge input.jpg --save-as-png output.png
Using Color Options
ascii_forge input.jpg --color red
Running Locally for Development
To set up the development environment locally, follow these steps:
Directory Structure
.
├── ascii_forge
├── ascii_forge.egg-info
├── images
├── LICENSE
├── README.md
├── requirements.txt
├── setup.py
└── venv
Steps
-
Clone the repository:
git clone <repository_url> cd ascii_forge
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
-
Install dependencies:
pip install -r requirements.txt
-
Run the CLI tool locally:
pip install --editable .
-
Make changes and test:
python -m ascii_forge <image_path>
License
This project is licensed under the MIT License.
Contributions
Contributions are welcome! Feel free to open issues and submit pull requests on GitHub.
Contact
For any queries or support, reach out via GitHub or email.
Metadata
Release files for ascii-forge 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ascii-forge-1.0.0.tar.gz | 5.3 kB | Without provenance | Details for ascii-forge-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ascii_forge-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for ascii_forge-1.0.0-py3-none-any.whl |
Total release size: 11.2 kB
Release files / ascii-forge-1.0.0.tar.gz
| Download URL | ascii-forge-1.0.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e838ee90b7035edda1cd1d8d1f64d802497cae28272861f95fb129571747f800
|
|
BLAKE2b-256 checksum How to use checksums |
05a20d284f0b593544d4e700f36ffe82f2efc8836a9db04f480eff47991f7af6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Release files / ascii_forge-1.0.0-py3-none-any.whl
| Download URL | ascii_forge-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69bbfc02f6d81a5ec7d9a55e8d475af8f084b3230eae3a27d0c1097f1cf9bb4a
|
|
BLAKE2b-256 checksum How to use checksums |
3105e2e08684054cb831bd79cfea4a0c215c26f0a1c345c22c3e971c0da9492a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Security for ascii-forge 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.