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.
- Clone the repository:
git clone https://github.com/your-repo/ascii-art-web.git cd ascii-art-web - Build and run the server:
go run main.go
- Open your browser and navigate to:
http://localhost:8080/
- Enter text in the input field.
- Select one of the available banners:
- Shadow
- Standard
- Thinkertoy
- Click the Generate button to receive the ASCII art output.
The project implements an HTTP server with the following 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.
- 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.
./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
- Ensure Go is installed on your machine.
- Place banner files in the banners directory.
- Start the server and access the web interface.
- Use the provided form to generate ASCII art.
Only standard Go packages are used in this project to comply with the requirements.