This is the frontend for the ASCII Art Printer app. It allows users to upload an ASCII art text file, set a printing interval (in milliseconds), and watch the ASCII art being printed line by line, with a progress bar to show completion.
- Min and max interval values to ensure the ASCII Art is printed correctly - (I found when the interval was too fast it would cut of the image).
- Basic error handling and time out handling (todo: update with vee-validate)
- Inline validation messages
- Disable
print
button when conditions are not met - Double validation for file type, the input itself only accepts
.txt
files, but I added an extra layer of validation to the file uploader just in case
- Upload ASCII art text files.
- Set a custom interval for printing each line.
- Real-time progress updates via WebSocket.
- User-friendly interface built with Vue 3 Composition API.
- Node.js (node version specified in
.nvmrc
file) - npm (comes with Node.js)
-
Clone repository to a folder of your choice.
-
Navigate to the folder:
cd ascii-art-viewer
-
Install dependencies: (check
.nvmrc
for node version)npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to:
http://localhost:5173
- Upload a text file containing ASCII art.
- Enter the interval (in milliseconds) between lines.
- Click the Print button to start printing the ASCII art line by line.
- Watch the progress bar and percentage update in real-time.
Ensure the backend server is running before using the frontend. For instructions, see the backend's README.
- Vue 3 (Composition API)
- TypeScript
- Vite (for fast development)
- Socket.IO (WebSocket for real-time communication)
- Axios (HTTP requests)
Here's an example ASCII art file you can use to test the application:
Save this as duck.txt
and upload it to the app!
,----,
___.` `,
`=== D :
`'. .'
) ( ,
/ \_________________/|
/ |
| ;
| _____ /
| \ ______7 ,'
| \ ______7 /
\ `-,____7 ,' jgs
^~^~^~^`\ /~^~^~^~^
~^~^~^ `----------------' ~^~^~^
~^~^~^~^~^^~^~^~^~^~^~^~^~^~^~^~