A simple Flask web app and command-line tool to generate ASCII art from an image URL or locally.
Both Web and Command Line usage
Turn any image locally or remotely into ASCII characters.
docker pull bigsk1/airats:latest
or Build docker image in project root with Dockerfile
Clone the repo then
cd airats
docker build -t <your_image_name> .
docker run -d -p 5000:5000 <your_image_name>
- Clone the repo
git clone https://github.com/bigsk1/airats.git
cd airats
- (Optional) Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
- Install the required Python packages:
pip install -r requirements.txt
sudo apt install python3 && sudo apt install python3-pip && sudo apt install python3-flask && python3 -m pip install Pillow && python3 -m pip install requests && python3 -m pip install gunicorn
run with python3 app.py in the airats folder
python3 app.py
Open a web browser and visit http://localhost:5000 to access the app.
Open in devcontainer and run! Find on localhost:5000
Download .exe from releases here: https://github.com/bigsk1/airats/releases/tag/v1.0
You will most likely get a warning when trying to launch because it is not a signed .exe this is normal.
(optional) build your own by cloning the win64 branch here:
git clone --single-branch --branch win64 https://github.com/bigsk1/airats.git
see the requirements.txt for what dependencies are needed
- Run the Flask app (optional):
export FLASK_APP=app.py
flask run --host=0.0.0.0
-
Open a web browser and visit http://localhost:5000 to access the app.
-
Enter an image URL and width, then click "Generate ASCII Art" to see the result.
Run any of the following commands from the airats directory:
python3 Main.py <image_url> [-w WIDTH] [-ht HEIGHT]
You can also run an image you have locally using:
python3 Main.py your_image.jpg -w 150 -ht 50
or
python3 Main.py https://your-image-url.jpeg -w 150 -ht 50
python3 Main.py images/rat.jpg -w 50 -ht 25
Output image to a file
python3 Main.py images/rat.jpg -w 80 -o output.txt
Supports
JPEG: .jpg, .jpeg
PNG: .png
GIF: .gif
BMP: .bmp
TIFF: .tif, .tiff
ICO: .ico
WebP: .webp
`,^.`:l!<;,^' .I,
!-})}rcYCQLYzvt(]?[{;
"+<+}}{ruYQQQ0QJvft?--`
ir1_-)jrzvucccJZwQvnj?}(,
.-CZJf[}rcnuzLu/tjnzvrYYcYtl
.1QQCL0XcnrxuO#pCjf/(|fcpXYCx,
]CLXcccXJYJJXzcrttt({[{|/vLQL/^
+JLcrrnvYLCL0QLJCzt)]?[}}-)COLJ}`
!XZQcjrvXYCQQOO0QJu(}]?{?]?+zO0Lc>
`tL00XnjncvcczXXXvf/|{[])()[]zLCXX{
"rYYJYznxnvczzvuuuj({}]??][)uJCXvct'
,jXXYzcvnnvzXJJJYYzvf/|fnzYCQYYzuvn^
.~ncccunuvcXJJXXYJ0mOqZZ00QO0JzvuvvI
'?xrrjrzOZJvcvXQOdkhadmQLLLLCznxczI
~jrjt{)vQcvvut){(c0ZOQLLQQCcnuXX,
^l>+]{){]_!,l[/)<!!]ncu1__<]tuXCLQOZQYcvXJu'
"+{jj|)fxuzQ0Qzxnx]!!i]cvurftuczCL0OOLJYXYJCt
^[n/;. .^!]rCwqQz|?{}cJLOOZZmpwmmO0QCYYCCC~
`-/[^ '!1uQZ0CQOZmpdppkkbkpmOLCLOZOt'
^_(]~!,^````^""`":~(Jdhao*#*o#MMMhZQC0mmLvj,
:~?}}}1)/nXzuvC0qdh#W8#abdpwmOLXXvYYvt-!I'
.^":;l!!l!i+-{(/tjf}???-}{1?]1(/{?<!:,'
..
This project is licensed under MIT License.