Description
This program prints a given string in ASCII-art format using the standard.txt banner file.
- Read
standard.txt - Split banner file into lines
- Replace
\ntokens with actual new lines - Split input into parts by new line
- For each part:
- print 8 rows
- for each character:
- find character position
- print the correct banner row
go run . [STRING] | cat -e
Example
go run . Hello | cat -e
output
_ _ _ _ $
| | | | | | | | $
| |__| | ___ | | | | ___ $
| __ | / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$
$
Multiline input
go run . "Hello\nThere" | cat -e
_ _ _ _ $
| | | | | | | | $
| |__| | ___ | | | | ___ $
| __ | / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$
$
_______ _ $
|__ __| | | $
| | | |__ ___ _ __ ___ $
| | | _ \ / _ \ | '__| / _ \ $
| | | | | | | __/ | | | __/ $
|_| |_| |_| \___| |_| \___| $
$
$
Requirements
standard.txt must exist in the project folder.
Errors:
If the banner file is missing, the program prints:
ERROR: Invalid File Name. expected standard.txt
Talabi Josiah | Aspiring Developer
Emmanuel Ihezie | Aspiring Developer