Git Product home page Git Product logo

ascii-art-web-import's Introduction

ascii-art-web

The ascii art project, modified to work in a web page.

Created by Nikolay, Remi, and Maya.

A web application written in Go, HTML, and CSS which allows users to generate ascii-art text based on their inputs. The algorithm works by creating a map where the key is a rune (any character in the ascii table (starting from " " until ~) and the value is a slice of strings where each element of the slice is one line of the eight-line ascii character that is read from the banner file. On the client side, if a POST request is sent to the /ascii-art route, the user's input will be accessed by the server and sent to the "mapsimple.go" file in the "functions" folder, where it will be processed. If there are no errors, the "MakeMapSimple" function will return ascii art based on the users input, then sent to an HTML template to be displayed on the front end. If there are errors, the web application will return the correct ones accordingly. I.e. 404 for an unknown route, 400 for a bad request or 500 for an internal server error.

Execute "go run ." in the terminal and then load up http://localhost:8080 in your browser. Upon loading, select a text style you would like your ASCII art to have from the radio buttons, and type the text you would like to turn in to ASCII art in the textbox below. Select the submit button once you are happy with your choices to see your artwork.

To test the code, change into the test directory and run the command "go test" or "go test ." in the terminal. You do not have to run the server to do this. If successful, the result "ok" shall be printed in the terminal.

The currently available styles are: Standard, Shadow, and Tinkertoy.

ascii-art-web-import's People

Contributors

rsmith-github avatar digitalix-ai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.