Opened 7 years ago

Last modified 5 years ago

#906 new enhancement

please offer a way to pipe shell output in 'i/o view' through external tool

Reported by: dothebart Owned by:
Priority: patches-accepted Milestone: 0.9.+
Version: master Keywords: web, mq
Cc:

Description

depending on the shell environment, tools can create escape sequence to colorize the output of commands. The current effect can for example be viewed at : http://ns-regression.ee.washington.edu:8010/builders/fc10-g%2B%2B-4.4.0/builds/629/steps/shell_18/logs/stdio next to 'Entering directory' after a little digging I found http://www.andre-simon.de/zip/ansifilter-1.3.tar.bz2 which can create corrosponding HTML tags for those Ansi sequences; (it can also just remove them, like a simple regex also could)

#generate some file with escape sequences...

ls --color=always >/tmp/bla

#make them colored in html:

cat /tmp/bla |./ansifilter -H --fragment

<span style="font-weight:bold;color:#008000; background-color:#ffffff;">ansifilter</span>* (an executable file...)

platform_fs.o (an ordinary file...)

<span style="font-weight:bold;color:#000080; background-color:#ffffff;">qt-gui</span>/ (a directory)

--fragment makes it not print an html head/tail.

Change History (3)

comment:1 Changed 7 years ago by dustin

  • Keywords shell escaping markup removed
  • Milestone changed from undecided to 0.8.+

comment:2 Changed 7 years ago by dustin

  • Keywords web added

comment:3 Changed 5 years ago by dustin

  • Keywords mq added
  • Milestone changed from 0.8.+ to 0.9.+

We could probably do this with a command-line client in the brave new mq world..

Note: See TracTickets for help on using tickets.