This project involves creating a Go program that generates ASCII art based on a given string and banner style, and writes the result into a file when output flag is specified.Additionally, it runs with a single [STRING] argument.
- Converts strings into ASCII art
- Supports numbers, letters, spaces, special characters, and newline characters ('\n')
- Utilizes specific graphical templates for ASCII representation
- Writes the ascii art into a file if output flag is specified
-
Clone the repository:
git clone https://learn.zone01kisumu.ke/git/doonyango/ascii-art-output.git
-
Navigate to the project directory:
cd ascii-art-output/
To generate ASCII art for a string or write the ascii art into a file, run the following command:
go run . "string"
Example:
go run . "Hello\n" | cat -e
Output:
_ _ _ _ $
| | | | | | | | $
| |__| | ___ | | | | ___ $
| __ | / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$
$
$
go run . --output=<fileName.txt> something standard
Output
cat -e fileName.txt
_ _ _
| | | | (_)
___ ___ _ __ ___ ___ | |_ | |__ _ _ __ __ _
/ __| / _ \ | '_ ` _ \ / _ \ | __| | _ \ | | | '_ \ / _` |
\__ \ | (_) | | | | | | | | __/ \ |_ | | | | | | | | | | | (_| |
|___/ \___/ |_| |_| |_| \___| \__| |_| |_| |_| |_| |_| \__, |
__/ |
|___/
cd tests/
go test -v
standard.txt
: Standard ASCII character setshadow.txt
: Shadowed ASCII character setthinkertoy.txt
: ASCII character set with thinkertoy style
This program ensures file integrity using SHA-256 checksums. When downloading or verifying files (standard.txt, shadow.txt, thinkertoy.txt), it calculates the checksum of the downloaded file and compares it with a pre-defined expected checksum (expectedChecksum map). If the checksums do not match, it indicates that the file has been tampered with or corrupted.
If you have suggestions for improvements, bug fixes, or new features, feel free to open an issue or submit a pull request.
This project was build and maintained by: