Skip to content
/ ath Public

ath (ansi to html) is both a command line tool and a D library for converting text containing ANSI escape sequences into HTML.

License

Notifications You must be signed in to change notification settings

maltejur/ath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ath - ansi to html

ath is both a command line tool and a D library for converting text containing ANSI escape sequences into HTML.

Features

  • 3-bit, 8-bit and 24-bit color support
  • Basic SGR sequences (bold, italic, underline, blink, crossedout, invert, hide, faint, overlined)
  • Cursor control sequences (if buffer is enabled)

Not (yet) implemented:

  • Obscure SGR sequences not listed above (most notably invert and hide)
  • OSC sequences
  • Some C0 control codes (like tab or backspace)

Command Line Tool

Installation

To install the command line tool, make sure you have ldc2 and dub installed. Then, just run:

make

sudo make install

Usage

The command line tool reads the input stream and converts the containing ANSI into HTML. You can view ath --help for optional arguments and example commands.

Library

You can view the documentation of the library at https://ath.dpldocs.info/ath.html.

Credits

Thanks a lot to theZiz for his great tool aha. I basically ported his code to D and improved on it. I would have just contributed upstream, but I needed a D library and thus it wasn't possible for me (with my technical knowledge) to just use aha.

About

ath (ansi to html) is both a command line tool and a D library for converting text containing ANSI escape sequences into HTML.

Topics

Resources

License

Stars

Watchers

Forks