Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ascii-Art-Web

Description

Ascii-Art-Web is a web application that provides a graphical user interface for the Ascii-Art project. This project allows users to generate ASCII art from text input using different artistic banners. The web application is built using Go, leveraging HTTP endpoints and HTML templates to provide an interactive user experience.

Usage

How to Run

  1. Clone the repository:
    git clone https://github.com/your-repo/ascii-art-web.git
    cd ascii-art-web
  2. Build and run the server:
    go run main.go
  3. Open your browser and navigate to:
    http://localhost:8080/
    

Example

  1. Enter text in the input field.
  2. Select one of the available banners:
    • Shadow
    • Standard
    • Thinkertoy
  3. Click the Generate button to receive the ASCII art output.

Implementation Details

The project implements an HTTP server with the following endpoints:

Endpoints

  • GET /: Serves the main HTML page with a form to input text and select banners.
  • POST /ascii-art: Receives the text input and selected banner from the form, generates the corresponding ASCII art, and displays the result.

HTTP Status Codes

  • 200 OK: Request processed successfully.
  • 404 Not Found: Template or banner file not found.
  • 400 Bad Request: Invalid input provided.
  • 500 Internal Server Error: Unhandled server error.

Project Structure

./ascii-art-web
├── main.go               # Entry point
├── templates             # HTML templates directory
│   └── index.html        # Main HTML template
└── banners               # Banner files
    ├── standard.txt
    ├── shadow.txt
    └── thinkertoy.txt

Instructions

  1. Ensure Go is installed on your machine.
  2. Place banner files in the banners directory.
  3. Start the server and access the web interface.
  4. Use the provided form to generate ASCII art.

Allowed Packages

Only standard Go packages are used in this project to comply with the requirements.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages