New example that can get you colors on the web main origin/HEAD origin/main
authorJosuer08 <josuer08@gmail.com>
Wed, 16 Dec 2020 16:59:22 +0000 (11:59 -0500)
committerJosuer08 <josuer08@gmail.com>
Wed, 16 Dec 2020 16:59:22 +0000 (11:59 -0500)
colorexample/ansi2html.sh [new file with mode: 0755]
colorexample/hola.html [new file with mode: 0644]
colorexample/hola.txt [new file with mode: 0644]
colorexample/startserver.sh [new file with mode: 0755]
colorexample/test.sh [new file with mode: 0755]

diff --git a/colorexample/ansi2html.sh b/colorexample/ansi2html.sh
new file mode 100755 (executable)
index 0000000..c2ec4e2
--- /dev/null
@@ -0,0 +1,527 @@
+#!/bin/sh
+
+# Convert ANSI (terminal) colours and attributes to HTML
+
+# Licence: LGPLv2
+# Author:
+#    http://www.pixelbeat.org/docs/terminal_colours/
+# Examples:
+#    ls -l --color=always | ansi2html.sh > ls.html
+#    git show --color | ansi2html.sh > last_change.html
+#    Generally one can use the `script` util to capture full terminal output.
+# Changes:
+#    V0.1, 24 Apr 2008, Initial release
+#    V0.2, 01 Jan 2009, Phil Harnish <philharnish@gmail.com>
+#                         Support `git diff --color` output by
+#                         matching ANSI codes that specify only
+#                         bold or background colour.
+#                       P@draigBrady.com
+#                         Support `ls --color` output by stripping
+#                         redundant leading 0s from ANSI codes.
+#                         Support `grep --color=always` by stripping
+#                         unhandled ANSI codes (specifically ^[[K).
+#    V0.3, 20 Mar 2009, http://eexpress.blog.ubuntu.org.cn/
+#                         Remove cat -v usage which mangled non ascii input.
+#                         Cleanup regular expressions used.
+#                         Support other attributes like reverse, ...
+#                       P@draigBrady.com
+#                         Correctly nest <span> tags (even across lines).
+#                         Add a command line option to use a dark background.
+#                         Strip more terminal control codes.
+#    V0.4, 17 Sep 2009, P@draigBrady.com
+#                         Handle codes with combined attributes and color.
+#                         Handle isolated <bold> attributes with css.
+#                         Strip more terminal control codes.
+#    V0.26, 16 Nov 2019
+#      http://github.com/pixelb/scripts/commits/master/scripts/ansi2html.sh
+
+gawk --version >/dev/null || exit 1
+
+if [ "$1" = "--version" ]; then
+    printf '0.26\n' && exit
+fi
+
+usage()
+{
+printf '%s\n' \
+'This utility converts ANSI codes in data passed to stdin
+It has 4 optional parameters:
+--bg=dark --palette=linux|solarized|tango|xterm --css-only|--body-only
+E.g.: ls -l --color=always | ansi2html.sh --bg=dark > ls.html' >&2
+    exit
+}
+
+if [ "$1" = "--help" ]; then
+    usage
+fi
+
+processArg()
+{
+    [ "$1" = "--bg=dark" ] && { dark_bg=yes; return; }
+    [ "$1" = "--css-only" ] && { css_only=yes; return; }
+    [ "$1" = "--body-only" ] && { body_only=yes; return; }
+    if [ "$1" = "--palette=solarized" ]; then
+       # See http://ethanschoonover.com/solarized
+       P0=073642;  P1=D30102;  P2=859900;  P3=B58900;
+       P4=268BD2;  P5=D33682;  P6=2AA198;  P7=EEE8D5;
+       P8=002B36;  P9=CB4B16; P10=586E75; P11=657B83;
+      P12=839496; P13=6C71C4; P14=93A1A1; P15=FDF6E3;
+      return;
+    elif [ "$1" = "--palette=solarized-xterm" ]; then
+       # Above mapped onto the xterm 256 color palette
+       P0=262626;  P1=AF0000;  P2=5F8700;  P3=AF8700;
+       P4=0087FF;  P5=AF005F;  P6=00AFAF;  P7=E4E4E4;
+       P8=1C1C1C;  P9=D75F00; P10=585858; P11=626262;
+      P12=808080; P13=5F5FAF; P14=8A8A8A; P15=FFFFD7;
+      return;
+    elif [ "$1" = "--palette=tango" ]; then
+       # Gnome default
+       P0=000000;  P1=CC0000;  P2=4E9A06;  P3=C4A000;
+       P4=3465A4;  P5=75507B;  P6=06989A;  P7=D3D7CF;
+       P8=555753;  P9=EF2929; P10=8AE234; P11=FCE94F;
+      P12=729FCF; P13=AD7FA8; P14=34E2E2; P15=EEEEEC;
+      return;
+    elif [ "$1" = "--palette=xterm" ]; then
+       P0=000000;  P1=CD0000;  P2=00CD00;  P3=CDCD00;
+       P4=0000EE;  P5=CD00CD;  P6=00CDCD;  P7=E5E5E5;
+       P8=7F7F7F;  P9=FF0000; P10=00FF00; P11=FFFF00;
+      P12=5C5CFF; P13=FF00FF; P14=00FFFF; P15=FFFFFF;
+      return;
+    else # linux console
+       P0=000000;  P1=AA0000;  P2=00AA00;  P3=AA5500;
+       P4=0000AA;  P5=AA00AA;  P6=00AAAA;  P7=AAAAAA;
+       P8=555555;  P9=FF5555; P10=55FF55; P11=FFFF55;
+      P12=5555FF; P13=FF55FF; P14=55FFFF; P15=FFFFFF;
+      [ "$1" = "--palette=linux" ] && return;
+    fi
+}
+
+processArg #defaults
+for var in "$@"; do processArg $var; done
+[ "$css_only" ] && [ "$body_only" ] && usage
+
+# Mac OSX's GNU sed is installed as gsed
+# use e.g. homebrew 'gnu-sed' to get it
+if ! sed --version >/dev/null 2>&1; then
+  if gsed --version >/dev/null 2>&1; then
+    alias sed=gsed
+  else
+    echo "Error, can't find an acceptable GNU sed." >&2
+    exit 1
+  fi
+fi
+
+[ "$css_only" ] || [ "$body_only" ] || printf '%s' "<html>
+<head>
+<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
+<style type=\"text/css\">
+pre { white-space: pre-wrap; }
+"
+[ "$body_only" ] || printf ".ef0,.f0 { color: #$P0; } .eb0,.b0 { background-color: #$P0; }
+.ef1,.f1 { color: #$P1; } .eb1,.b1 { background-color: #$P1; }
+.ef2,.f2 { color: #$P2; } .eb2,.b2 { background-color: #$P2; }
+.ef3,.f3 { color: #$P3; } .eb3,.b3 { background-color: #$P3; }
+.ef4,.f4 { color: #$P4; } .eb4,.b4 { background-color: #$P4; }
+.ef5,.f5 { color: #$P5; } .eb5,.b5 { background-color: #$P5; }
+.ef6,.f6 { color: #$P6; } .eb6,.b6 { background-color: #$P6; }
+.ef7,.f7 { color: #$P7; } .eb7,.b7 { background-color: #$P7; }
+.ef8, .f0 > .bold,.bold > .f0 { color: #$P8; font-weight: normal; }
+.ef9, .f1 > .bold,.bold > .f1 { color: #$P9; font-weight: normal; }
+.ef10,.f2 > .bold,.bold > .f2 { color: #$P10; font-weight: normal; }
+.ef11,.f3 > .bold,.bold > .f3 { color: #$P11; font-weight: normal; }
+.ef12,.f4 > .bold,.bold > .f4 { color: #$P12; font-weight: normal; }
+.ef13,.f5 > .bold,.bold > .f5 { color: #$P13; font-weight: normal; }
+.ef14,.f6 > .bold,.bold > .f6 { color: #$P14; font-weight: normal; }
+.ef15,.f7 > .bold,.bold > .f7 { color: #$P15; font-weight: normal; }
+.eb8  { background-color: #$P8; }
+.eb9  { background-color: #$P9; }
+.eb10 { background-color: #$P10; }
+.eb11 { background-color: #$P11; }
+.eb12 { background-color: #$P12; }
+.eb13 { background-color: #$P13; }
+.eb14 { background-color: #$P14; }
+.eb15 { background-color: #$P15; }
+"
+# The default xterm 256 colour palette
+for red in 0 1 2 3 4 5 ; do
+  for green in 0 1 2 3 4 5 ; do
+    for blue in 0 1 2 3 4 5 ; do
+      c=$((16 + ($red * 36) + ($green * 6) + $blue))
+      r=$((($red * 40 + 55) * ($red > 0)))
+      g=$((($green * 40 + 55) * ($green > 0)))
+      b=$((($blue * 40 + 55) * ($blue > 0)))
+      [ "$body_only" ] || printf ".ef%d { color: #%2.2x%2.2x%2.2x; } " $c $r $g $b
+      [ "$body_only" ] || printf ".eb%d { background-color: #%2.2x%2.2x%2.2x; }\n" $c $r $g $b
+    done
+  done
+done
+for gray in $(seq 0 23); do
+  c=$(($gray+232))
+  l=$(($gray*10 + 8))
+  [ "$body_only" ] || printf ".ef%d { color: #%2.2x%2.2x%2.2x; } " $c $l $l $l
+  [ "$body_only" ] || printf ".eb%d { background-color: #%2.2x%2.2x%2.2x; }\n" $c $l $l $l
+done
+
+[ "$body_only" ] || printf '%s' '
+.f9 { color: '`[ "$dark_bg" ] && printf "#$P7;" || printf "#$P0;"`' }
+.b9 { background-color: #'`[ "$dark_bg" ] && printf $P0 || printf $P15`'; }
+.f9 > .bold,.bold > .f9, body.f9 > pre > .bold {
+  /* Bold is heavy black on white, or bright white
+     depending on the default background */
+  color: '`[ "$dark_bg" ] && printf "#$P15;" || printf "#$P0;"`'
+  font-weight: '`[ "$dark_bg" ] && printf 'normal;' || printf 'bold;'`'
+}
+.reverse {
+  /* CSS does not support swapping fg and bg colours unfortunately,
+     so just hardcode something that will look OK on all backgrounds. */
+  '"color: #$P0; background-color: #$P7;"'
+}
+.underline { text-decoration: underline; }
+.line-through { text-decoration: line-through; }
+.blink { text-decoration: blink; }
+
+/* Avoid pixels between adjacent span elements.
+   Note this only works for lines less than 80 chars
+   where we close span elements on the same line.
+span { display: inline-block; }
+*/
+'
+[ "$body_only" ] || [ "$css_only" ] && printf '%s\n' \
+'To use the css generated from --css-only, do: '\
+'<head><link rel="stylesheet" type="text/css" href="style.css"></head>' >&2
+[ "$css_only" ] && exit
+[ "$body_only" ] || printf '%s' '</style>
+</head>
+
+<body class="f9 b9">
+<pre>
+'
+[ "$body_only" ] && printf '%s\n' 'Be sure to use <body class="f9 b9"> and <pre>' >&2
+
+p='\x1b\['        #shortcut to match escape codes
+
+# Handle various xterm control sequences.
+# See /usr/share/doc/xterm-*/ctlseqs.txt
+sed "
+# escape ampersand and quote
+s#&#\&amp;#g; s#\"#\&quot;#g;
+s#\x1b[^\x1b]*\x1b\\\##g  # strip anything between \e and ST
+s#\x1b][0-9]*;[^\a]*\a##g # strip any OSC (xterm title etc.)
+
+s#\r\$## # strip trailing \r
+
+# strip other non SGR escape sequences
+s#[\x07]##g
+s#\x1b[]>=\][0-9;]*##g
+s#\x1bP+.\{5\}##g
+# Mark cursor positioning codes \"Jr;c;
+s#${p}\([0-9]\{1,2\}\)G#\"J;\1;#g
+s#${p}\([0-9]\{1,2\}\);\([0-9]\{1,2\}\)H#\"J\1;\2;#g
+
+# Mark clear as \"Cn where n=1 is screen and n=0 is to end-of-line
+s#${p}H#\"C1;#g
+s#${p}K#\"C0;#g
+# Mark Cursor move columns as \"Mn where n is +ve for right, -ve for left
+s#${p}C#\"M1;#g
+s#${p}\([0-9]\{1,\}\)C#\"M\1;#g
+s#${p}\([0-9]\{1,\}\)D#\"M-\1;#g
+s#${p}\([0-9]\{1,\}\)P#\"X\1;#g
+
+s#${p}[0-9;?]*[^0-9;?m]##g
+
+" |
+
+# Normalize the input before transformation
+sed "
+# escape HTML (ampersand and quote done above)
+s#>#\&gt;#g; s#<#\&lt;#g;
+
+# handle truecolor
+s#${p}38;2;\([0-9]\{1,3\}\);\([0-9]\{1,3\}\);\([0-9]\{1,3\}\)m#\
+<span style=\"color:rgb(\1\,\2\,\3\)\">#g
+s#${p}48;2;\([0-9]\{1,3\}\);\([0-9]\{1,3\}\);\([0-9]\{1,3\}\)m#\
+<span style=\"background-color:rgb(\1\,\2\,\3\)\">#g
+
+# normalize SGR codes a little
+
+# split 256 colors out and mark so that they're not
+# recognised by the following 'split combined' line
+:e
+s#${p}\([0-9;]\{1,\}\);\([34]8;5;[0-9]\{1,3\}\)m#${p}\1m${p}¬\2m#g; t e
+s#${p}\([34]8;5;[0-9]\{1,3\}\)m#${p}¬\1m#g;
+
+:c
+s#${p}\([0-9]\{1,\}\);\([0-9;]\{1,\}\)m#${p}\1m${p}\2m#g; t c   # split combined
+s#${p}0\([0-7]\)#${p}\1#g                                 #strip leading 0
+s#${p}1m\(\(${p}[4579]m\)*\)#\1${p}1m#g                   #bold last (with clr)
+s#${p}m#${p}0m#g                                          #add leading 0 to norm
+
+# undo any 256 color marking
+s#${p}¬\([34]8;5;[0-9]\{1,3\}\)m#${p}\1m#g;
+
+# map 16 color codes to color + bold
+s#${p}9\([0-7]\)m#${p}3\1m${p}1m#g;
+s#${p}10\([0-7]\)m#${p}4\1m${p}1m#g;
+
+# change 'reset' code to \"R
+s#${p}0m#\"R;#g
+" |
+
+# Convert SGR sequences to HTML
+sed "
+# common combinations to minimise html (optional)
+:f
+s#${p}3[0-7]m${p}3\([0-7]\)m#${p}3\1m#g; t f
+:b
+s#${p}4[0-7]m${p}4\([0-7]\)m#${p}4\1m#g; t b
+s#${p}3\([0-7]\)m${p}4\([0-7]\)m#<span class=\"f\1 b\2\">#g
+s#${p}4\([0-7]\)m${p}3\([0-7]\)m#<span class=\"f\2 b\1\">#g
+
+s#${p}1m#<span class=\"bold\">#g
+s#${p}4m#<span class=\"underline\">#g
+s#${p}5m#<span class=\"blink\">#g
+s#${p}7m#<span class=\"reverse\">#g
+s#${p}9m#<span class=\"line-through\">#g
+s#${p}3\([0-9]\)m#<span class=\"f\1\">#g
+s#${p}4\([0-9]\)m#<span class=\"b\1\">#g
+
+s#${p}38;5;\([0-9]\{1,3\}\)m#<span class=\"ef\1\">#g
+s#${p}48;5;\([0-9]\{1,3\}\)m#<span class=\"eb\1\">#g
+
+s#${p}[0-9;]*m##g # strip unhandled codes
+" |
+
+# Convert alternative character set and handle cursor movement codes
+# Note we convert here, as if we do at start we have to worry about avoiding
+# conversion of SGR codes etc., whereas doing here we only have to
+# avoid conversions of stuff between &...; or <...>
+#
+# Note we could use sed to do this based around:
+#   sed 'y/abcdefghijklmnopqrstuvwxyz{}`~/▒␉␌␍␊°±␤␋┘┐┌└┼⎺⎻─⎼⎽├┤┴┬│≤≥π£◆·/'
+# However that would be very awkward as we need to only conv some input.
+# The basic scheme that we do in the awk script below is:
+#  1. enable transliterate once "T1; is seen
+#  2. disable once "T0; is seen (may be on diff line)
+#  3. never transliterate between &; or <> chars
+#  4. track x,y movements and active display mode at each position
+#  5. buffer line/screen and dump when required
+sed "
+# change 'smacs' and 'rmacs' to \"T1 and \"T0 to simplify matching.
+s#\x1b(0#\"T1;#g;
+s#\x0E#\"T1;#g;
+
+s#\x1b(B#\"T0;#g
+s#\x0F#\"T0;#g
+" |
+(
+gawk '
+function dump_line(l,del,c,blanks,ret) {
+  for(c=1;c<maxX;c++) {
+    if ((c SUBSEP l) in attr || alength(cur)) {
+      ret = ret blanks fixas(cur,attr[c,l])
+      if(del) delete attr[c,l]
+      blanks=""
+    }
+    if ((c SUBSEP l) in dump) {
+      ret=ret blanks dump[c,l]
+      if(del) delete dump[c,l]
+      blanks=""
+    } else blanks=blanks " "
+  }
+  if(alength(cur)) ret=ret blanks
+  return ret
+}
+
+function dump_screen(l,ret) {
+  for(l=1;l<=maxY;l++)
+    ret=ret dump_line(l,0) "\n"
+  return ret fixas(cur, "")
+}
+
+function atos(a,i,ret) {
+  for(i=1;i<=alength(a);i++) if(i in a) ret=ret a[i]
+  return ret
+}
+
+function alength(a, i, k) {
+    k = 0
+    for(i in a) k++
+    return k
+}
+
+function fixas(a,s,spc,i,attr,rm,ret) {
+  spc=alength(a)
+  l=split(s,attr,">")
+  for(i=1;i<=spc;i++) {
+    rm=rm?rm:(a[i]!=attr[i]">")
+    if(rm) {
+      ret=ret "</span>"
+      delete a[i];
+    }
+  }
+  for(i=1;i<l;i++) {
+    attr[i]=attr[i]">"
+    if(a[i]!=attr[i]) {
+      a[i]=attr[i]
+      ret = ret attr[i]
+    }
+  }
+  return ret
+}
+
+function encode(string,start,end,i,ret,pos,sc,buf) {
+   if(!end) end=length(string);
+   if(!start) start=1;
+   state=3
+   for(i=1;i<=length(string);i++) {
+     c=substr(string,i,1)
+     if(state==2) {
+       sc=sc c
+       if(c==";") {
+          c=sc
+          state=last_mode
+       } else continue
+     } else {
+       if(c=="\r") { x=1; continue }
+       if(c=="<") {
+         # Change attributes - store current active
+         # attributes in span array
+         split(substr(string,i),cord,">");
+         i+=length(cord[1])
+         span[++spc]=cord[1] ">"
+         continue
+       }
+       else if(c=="&") {
+         # All goes to single position till we see a semicolon
+         sc=c
+         state=2
+         continue
+       }
+       else if(c=="\b") {
+          # backspace move insertion point back 1
+          if(spc) attr[x,y]=atos(span)
+          x=x>1?x-1:1
+          continue
+       }
+       else if(c=="\"") {
+          split(substr(string,i+2),cord,";")
+          cc=substr(string,i+1,1);
+          if(cc=="T") {
+              # Transliterate on/off
+              if(cord[1]==1&&state==3) last_mode=state=4
+              if(cord[1]==0&&state==4) last_mode=state=3
+          }
+          else if(cc=="C") {
+              # Clear
+              if(cord[1]+0) {
+                # Screen - if Recording dump screen
+                if(dumpStatus==dsActive) ret=ret dump_screen()
+                dumpStatus=dsActive
+                delete dump
+                delete attr
+                x=y=1
+              } else {
+                # To end of line
+                for(pos=x;pos<maxX;pos++) {
+                  dump[pos,y]=" "
+                  if (!spc) delete attr[pos,y]
+                  else attr[pos,y]=atos(span)
+                }
+              }
+          }
+          else if(cc=="J") {
+              # Jump to x,y
+              i+=length(cord[2])+1
+              # If line is higher - dump previous screen
+              if(dumpStatus==dsActive&&cord[1]<y) {
+                ret=ret dump_screen();
+                dumpStatus=dsNew;
+              }
+              x=cord[2]
+              if(length(cord[1]) && y!=cord[1]){
+                y=cord[1]
+                if(y>maxY) maxY=y
+                # Change y - start recording
+                dumpStatus=dumpStatus?dumpStatus:dsReset
+              }
+          }
+          else if(cc=="M") {
+              # Move left/right on current line
+              x+=cord[1]
+          }
+          else if(cc=="X") {
+              # delete on right
+              for(pos=x;pos<=maxX;pos++) {
+                nx=pos+cord[1]
+                if(nx<maxX) {
+                  if((nx SUBSEP y) in attr) attr[pos,y] = attr[nx,y]
+                  else delete attr[pos,y]
+                  if((nx SUBSEP y) in dump) dump[pos,y] = dump[nx,y]
+                  else delete dump[pos,y]
+                } else if(spc) {
+                  attr[pos,y]=atos(span)
+                  dump[pos,y]=" "
+                }
+              }
+          }
+          else if(cc=="R") {
+              # Reset attributes
+              while(spc) delete span[spc--]
+          }
+          i+=length(cord[1])+2
+          continue
+       }
+       else if(state==4&&i>=start&&i<=end&&c in Trans) c=Trans[c]
+     }
+     if(dumpStatus==dsReset) {
+       delete dump
+       delete attr
+       ret=ret"\n"
+       dumpStatus=dsActive
+     }
+     if(dumpStatus==dsNew) {
+       # After moving/clearing we are now ready to write
+       # somthing to the screen so start recording now
+       ret=ret"\n"
+       dumpStatus=dsActive
+     }
+     if(dumpStatus==dsActive||dumpStatus==dsOff) {
+       dump[x,y] = c
+       if(!spc) delete attr[x,y]
+       else attr[x,y] = atos(span)
+       if(++x>maxX) maxX=x;
+     }
+    }
+    # End of line if dumping increment y and set x back to first col
+    x=1
+    if(!dumpStatus) return ret dump_line(y,1);
+    else if(++y>maxY) maxY=y;
+    return ret
+}
+BEGIN{
+  OFS=FS
+  # dump screen status
+  dsOff=0    # Not dumping screen contents just write output direct
+  dsNew=1    # Just after move/clear waiting for activity to start recording
+  dsReset=2  # Screen cleared build new empty buffer and record
+  dsActive=3 # Currently recording
+  F="abcdefghijklmnopqrstuvwxyz{}`~"
+  T="▒␉␌␍␊°±␤␋┘┐┌└┼⎺⎻─⎼⎽├┤┴┬│≤≥π£◆·"
+  maxX=80
+  delete cur;
+  x=y=1
+  for(i=1;i<=length(F);i++)Trans[substr(F,i,1)]=substr(T,i,1);
+}
+
+{ $0=encode($0) }
+1
+END {
+  if(dumpStatus) {
+    print dump_screen();
+  }
+}'
+)
+
+[ "$body_only" ] || printf '</pre>
+</body>
+</html>\n'
diff --git a/colorexample/hola.html b/colorexample/hola.html
new file mode 100644 (file)
index 0000000..08fd6c6
--- /dev/null
@@ -0,0 +1,334 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<style type="text/css">
+pre { white-space: pre-wrap; }
+.ef0,.f0 { color: #000000; } .eb0,.b0 { background-color: #000000; }
+.ef1,.f1 { color: #AA0000; } .eb1,.b1 { background-color: #AA0000; }
+.ef2,.f2 { color: #00AA00; } .eb2,.b2 { background-color: #00AA00; }
+.ef3,.f3 { color: #AA5500; } .eb3,.b3 { background-color: #AA5500; }
+.ef4,.f4 { color: #0000AA; } .eb4,.b4 { background-color: #0000AA; }
+.ef5,.f5 { color: #AA00AA; } .eb5,.b5 { background-color: #AA00AA; }
+.ef6,.f6 { color: #00AAAA; } .eb6,.b6 { background-color: #00AAAA; }
+.ef7,.f7 { color: #AAAAAA; } .eb7,.b7 { background-color: #AAAAAA; }
+.ef8, .f0 > .bold,.bold > .f0 { color: #555555; font-weight: normal; }
+.ef9, .f1 > .bold,.bold > .f1 { color: #FF5555; font-weight: normal; }
+.ef10,.f2 > .bold,.bold > .f2 { color: #55FF55; font-weight: normal; }
+.ef11,.f3 > .bold,.bold > .f3 { color: #FFFF55; font-weight: normal; }
+.ef12,.f4 > .bold,.bold > .f4 { color: #5555FF; font-weight: normal; }
+.ef13,.f5 > .bold,.bold > .f5 { color: #FF55FF; font-weight: normal; }
+.ef14,.f6 > .bold,.bold > .f6 { color: #55FFFF; font-weight: normal; }
+.ef15,.f7 > .bold,.bold > .f7 { color: #FFFFFF; font-weight: normal; }
+.eb8  { background-color: #555555; }
+.eb9  { background-color: #FF5555; }
+.eb10 { background-color: #55FF55; }
+.eb11 { background-color: #FFFF55; }
+.eb12 { background-color: #5555FF; }
+.eb13 { background-color: #FF55FF; }
+.eb14 { background-color: #55FFFF; }
+.eb15 { background-color: #FFFFFF; }
+.ef16 { color: #000000; } .eb16 { background-color: #000000; }
+.ef17 { color: #00005f; } .eb17 { background-color: #00005f; }
+.ef18 { color: #000087; } .eb18 { background-color: #000087; }
+.ef19 { color: #0000af; } .eb19 { background-color: #0000af; }
+.ef20 { color: #0000d7; } .eb20 { background-color: #0000d7; }
+.ef21 { color: #0000ff; } .eb21 { background-color: #0000ff; }
+.ef22 { color: #005f00; } .eb22 { background-color: #005f00; }
+.ef23 { color: #005f5f; } .eb23 { background-color: #005f5f; }
+.ef24 { color: #005f87; } .eb24 { background-color: #005f87; }
+.ef25 { color: #005faf; } .eb25 { background-color: #005faf; }
+.ef26 { color: #005fd7; } .eb26 { background-color: #005fd7; }
+.ef27 { color: #005fff; } .eb27 { background-color: #005fff; }
+.ef28 { color: #008700; } .eb28 { background-color: #008700; }
+.ef29 { color: #00875f; } .eb29 { background-color: #00875f; }
+.ef30 { color: #008787; } .eb30 { background-color: #008787; }
+.ef31 { color: #0087af; } .eb31 { background-color: #0087af; }
+.ef32 { color: #0087d7; } .eb32 { background-color: #0087d7; }
+.ef33 { color: #0087ff; } .eb33 { background-color: #0087ff; }
+.ef34 { color: #00af00; } .eb34 { background-color: #00af00; }
+.ef35 { color: #00af5f; } .eb35 { background-color: #00af5f; }
+.ef36 { color: #00af87; } .eb36 { background-color: #00af87; }
+.ef37 { color: #00afaf; } .eb37 { background-color: #00afaf; }
+.ef38 { color: #00afd7; } .eb38 { background-color: #00afd7; }
+.ef39 { color: #00afff; } .eb39 { background-color: #00afff; }
+.ef40 { color: #00d700; } .eb40 { background-color: #00d700; }
+.ef41 { color: #00d75f; } .eb41 { background-color: #00d75f; }
+.ef42 { color: #00d787; } .eb42 { background-color: #00d787; }
+.ef43 { color: #00d7af; } .eb43 { background-color: #00d7af; }
+.ef44 { color: #00d7d7; } .eb44 { background-color: #00d7d7; }
+.ef45 { color: #00d7ff; } .eb45 { background-color: #00d7ff; }
+.ef46 { color: #00ff00; } .eb46 { background-color: #00ff00; }
+.ef47 { color: #00ff5f; } .eb47 { background-color: #00ff5f; }
+.ef48 { color: #00ff87; } .eb48 { background-color: #00ff87; }
+.ef49 { color: #00ffaf; } .eb49 { background-color: #00ffaf; }
+.ef50 { color: #00ffd7; } .eb50 { background-color: #00ffd7; }
+.ef51 { color: #00ffff; } .eb51 { background-color: #00ffff; }
+.ef52 { color: #5f0000; } .eb52 { background-color: #5f0000; }
+.ef53 { color: #5f005f; } .eb53 { background-color: #5f005f; }
+.ef54 { color: #5f0087; } .eb54 { background-color: #5f0087; }
+.ef55 { color: #5f00af; } .eb55 { background-color: #5f00af; }
+.ef56 { color: #5f00d7; } .eb56 { background-color: #5f00d7; }
+.ef57 { color: #5f00ff; } .eb57 { background-color: #5f00ff; }
+.ef58 { color: #5f5f00; } .eb58 { background-color: #5f5f00; }
+.ef59 { color: #5f5f5f; } .eb59 { background-color: #5f5f5f; }
+.ef60 { color: #5f5f87; } .eb60 { background-color: #5f5f87; }
+.ef61 { color: #5f5faf; } .eb61 { background-color: #5f5faf; }
+.ef62 { color: #5f5fd7; } .eb62 { background-color: #5f5fd7; }
+.ef63 { color: #5f5fff; } .eb63 { background-color: #5f5fff; }
+.ef64 { color: #5f8700; } .eb64 { background-color: #5f8700; }
+.ef65 { color: #5f875f; } .eb65 { background-color: #5f875f; }
+.ef66 { color: #5f8787; } .eb66 { background-color: #5f8787; }
+.ef67 { color: #5f87af; } .eb67 { background-color: #5f87af; }
+.ef68 { color: #5f87d7; } .eb68 { background-color: #5f87d7; }
+.ef69 { color: #5f87ff; } .eb69 { background-color: #5f87ff; }
+.ef70 { color: #5faf00; } .eb70 { background-color: #5faf00; }
+.ef71 { color: #5faf5f; } .eb71 { background-color: #5faf5f; }
+.ef72 { color: #5faf87; } .eb72 { background-color: #5faf87; }
+.ef73 { color: #5fafaf; } .eb73 { background-color: #5fafaf; }
+.ef74 { color: #5fafd7; } .eb74 { background-color: #5fafd7; }
+.ef75 { color: #5fafff; } .eb75 { background-color: #5fafff; }
+.ef76 { color: #5fd700; } .eb76 { background-color: #5fd700; }
+.ef77 { color: #5fd75f; } .eb77 { background-color: #5fd75f; }
+.ef78 { color: #5fd787; } .eb78 { background-color: #5fd787; }
+.ef79 { color: #5fd7af; } .eb79 { background-color: #5fd7af; }
+.ef80 { color: #5fd7d7; } .eb80 { background-color: #5fd7d7; }
+.ef81 { color: #5fd7ff; } .eb81 { background-color: #5fd7ff; }
+.ef82 { color: #5fff00; } .eb82 { background-color: #5fff00; }
+.ef83 { color: #5fff5f; } .eb83 { background-color: #5fff5f; }
+.ef84 { color: #5fff87; } .eb84 { background-color: #5fff87; }
+.ef85 { color: #5fffaf; } .eb85 { background-color: #5fffaf; }
+.ef86 { color: #5fffd7; } .eb86 { background-color: #5fffd7; }
+.ef87 { color: #5fffff; } .eb87 { background-color: #5fffff; }
+.ef88 { color: #870000; } .eb88 { background-color: #870000; }
+.ef89 { color: #87005f; } .eb89 { background-color: #87005f; }
+.ef90 { color: #870087; } .eb90 { background-color: #870087; }
+.ef91 { color: #8700af; } .eb91 { background-color: #8700af; }
+.ef92 { color: #8700d7; } .eb92 { background-color: #8700d7; }
+.ef93 { color: #8700ff; } .eb93 { background-color: #8700ff; }
+.ef94 { color: #875f00; } .eb94 { background-color: #875f00; }
+.ef95 { color: #875f5f; } .eb95 { background-color: #875f5f; }
+.ef96 { color: #875f87; } .eb96 { background-color: #875f87; }
+.ef97 { color: #875faf; } .eb97 { background-color: #875faf; }
+.ef98 { color: #875fd7; } .eb98 { background-color: #875fd7; }
+.ef99 { color: #875fff; } .eb99 { background-color: #875fff; }
+.ef100 { color: #878700; } .eb100 { background-color: #878700; }
+.ef101 { color: #87875f; } .eb101 { background-color: #87875f; }
+.ef102 { color: #878787; } .eb102 { background-color: #878787; }
+.ef103 { color: #8787af; } .eb103 { background-color: #8787af; }
+.ef104 { color: #8787d7; } .eb104 { background-color: #8787d7; }
+.ef105 { color: #8787ff; } .eb105 { background-color: #8787ff; }
+.ef106 { color: #87af00; } .eb106 { background-color: #87af00; }
+.ef107 { color: #87af5f; } .eb107 { background-color: #87af5f; }
+.ef108 { color: #87af87; } .eb108 { background-color: #87af87; }
+.ef109 { color: #87afaf; } .eb109 { background-color: #87afaf; }
+.ef110 { color: #87afd7; } .eb110 { background-color: #87afd7; }
+.ef111 { color: #87afff; } .eb111 { background-color: #87afff; }
+.ef112 { color: #87d700; } .eb112 { background-color: #87d700; }
+.ef113 { color: #87d75f; } .eb113 { background-color: #87d75f; }
+.ef114 { color: #87d787; } .eb114 { background-color: #87d787; }
+.ef115 { color: #87d7af; } .eb115 { background-color: #87d7af; }
+.ef116 { color: #87d7d7; } .eb116 { background-color: #87d7d7; }
+.ef117 { color: #87d7ff; } .eb117 { background-color: #87d7ff; }
+.ef118 { color: #87ff00; } .eb118 { background-color: #87ff00; }
+.ef119 { color: #87ff5f; } .eb119 { background-color: #87ff5f; }
+.ef120 { color: #87ff87; } .eb120 { background-color: #87ff87; }
+.ef121 { color: #87ffaf; } .eb121 { background-color: #87ffaf; }
+.ef122 { color: #87ffd7; } .eb122 { background-color: #87ffd7; }
+.ef123 { color: #87ffff; } .eb123 { background-color: #87ffff; }
+.ef124 { color: #af0000; } .eb124 { background-color: #af0000; }
+.ef125 { color: #af005f; } .eb125 { background-color: #af005f; }
+.ef126 { color: #af0087; } .eb126 { background-color: #af0087; }
+.ef127 { color: #af00af; } .eb127 { background-color: #af00af; }
+.ef128 { color: #af00d7; } .eb128 { background-color: #af00d7; }
+.ef129 { color: #af00ff; } .eb129 { background-color: #af00ff; }
+.ef130 { color: #af5f00; } .eb130 { background-color: #af5f00; }
+.ef131 { color: #af5f5f; } .eb131 { background-color: #af5f5f; }
+.ef132 { color: #af5f87; } .eb132 { background-color: #af5f87; }
+.ef133 { color: #af5faf; } .eb133 { background-color: #af5faf; }
+.ef134 { color: #af5fd7; } .eb134 { background-color: #af5fd7; }
+.ef135 { color: #af5fff; } .eb135 { background-color: #af5fff; }
+.ef136 { color: #af8700; } .eb136 { background-color: #af8700; }
+.ef137 { color: #af875f; } .eb137 { background-color: #af875f; }
+.ef138 { color: #af8787; } .eb138 { background-color: #af8787; }
+.ef139 { color: #af87af; } .eb139 { background-color: #af87af; }
+.ef140 { color: #af87d7; } .eb140 { background-color: #af87d7; }
+.ef141 { color: #af87ff; } .eb141 { background-color: #af87ff; }
+.ef142 { color: #afaf00; } .eb142 { background-color: #afaf00; }
+.ef143 { color: #afaf5f; } .eb143 { background-color: #afaf5f; }
+.ef144 { color: #afaf87; } .eb144 { background-color: #afaf87; }
+.ef145 { color: #afafaf; } .eb145 { background-color: #afafaf; }
+.ef146 { color: #afafd7; } .eb146 { background-color: #afafd7; }
+.ef147 { color: #afafff; } .eb147 { background-color: #afafff; }
+.ef148 { color: #afd700; } .eb148 { background-color: #afd700; }
+.ef149 { color: #afd75f; } .eb149 { background-color: #afd75f; }
+.ef150 { color: #afd787; } .eb150 { background-color: #afd787; }
+.ef151 { color: #afd7af; } .eb151 { background-color: #afd7af; }
+.ef152 { color: #afd7d7; } .eb152 { background-color: #afd7d7; }
+.ef153 { color: #afd7ff; } .eb153 { background-color: #afd7ff; }
+.ef154 { color: #afff00; } .eb154 { background-color: #afff00; }
+.ef155 { color: #afff5f; } .eb155 { background-color: #afff5f; }
+.ef156 { color: #afff87; } .eb156 { background-color: #afff87; }
+.ef157 { color: #afffaf; } .eb157 { background-color: #afffaf; }
+.ef158 { color: #afffd7; } .eb158 { background-color: #afffd7; }
+.ef159 { color: #afffff; } .eb159 { background-color: #afffff; }
+.ef160 { color: #d70000; } .eb160 { background-color: #d70000; }
+.ef161 { color: #d7005f; } .eb161 { background-color: #d7005f; }
+.ef162 { color: #d70087; } .eb162 { background-color: #d70087; }
+.ef163 { color: #d700af; } .eb163 { background-color: #d700af; }
+.ef164 { color: #d700d7; } .eb164 { background-color: #d700d7; }
+.ef165 { color: #d700ff; } .eb165 { background-color: #d700ff; }
+.ef166 { color: #d75f00; } .eb166 { background-color: #d75f00; }
+.ef167 { color: #d75f5f; } .eb167 { background-color: #d75f5f; }
+.ef168 { color: #d75f87; } .eb168 { background-color: #d75f87; }
+.ef169 { color: #d75faf; } .eb169 { background-color: #d75faf; }
+.ef170 { color: #d75fd7; } .eb170 { background-color: #d75fd7; }
+.ef171 { color: #d75fff; } .eb171 { background-color: #d75fff; }
+.ef172 { color: #d78700; } .eb172 { background-color: #d78700; }
+.ef173 { color: #d7875f; } .eb173 { background-color: #d7875f; }
+.ef174 { color: #d78787; } .eb174 { background-color: #d78787; }
+.ef175 { color: #d787af; } .eb175 { background-color: #d787af; }
+.ef176 { color: #d787d7; } .eb176 { background-color: #d787d7; }
+.ef177 { color: #d787ff; } .eb177 { background-color: #d787ff; }
+.ef178 { color: #d7af00; } .eb178 { background-color: #d7af00; }
+.ef179 { color: #d7af5f; } .eb179 { background-color: #d7af5f; }
+.ef180 { color: #d7af87; } .eb180 { background-color: #d7af87; }
+.ef181 { color: #d7afaf; } .eb181 { background-color: #d7afaf; }
+.ef182 { color: #d7afd7; } .eb182 { background-color: #d7afd7; }
+.ef183 { color: #d7afff; } .eb183 { background-color: #d7afff; }
+.ef184 { color: #d7d700; } .eb184 { background-color: #d7d700; }
+.ef185 { color: #d7d75f; } .eb185 { background-color: #d7d75f; }
+.ef186 { color: #d7d787; } .eb186 { background-color: #d7d787; }
+.ef187 { color: #d7d7af; } .eb187 { background-color: #d7d7af; }
+.ef188 { color: #d7d7d7; } .eb188 { background-color: #d7d7d7; }
+.ef189 { color: #d7d7ff; } .eb189 { background-color: #d7d7ff; }
+.ef190 { color: #d7ff00; } .eb190 { background-color: #d7ff00; }
+.ef191 { color: #d7ff5f; } .eb191 { background-color: #d7ff5f; }
+.ef192 { color: #d7ff87; } .eb192 { background-color: #d7ff87; }
+.ef193 { color: #d7ffaf; } .eb193 { background-color: #d7ffaf; }
+.ef194 { color: #d7ffd7; } .eb194 { background-color: #d7ffd7; }
+.ef195 { color: #d7ffff; } .eb195 { background-color: #d7ffff; }
+.ef196 { color: #ff0000; } .eb196 { background-color: #ff0000; }
+.ef197 { color: #ff005f; } .eb197 { background-color: #ff005f; }
+.ef198 { color: #ff0087; } .eb198 { background-color: #ff0087; }
+.ef199 { color: #ff00af; } .eb199 { background-color: #ff00af; }
+.ef200 { color: #ff00d7; } .eb200 { background-color: #ff00d7; }
+.ef201 { color: #ff00ff; } .eb201 { background-color: #ff00ff; }
+.ef202 { color: #ff5f00; } .eb202 { background-color: #ff5f00; }
+.ef203 { color: #ff5f5f; } .eb203 { background-color: #ff5f5f; }
+.ef204 { color: #ff5f87; } .eb204 { background-color: #ff5f87; }
+.ef205 { color: #ff5faf; } .eb205 { background-color: #ff5faf; }
+.ef206 { color: #ff5fd7; } .eb206 { background-color: #ff5fd7; }
+.ef207 { color: #ff5fff; } .eb207 { background-color: #ff5fff; }
+.ef208 { color: #ff8700; } .eb208 { background-color: #ff8700; }
+.ef209 { color: #ff875f; } .eb209 { background-color: #ff875f; }
+.ef210 { color: #ff8787; } .eb210 { background-color: #ff8787; }
+.ef211 { color: #ff87af; } .eb211 { background-color: #ff87af; }
+.ef212 { color: #ff87d7; } .eb212 { background-color: #ff87d7; }
+.ef213 { color: #ff87ff; } .eb213 { background-color: #ff87ff; }
+.ef214 { color: #ffaf00; } .eb214 { background-color: #ffaf00; }
+.ef215 { color: #ffaf5f; } .eb215 { background-color: #ffaf5f; }
+.ef216 { color: #ffaf87; } .eb216 { background-color: #ffaf87; }
+.ef217 { color: #ffafaf; } .eb217 { background-color: #ffafaf; }
+.ef218 { color: #ffafd7; } .eb218 { background-color: #ffafd7; }
+.ef219 { color: #ffafff; } .eb219 { background-color: #ffafff; }
+.ef220 { color: #ffd700; } .eb220 { background-color: #ffd700; }
+.ef221 { color: #ffd75f; } .eb221 { background-color: #ffd75f; }
+.ef222 { color: #ffd787; } .eb222 { background-color: #ffd787; }
+.ef223 { color: #ffd7af; } .eb223 { background-color: #ffd7af; }
+.ef224 { color: #ffd7d7; } .eb224 { background-color: #ffd7d7; }
+.ef225 { color: #ffd7ff; } .eb225 { background-color: #ffd7ff; }
+.ef226 { color: #ffff00; } .eb226 { background-color: #ffff00; }
+.ef227 { color: #ffff5f; } .eb227 { background-color: #ffff5f; }
+.ef228 { color: #ffff87; } .eb228 { background-color: #ffff87; }
+.ef229 { color: #ffffaf; } .eb229 { background-color: #ffffaf; }
+.ef230 { color: #ffffd7; } .eb230 { background-color: #ffffd7; }
+.ef231 { color: #ffffff; } .eb231 { background-color: #ffffff; }
+.ef232 { color: #080808; } .eb232 { background-color: #080808; }
+.ef233 { color: #121212; } .eb233 { background-color: #121212; }
+.ef234 { color: #1c1c1c; } .eb234 { background-color: #1c1c1c; }
+.ef235 { color: #262626; } .eb235 { background-color: #262626; }
+.ef236 { color: #303030; } .eb236 { background-color: #303030; }
+.ef237 { color: #3a3a3a; } .eb237 { background-color: #3a3a3a; }
+.ef238 { color: #444444; } .eb238 { background-color: #444444; }
+.ef239 { color: #4e4e4e; } .eb239 { background-color: #4e4e4e; }
+.ef240 { color: #585858; } .eb240 { background-color: #585858; }
+.ef241 { color: #626262; } .eb241 { background-color: #626262; }
+.ef242 { color: #6c6c6c; } .eb242 { background-color: #6c6c6c; }
+.ef243 { color: #767676; } .eb243 { background-color: #767676; }
+.ef244 { color: #808080; } .eb244 { background-color: #808080; }
+.ef245 { color: #8a8a8a; } .eb245 { background-color: #8a8a8a; }
+.ef246 { color: #949494; } .eb246 { background-color: #949494; }
+.ef247 { color: #9e9e9e; } .eb247 { background-color: #9e9e9e; }
+.ef248 { color: #a8a8a8; } .eb248 { background-color: #a8a8a8; }
+.ef249 { color: #b2b2b2; } .eb249 { background-color: #b2b2b2; }
+.ef250 { color: #bcbcbc; } .eb250 { background-color: #bcbcbc; }
+.ef251 { color: #c6c6c6; } .eb251 { background-color: #c6c6c6; }
+.ef252 { color: #d0d0d0; } .eb252 { background-color: #d0d0d0; }
+.ef253 { color: #dadada; } .eb253 { background-color: #dadada; }
+.ef254 { color: #e4e4e4; } .eb254 { background-color: #e4e4e4; }
+.ef255 { color: #eeeeee; } .eb255 { background-color: #eeeeee; }
+
+.f9 { color: #000000; }
+.b9 { background-color: #FFFFFF; }
+.f9 > .bold,.bold > .f9, body.f9 > pre > .bold {
+  /* Bold is heavy black on white, or bright white
+     depending on the default background */
+  color: #000000;
+  font-weight: bold;
+}
+.reverse {
+  /* CSS does not support swapping fg and bg colours unfortunately,
+     so just hardcode something that will look OK on all backgrounds. */
+  color: #000000; background-color: #AAAAAA;
+}
+.underline { text-decoration: underline; }
+.line-through { text-decoration: line-through; }
+.blink { text-decoration: blink; }
+
+/* Avoid pixels between adjacent span elements.
+   Note this only works for lines less than 80 chars
+   where we close span elements on the same line.
+span { display: inline-block; }
+*/
+</style>
+</head>
+
+<body class="f9 b9">
+<pre>
+Hello World!!!
+Resources:
+<span class="bold">procs</span> <span class="bold"><span class="f6">-----------memory----------</span></span> <span class="bold"><span class="f5">---swap--</span></span> <span class="bold"><span class="f4">-----io----</span></span> <span class="bold"><span class="f2">-system--</span></span> <span class="bold"><span class="f1">------cpu-----
+</span></span> r  b   <span class="f6"><span class="bold">swpd   free   buff  cache</span></span>   <span class="f5"><span class="bold">si   so</span></span>    <span class="f4"><span class="bold">bi    bo</span></span>   <span class="f2"><span class="bold">in   cs</span></span> <span class="f1"><span class="bold">us sy id wa st
+</span></span> 1  0      <span class="f6"><span class="bold">0  12684     95   1379</span></span>    <span class="f5"><span class="bold">0    0</span></span>    <span class="f4"><span class="bold">49    16</span></span>  <span class="f2"><span class="bold">139  237</span></span>  <span class="f1"><span class="bold">1  0 98  1  0
+</span></span>Addresses:
+<span class="f7"><span class="bold">1</span></span>: <span class="bold"><span class="f6">lo</span></span>: &lt;<span class="f6">LOOPBACK,UP,LOWER_UP</span>&gt; mtu 65536 qdisc noqueue state <span class="f6">UNKNOWN</span> group default qlen 1000
+    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
+    inet <span class="bold"><span class="f3">127.0.0.1</span></span>/<span class="bold"><span class="f5">8</span></span> scope host lo
+       valid_lft forever preferred_lft forever
+    inet6 <span class="f3">::1</span>/<span class="f5">128</span> scope host 
+       valid_lft forever preferred_lft forever
+<span class="f7"><span class="bold">2</span></span>: <span class="bold"><span class="f2">enp8s0</span></span>: &lt;<span class="f6">BROADCAST,MULTICAST,UP,LOWER_UP</span>&gt; mtu 1500 qdisc fq_codel state <span class="bold"><span class="f2">UP</span></span> group default qlen 1000
+    link/ether <span class="f5">d4:5d:64:7c:3c:14</span> brd ff:ff:ff:ff:ff:ff
+    inet <span class="bold"><span class="f3">192.168.1.151</span></span>/<span class="bold"><span class="f5">24</span></span> brd 192.168.1.255 scope global dynamic noprefixroute enp8s0
+       valid_lft 84690sec preferred_lft 84690sec
+    inet6 <span class="f3">fe80::cfeb:886a:b9ef:2dab</span>/<span class="f5">64</span> scope link noprefixroute 
+       valid_lft forever preferred_lft forever
+<span class="f7"><span class="bold">5</span></span>: <span class="bold"><span class="f2">docker0</span></span>: &lt;<span class="f6">BROADCAST,MULTICAST,UP,LOWER_UP</span>&gt; mtu 1500 qdisc noqueue state <span class="bold"><span class="f2">UP</span></span> group default 
+    link/ether <span class="f5">02:42:26:2b:4e:e2</span> brd ff:ff:ff:ff:ff:ff
+    inet <span class="bold"><span class="f3">172.17.0.1</span></span>/<span class="bold"><span class="f5">16</span></span> brd 172.17.255.255 scope global docker0
+       valid_lft forever preferred_lft forever
+    inet6 <span class="f3">fe80::42:26ff:fe2b:4ee2</span>/<span class="f5">64</span> scope link 
+       valid_lft forever preferred_lft forever
+<span class="f7"><span class="bold">7</span></span>: <span class="bold"><span class="f2">veth0336d19@if6</span></span>: &lt;<span class="f6">BROADCAST,MULTICAST,UP,LOWER_UP</span>&gt; mtu 1500 qdisc noqueue master <span class="f7 b4">docker0</span> state <span class="bold"><span class="f2">UP</span></span> group default 
+    link/ether <span class="f5">82:d5:b1:9d:8d:24</span> brd ff:ff:ff:ff:ff:ff link-netnsid 0
+    inet6 <span class="f3">fe80::80d5:b1ff:fe9d:8d24</span>/<span class="f5">64</span> scope link 
+       valid_lft forever preferred_lft forever
+PING <span class="f4">google.com</span> (<span class="f4"><span class="bold">172.217.10.142</span></span>) 56(84) bytes of data.
+64 bytes from <span class="f4">lga34s16-in-f14.1e100.net</span> (<span class="f4"><span class="bold">172.217.10.142</span></span>): icmp_seq=<span class="f3">1</span> ttl=<span class="f5">118</span> time=<span class="bold"><span class="f2">3.42</span></span><span class="f2"> ms</span>
+
+<span class="bold">--- <span class="f4">google.com</span> ping statistics ---</span>
+1 packets transmitted, 1 received, <span class="f2">0% packet loss</span>, time <span class="bold"><span class="f2">0</span></span><span class="f2">ms</span>
+rtt <span class="f3"><span class="bold">min</span></span>/<span class="f4"><span class="bold">avg</span></span>/<span class="f1"><span class="bold">max</span></span>/<span class="f5"><span class="bold">mdev</span></span> = <span class="f3"><span class="bold">3.416</span></span>/<span class="f4"><span class="bold">3.416</span></span>/<span class="f1"><span class="bold">3.416</span></span>/<span class="f5"><span class="bold">0.000</span></span><span class="f2"> ms</span>
+</pre>
+</body>
+</html>
diff --git a/colorexample/hola.txt b/colorexample/hola.txt
new file mode 100644 (file)
index 0000000..8d01d4e
--- /dev/null
@@ -0,0 +1,34 @@
+Hello World!!!
+Resources:
+\e[0m\e[1mprocs\e[0m\e[0m \e[0m\e[1m\e[36m-----------memory----------\e[0m\e[0m \e[0m\e[1m\e[35m---swap--\e[0m\e[0m \e[0m\e[1m\e[34m-----io----\e[0m\e[0m \e[0m\e[1m\e[32m-system--\e[0m\e[0m \e[0m\e[1m\e[31m------cpu-----\e[0m
+\e[0m\e[0m r  b   \e[0m\e[36;96mswpd   free   buff  cache\e[0m\e[0m   \e[0m\e[35;95msi   so\e[0m\e[0m    \e[0m\e[34;94mbi    bo\e[0m\e[0m   \e[0m\e[32;92min   cs\e[0m\e[0m \e[0m\e[31;91mus sy id wa st\e[0m
+\e[0m\e[0m 1  0      \e[0m\e[36;96m0  12684     95   1379\e[0m\e[0m    \e[0m\e[35;95m0    0\e[0m\e[0m    \e[0m\e[34;94m49    16\e[0m\e[0m  \e[0m\e[32;92m139  237\e[0m\e[0m  \e[0m\e[31;91m1  0 98  1  0\e[0m
+Addresses:
+\e[0m\e[37;97m1\e[0m\e[0m: \e[0m\e[1m\e[36mlo\e[0m\e[0m: <\e[0m\e[36mLOOPBACK,UP,LOWER_UP\e[0m\e[0m> mtu 65536 qdisc noqueue state \e[0m\e[36mUNKNOWN\e[0m group default qlen 1000\e[0m
+\e[0m    link/loopback 00:00:00:00:00:00 \e[0m\e[0mbrd \e[0m\e[2m00:00:00:00:00:00\e[0m
+\e[0m    \e[0m\e[0minet \e[0m\e[1m\e[33m127.0.0.1\e[0m\e[0m/\e[0m\e[1m\e[35m8\e[0m scope host lo\e[0m
+\e[0m       valid_lft forever preferred_lft forever\e[0m
+\e[0m    \e[0m\e[0minet6 \e[0m\e[33m::1\e[0m\e[0m/\e[0m\e[35m128\e[0m scope host \e[0m
+\e[0m       valid_lft forever preferred_lft forever\e[0m
+\e[0m\e[37;97m2\e[0m\e[0m: \e[0m\e[1m\e[32menp8s0\e[0m\e[0m: <\e[0m\e[36mBROADCAST,MULTICAST,UP,LOWER_UP\e[0m\e[0m> mtu 1500 qdisc fq_codel state \e[0m\e[1m\e[32mUP\e[0m group default qlen 1000\e[0m
+\e[0m    \e[0m\e[0mlink/ether \e[0m\e[35md4:5d:64:7c:3c:14\e[0m\e[0m brd \e[0m\e[2mff:ff:ff:ff:ff:ff\e[0m
+\e[0m    \e[0m\e[0minet \e[0m\e[1m\e[33m192.168.1.151\e[0m\e[0m/\e[0m\e[1m\e[35m24\e[0m \e[0m\e[0mbrd \e[0m\e[2m192.168.1.255 \e[0mscope global dynamic noprefixroute enp8s0\e[0m
+\e[0m       valid_lft 84690sec preferred_lft 84690sec\e[0m
+\e[0m    \e[0m\e[0minet6 \e[0m\e[33mfe80::cfeb:886a:b9ef:2dab\e[0m\e[0m/\e[0m\e[35m64\e[0m scope link noprefixroute \e[0m
+\e[0m       valid_lft forever preferred_lft forever\e[0m
+\e[0m\e[37;97m5\e[0m\e[0m: \e[0m\e[1m\e[32mdocker0\e[0m\e[0m: <\e[0m\e[36mBROADCAST,MULTICAST,UP,LOWER_UP\e[0m\e[0m> mtu 1500 qdisc noqueue state \e[0m\e[1m\e[32mUP\e[0m group default \e[0m
+\e[0m    \e[0m\e[0mlink/ether \e[0m\e[35m02:42:26:2b:4e:e2\e[0m\e[0m brd \e[0m\e[2mff:ff:ff:ff:ff:ff\e[0m
+\e[0m    \e[0m\e[0minet \e[0m\e[1m\e[33m172.17.0.1\e[0m\e[0m/\e[0m\e[1m\e[35m16\e[0m \e[0m\e[0mbrd \e[0m\e[2m172.17.255.255 \e[0mscope global docker0\e[0m
+\e[0m       valid_lft forever preferred_lft forever\e[0m
+\e[0m    \e[0m\e[0minet6 \e[0m\e[33mfe80::42:26ff:fe2b:4ee2\e[0m\e[0m/\e[0m\e[35m64\e[0m scope link \e[0m
+\e[0m       valid_lft forever preferred_lft forever\e[0m
+\e[0m\e[37;97m7\e[0m\e[0m: \e[0m\e[1m\e[32mveth0336d19@if6\e[0m\e[0m: <\e[0m\e[36mBROADCAST,MULTICAST,UP,LOWER_UP\e[0m\e[0m> mtu 1500 qdisc noqueue master \e[0m\e[44m\e[37mdocker0\e[0m\e[0m state \e[0m\e[1m\e[32mUP\e[0m group default \e[0m
+\e[0m    \e[0m\e[0mlink/ether \e[0m\e[35m82:d5:b1:9d:8d:24\e[0m\e[0m brd \e[0m\e[2mff:ff:ff:ff:ff:ff link-netn\e[0msid 0\e[0m
+\e[0m    \e[0m\e[0minet6 \e[0m\e[33mfe80::80d5:b1ff:fe9d:8d24\e[0m\e[0m/\e[0m\e[35m64\e[0m scope link \e[0m
+\e[0m       valid_lft forever preferred_lft forever\e[0m
+\e[0m\e[0mPING \e[0m\e[34mgoogle.com\e[0m\e[0m \e[0m(\e[0m\e[34;94m172.217.10.142\e[0m) 56(84) bytes of data.\e[0m
+\e[0m64 bytes \e[0m\e[0mfrom \e[0m\e[34mlga34s16-in-f14.1e100.net\e[0m\e[0m \e[0m(\e[0m\e[34;94m172.217.10.142\e[0m): \e[0m\e[0micmp_seq=\e[0m\e[33m1\e[0m \e[0m\e[0mttl=\e[0m\e[35m118\e[0m time=\e[0m\e[1m\e[32m3.42\e[0m\e[32m ms\e[0m
+\e[0m
+\e[0m\e[1m--- \e[0m\e[1m\e[34mgoogle.com\e[0m\e[1m ping statistics ---\e[0m
+\e[0m1 packets transmitted, 1 received, \e[0m\e[32m0% packet loss\e[0m, time \e[0m\e[1m\e[32m0\e[0m\e[32mms\e[0m
+\e[0m\e[0mrtt \e[0m\e[33;93mmin\e[0m\e[0m/\e[0m\e[34;94mavg\e[0m\e[0m/\e[0m\e[31;91mmax\e[0m\e[0m/\e[0m\e[35;95mmdev\e[0m \e[0m\e[0m= \e[0m\e[33;93m3.416\e[0m\e[0m/\e[0m\e[34;94m3.416\e[0m\e[0m/\e[0m\e[31;91m3.416\e[0m\e[0m/\e[0m\e[35;95m0.000\e[0m\e[32m ms\e[0m
diff --git a/colorexample/startserver.sh b/colorexample/startserver.sh
new file mode 100755 (executable)
index 0000000..67a26a3
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; sh test.sh; } | nc -l 1234 -q 1; done &
+
diff --git a/colorexample/test.sh b/colorexample/test.sh
new file mode 100755 (executable)
index 0000000..70a1a34
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#echo -e 'HTTP/1.1 200 OK\r\n'
+
+#echo "************PRINT SOME TEXT***************\n"
+
+echo "Hello World!!!" > hola.txt
+
+#echo "\n"
+
+echo "Resources:" >> hola.txt
+
+grc --colour=on vmstat -S M >> hola.txt
+
+#echo "\n"
+
+echo "Addresses:" >> hola.txt
+
+echo "$(grc --colour=on ip addr)" >> hola.txt
+
+#echo "\n"
+
+grc --colour=on ping -c 1 google.com >> hola.txt
+cat hola.txt | ./ansi2html.sh > hola.html
+echo "$(cat hola.html)"
+