# Python 2.7 Code # Jonathan Frech, 14th of July 2017 # Usage: python index.py > index.html # import import os, cgi # url link to post POST = "https://jonathanfrech.wordpress.com/2017/07/15/asciify/" # list of asciify calls cmd = [ ("cube.png" , " -s 180 -ci --htmlx --link > ", "cube.html" ), ("kirby.png" , " -s 130 -ci --smallcharset --htmlx --link > ", "kirby.html" ), ("crack.png" , " -s 200 --smallcharset --htmlx --link > ", "crack.html" ), ("spider.png" , " -s 120 --smallcharset --htmlx --link > ", "spider.html" ), ("boat.png" , " -s 120 -ci --htmlx --link > ", "boat.html" ), ("flower.png" , " -s 150 -ci --htmlx --link > ", "flower.html" ), ("flowergraffiti.png", " -s 120 -c --smallcharset --htmlx --link > ", "flowergraffiti.html"), ("purpleflower.png" , " -s 140 -ci --smallcharset --htmlx --link > ", "purpleflower.html" ), ("orangeflower.png" , " -s 150 -ci --smallcharset --htmlx --link > ", "orangeflower.html" ), ("redflower.png" , " -s 120 -ci --smallcharset --htmlx --link > ", "redflower.html" ) ] # html page's body body = "
" # assemble final html page html = "\n\t\n\t\n\t\t\n\t\t\tAsciify\n\t\t\t

Asciify

\n\t\t\n\t\t\n\t\t\n\t\t\t%s\n\t\t\n\t" % body # output html page print html