I developed an API for ASCII art. This is an interactive notebook in which we'll take it for a spin --
Querying "https://asciiart-fdljfuzfva.now.sh/api/fonts" for the available fonts we can use --
await availableFonts();
Querying "https://asciiart-fdljfuzfva.now.sh/api/metadata/<font_name>" to retrieve a font's default options and header comment --
await metadata("Standard")
Querying "https://asciiart-fdljfuzfva.now.sh/api/text/<text>/font/<font_name>/hlayout/<horizontal_layout>/vlayout/<vertical_layout>" to retrieve ASCII art for text(expand the output cell to see the ASCII art) --
await asciiArt("ASCII ART", "Small Isometric1")
You can browse through all the available fonts here(expand the output cells to see the ASCII art) --
async function demoAllFonts() {
var fonts_obj = await availableFonts();
for (font of fonts_obj["fonts"]) {
var art_obj = await asciiArt("art", font);
console.log(font + "\n----\n" + art_obj["ascii_art"])
}
}
await demoAllFonts()
Written in JavaScript using the Express web framework(https://expressjs.com/) and figlet(https://www.npmjs.com/package/figlet). Deployed on now(https://zeit.co/now).