Opened 7 years ago

Last modified 6 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


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 : next to 'Entering directory' after a little digging I found 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 6 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.