Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII Art

Description

This program prints a given string in ASCII-art format using the standard.txt banner file.

Pseudocode

Logic

  1. Read standard.txt
  2. Split banner file into lines
  3. Replace \n tokens with actual new lines
  4. Split input into parts by new line
  5. For each part:
    • print 8 rows
    • for each character:
      • find character position
      • print the correct banner row

Usage

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

Authors

Talabi Josiah | Aspiring Developer

Emmanuel Ihezie | Aspiring Developer

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages