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.
- 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
.txt
file. - Save output as a
.png
file.
To install the ASCII Forge CLI tool, use the following command:
pip install ascii-forge
To run the tool, use the following command:
ascii_forge <image_path> [OPTIONS]
image_path
(required): The path to the image file to be converted.
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. |
ascii_forge input.jpg
ascii_forge input.jpg --width 150
ascii_forge input.jpg --invert
ascii_forge input.jpg --save-as-txt output.txt
ascii_forge input.jpg --save-as-png output.png
ascii_forge input.jpg --color red
To set up the development environment locally, follow these steps:
.
├── ascii_forge
├── ascii_forge.egg-info
├── images
├── LICENSE
├── README.md
├── requirements.txt
├── setup.py
└── venv
-
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>
This project is licensed under the MIT License.
Contributions are welcome! Feel free to open issues and submit pull requests on GitHub.
For any queries or support, reach out via GitHub or email.