This program allows users to input text and select a banner format from a web interface. By clicking the "Convert to ASCII Art" button, the input text is transformed into an ASCII art graphical representation, which is then displayed on a new page.
This section illustrates how to make use of this program.
To run this program, download and install the latest version of Go from here
- Clone this repository on to the terminal by using the following command:
git clone https://github.com/JosephOkumu/Stylize-Web-AsciiArt
- Navigate into the ascii-art-web directory by using the command:
cd ascii-art-web
- To run the program, execute the command below:
go run .
The following message will be printed out on the terminal:
Starting the Server at port 8080
Once you see the message above on the terminal, open your browser and enter on the address bar the following address:
http://localhost/8080
A form will be displayed, and on the form, enter your input text in the text field, choose banner format and click "Convert to Ascii Art". Example: When you type "hello" and select "standard" as the banner format, then upon clicking "Convert to ASCII Art," the following output will be displayed on a new page.
_ _ _
| | | | | |
| |__ ___ | | | | ___
| _ \ / _ \ | | | | / _ \
| | | | | __/ | | | | | (_) |
|_| |_| \___| |_| |_| \___/
- This program can write the ascii-art graphical representation to a new page.
- This program allows you to select a banner file format to display the ascii art.
- The web pages of this program are styled and are responsive.
- This program has our own extra customized banner file.
- Root ("/)
- Ascii-art ("/ascii-art)
- Set up HTTP server using Go's 'net/http' package.
- Define route handlers for both endpoints:
- In the root handler serve the main page with a form for input text.
- In the ascii-art handler:
- Parse data from the request.
- Read the appropriate ASCII art file based on user input
- Process file contents to generate ASCII art.
- Generate HTML response with the ASCII art.
- Write HTML to response writer.
User Input -> Server -> File Read -> ASCII Art Generation -> HTML Response -> Web Browser
Pull requests are welcome where users of this program are allowed to contribute to this project in terms of adding features, or fixing bugs.
For major changes, please open an issue first to discuss what you would like to change.