Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to do a full screen copy of some terminal output, with ANSI colors, and generate HTML so I can post to a blog or wiki.

My real world example: I want to document top with all of its ANSI color goodness. (I'd rather not do a bitmap screenshot. Text is more efficient.) Ideas?

share|improve this question
1  
See Converting colored output into html at our Stack Exchange sister site, Unix & Linux. –  Michael Hampton Oct 8 '12 at 18:16
    
@MichaelHampton Thanks, that is helpful –  David James Oct 8 '12 at 18:25
1  
Shouldn't this be on superuser? –  Alexander Janssen Oct 8 '12 at 18:36
    
This probably belongs on unix.stackexchange.com -- which I just heard about today! -- as mentioned above. –  David James Oct 8 '12 at 18:42
add comment

closed as off topic by Michael Hampton, mdpc, SvW, RobM, EEAA Oct 29 '12 at 1:37

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

I got this idea from: http://www.linuxquestions.org/questions/linux-desktop-74/preserve-colors-when-copy-pasting-from-terminal-943213/

sudo apt-get install aha
timestamp=$(date +%Y%m%d-%H%M%S)
top -n 1 | aha > top-$timestamp.html
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.