logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ansi2html - ansi to HTML converter

Caveats

       Most ANSI codes other than color codes are ignored; possibly causing misformatted  output.   In  general,
       anything unfit for a hardcopy terminal won't work.

Description

ansi2html will convert the ANSI log into an HTML page, converting ANSI color codes into appropriate tags.
       All common colors and attributes are supported.

Name

       ansi2html - ansi to HTML converter

Options

-n, --no-header
              Don't  produce  an HTML header.  This allows including the log into a web page you make some other
              way.  You are responsible for setting background color appropriately — to black or something  dark
              in the default on-black mode, or to white/light when -w is used.  Fancy-schmancy background images
              are fine as long as they are dark (or light) enough.

       -w, --white
              Make  the  background  white.  This is contrary to most terminals but matches most webpages.  Text
              requested to be bolded (normally bright white) will be turned  bold  black,  but  explicit  bright
              white willnot be changed, becoming invisible (just like explicit black is invisible in the normal
              on-black mode), same as on real terminals (see -c).

       -c, --contrast
              Forbid  invisible  text.  Whenever foreground color is same as background, it'll be turned halfway
              across the color space (so white and black become gray).  This is inaccurate wrt  real  terminals,
              and  most  web  users already know how to mouse-highlight "spoiler" text, but can be useful if you
              process logs that assume different white-vs-black background than you.

       -t, --titletext
              Set the page title to the next argument.  Mutually exclusive with -n.

       -l, --no-wrap
              Disable word-wrapping.  Like text terminals, ansi2html wraps text by default, which is contrary to
              the usual browser default for plain text.

       --styletext
              Injects some text into the stylesheet, obviously doesn't make any sense with -n.  Example: --style'pre{font-family:Consolas}'

See Also

ansi2txt(1), ttyrec2ansi(1), pipetty(1).

                                                   2018-05-27                                       ansi2html(1)

Synopsis

ansi2html [-nwctl] <log>outfile

See Also