Skip to main content

Turn your images into ASCII art from your terminal

Project description

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 .txt file.
  • Save output as a .png file.

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. The multi option works only with --save-as-png.
--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

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

  1. Clone the repository:

    git clone <repository_url>
    cd ascii_forge
    
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On macOS/Linux
    venv\Scripts\activate  # On Windows
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Run the CLI tool locally:

    pip install --editable .
    
  5. 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.

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

ascii_forge-0.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ascii_forge-0.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file ascii_forge-0.2.tar.gz.

File metadata

  • Download URL: ascii_forge-0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for ascii_forge-0.2.tar.gz
Algorithm Hash digest
SHA256 6e4fa865ed85e97efd6dd445afb4b730edc0e21c8908d17cb4f71b30e6337e73
MD5 7d32dd5506ee4cf0a5b32ee51184db2c
BLAKE2b-256 64977d41cc16d889d8207816e27d7770a5b10a051e283c2bd760e08347d8396b

See more details on using hashes here.

File details

Details for the file ascii_forge-0.2-py3-none-any.whl.

File metadata

  • Download URL: ascii_forge-0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for ascii_forge-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc3d52d3ec2ede75e0fa032447b0e7de5a636cad66f475d774a602532a518b61
MD5 35b9c5f2c42d2f82998d91d9bda4ad6a
BLAKE2b-256 278c4aa9ab99e694d7e3f9432b5a31fca95584d36667e5aa84d2c41996e8e9f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page