All Projects → RamonGebben → figlefy

RamonGebben / figlefy

Licence: ISC License
API for getting ascii art strings

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
Nginx
273 projects

figlefy

API for getting ascii art strings

Running the project

To run the project install all dependencies using npm:

npm i

Then you can run the project via node:

node app.js

Thats it. For development I use Nodemon which I can recommend for projects like this.

API Overview

The API works very simple. The request url should be build of like this: http://figlefy.com/figlefy/{URI encoded string}/{font}

The {font} is optional. If you de not specify any font you will get the default font. A small example using fetch:

const figlefyAPI = 'http://figlefy.com/figlefy/';
let myString = 'Hello figlefy';

fetch(figlefyAPI + encodeURIComponent(myString))
    .then( res => res.text())
    .then(figlefied => {
        console.log(figlefied);
    });

This will return a String which looks like this when presented in a monospace font:

 _   _      _ _          __ _       _       __
| | | | ___| | | ___    / _(_) __ _| | ___ / _|_   _
| |_| |/ _ \ | |/ _ \  | |_| |/ _` | |/ _ \ |_| | | |
|  _  |  __/ | | (_) | |  _| | (_| | |  __/  _| |_| |
|_| |_|\___|_|_|\___/  |_| |_|\__, |_|\___|_|  \__, |
                               |___/            |___/

Fonts

If you want to get an overview of all the posible fonts make a request to /fonts:

const fontListURL = 'http://figlefy.com/fonts/';

fetch(fontListURL)
    .then( res => res.json())
    .then(fonts => {
        console.log(fonts);
    });

Which would present you with a list like this:

[
    "3-d",
    "3x5",
    "5lineoblique",
    "acrobatic",
    // ....
]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].