ASCII art API, birdie at EuRuKo Golf

Wooga started a little contest called EuRuKo Golf where you can win a ticket to EuRuKo 2012.

The goal of this contest is to write a tweetable (140 characters or less) ruby program that outputs EuRoKo ASCII art.

One of the smartest solutions was Matteo’s (see pull request https://github.com/wooga/euruko-golf/pull/2) which uses the artii gem to create ASCII art.

A drawback of this solution is that you should have the artii gem installed on your system to run it without errors. A workaround solution is to call a web service which uses a sort of artii gem to generate ASCII art from a string.

This solution is now available thanks to ASCII art API.

It’s a simple Goliath app that lets you generate ASCII art from any text.

Try http://artii.herokuapp.com/make?text=I+love+ASCII+art, you should see something like this as a response from the API:

 _____   _                            _____  _____ _____ _____              _   
|_   _| | |                    /\    / ____|/ ____|_   _|_   _|            | |  
  | |   | | _____   _____     /  \  | (___ | |      | |   | |     __ _ _ __| |_ 
  | |   | |/ _ \ \ / / _ \   / /\ \  \___ \| |      | |   | |    / _` | '__| __|
 _| |_  | | (_) \ V /  __/  / ____ \ ____) | |____ _| |_ _| |_  | (_| | |  | |_ 
|_____| |_|\___/ \_/ \___| /_/    \_\_____/ \_____|_____|_____|  \__,_|_|   \__|

With this API you should be able to build a solution to the contest like this:

require 'open-uri'
puts open('http://j.mp/IRG0u1').read

You can find app’s source code at http://github.com/potomak/artii-api.

Resources:

EuRuKo Golf by Wooga
EuRuKo Golf repo

blog comments powered by Disqus