The ASCII Art Generator is a web-based application that allows users to create beautiful ASCII art from input text using different banner styles. Users can view the generated ASCII art directly on the website and also download it as a .txt file.
- Interactive User Interface: Input text and choose from various banner styles to generate ASCII art.
- Real-time ASCII Art Display: View the generated ASCII art instantly in your browser.
- Download as File: Save the ASCII art as a
.txtfile for offline use. - Custom Error Handling: Provides descriptive error messages for invalid inputs or server issues.
- Responsive Design: Optimized for various screen sizes and devices.
- Go (Golang) installed on your system.
- Access to a terminal or command prompt.
-
Clone this repository:
git clone https://github.com/MrMaRc0s/ascii-art-web-export/ cd ascii-art-web-export -
Run the server:
go run main.go
-
Open your browser and navigate to:
http://localhost:<PORT>
- Enter your desired text in the text input box.
- Select a banner style (Standard, Shadow, or Thinkertoy).
- Click the Generate ASCII Art button to view the result.
- To download the result, click Download ASCII Art as txt.
- Endpoint:
/ascii-art - Method:
POST - Parameters:
text(string): Input text for ASCII art.banner(string): Banner style (standard,shadow, orthinkertoy).
- Response: ASCII art as plain text.
- Endpoint:
/download-ascii-art - Method:
POST - Parameters:
text(string): Input text for ASCII art.banner(string): Banner style.
- Response: ASCII art served as a
.txtfile.
Example command using curl:
curl -X POST -d "text=Hello&banner=standard" -o output.txt http://localhost:8080/download-ascii-art- Empty Input Text: Returns a
400 Bad Requesterror. - Invalid Banner: Returns a
400 Bad Requesterror if the selected banner is not available. - Missing Banner Files: Returns a
404 Not Founderror if a banner file is missing. - Internal Server Error: Returns a
500 Internal Server Errorfor unexpected errors during processing.
- Styling: Modify
index.htmlor the CSS styles to change the look and feel of the application.
- Inspired by the creativity of ASCII art enthusiasts.
- Special thanks to users for testing and feedback.