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
.txtfile. - Save output as a
.pngfile.
To install the ASCII Forge CLI tool, use the following command:
pip install ascii-forgeTo 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.jpgascii_forge input.jpg --width 150ascii_forge input.jpg --invertascii_forge input.jpg --save-as-txt output.txtascii_forge input.jpg --save-as-png output.pngascii_forge input.jpg --color redTo 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.