Skip to content

Repository files navigation

generateascii.com

A free, ad-supported ASCII art generator:

  • Text → ASCII: FIGlet-style banner text using figlet.js with a curated set of 59 fonts, a live browsable font gallery, solid/rainbow color, and .txt/.png export.
  • Image → ASCII: drag-and-drop image-to-ASCII conversion via canvas luminance mapping, with adjustable width, character ramp, dithering (Floyd–Steinberg or ordered Bayer), brightness/contrast/gamma, invert, monochrome/full-color output, and export as .txt, .png, coloured .html or 24-bit ANSI .ans. Animated GIFs decode to animated ASCII and export as a self-contained HTML player.
  • Font gallery at /fonts/: a landing page per FIGlet font, each with a baked-in sample and a live preview. Generated from the font catalogue — see below.

Everything runs client-side — no backend, no build step, no uploads. Deployed as static files on GitHub Pages.

Local development

No build tooling required. Serve the folder with any static file server, e.g.:

python3 -m http.server 8000

Then open http://localhost:8000.

Structure

index.html            Main app (both tools)
text-to-ascii.html     Standalone tool pages
image-to-ascii.html
fonts/                 GENERATED — one page per font, plus the gallery index
fonts.html             GENERATED — flat alias for /fonts/
sitemap.xml            GENERATED by tools/build_font_pages.py
tools/                 Page generator + its FIGlet engine (Python, not shipped)
privacy.html           Privacy policy (required for ad networks)
terms.html             Terms of use
assets/css/styles.css  Design system
assets/js/app.js       All app logic (tabs, font gallery, canvas image pipeline, export)
assets/js/font-page.js Live preview + copy on the per-font landing pages
assets/js/figlet.min.js       Vendored figlet.js browser build
assets/js/fonts-manifest.js   Curated font catalogue
assets/fonts/*.flf      Vendored FIGlet font files (from the figlet npm package)
CNAME                   GitHub Pages custom domain (generateascii.com)

Regenerating the font pages

Nothing under fonts/ is hand-written, and neither is sitemap.xml:

python3 tools/build_font_pages.py           # regenerate
python3 tools/build_font_pages.py --check   # exits non-zero if output is stale

The generator needs only the standard library. It bakes a real ASCII sample into each page using tools/figfont.py, a Python port of the layout engine inside the vendored figlet.min.js, so the static sample matches what the page's live preview renders a moment later. To prove the two engines still agree after touching figfont.py:

python3 tools/check_figfont.py     # writes tools/.figfont-expected.json
python3 -m http.server 8000        # then open /tools/check_figfont.html

1829 comparisons across all 59 fonts; the expected result is zero mismatches.

Enabling ads (Google AdSense)

  1. Deploy the site and get it live at generateascii.com.
  2. Apply at https://adsense.google.com with the live URL. Approval requires a working privacy policy (already included) and some real content/traffic — it isn't instant.
  3. Once approved, uncomment the AdSense <script> tag in index.html's <head> and replace ca-pub-XXXXXXXXXXXXXXXX with your publisher ID. Auto ads then places ad units automatically — no manual placement needed.

Custom domain (generateascii.com)

The CNAME file tells GitHub Pages to serve this repo at generateascii.com. You still need to point DNS at GitHub Pages yourself:

  • Apex domain (generateascii.com): four A records to 185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153.
  • www subdomain (optional): CNAME record to <username>.github.io.

Then enable Pages in the repo's Settings → Pages, and enter generateascii.com as the custom domain (GitHub will offer to enforce HTTPS once DNS propagates).

Fonts license

.flf FIGlet font files are bundled from the figlet npm package (MIT), which itself distributes the long-standing public FIGlet font collection used by essentially every FIGlet-based tool on the web.

About

Free text & image to ASCII art generator — generateascii.com

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages