我想对一些终端输出进行全屏复制,使用 ANSI 颜色,并生成 HTML,以便我可以发布到博客或 wiki。
我的真实世界示例:我想记录top所有 ANSI 颜色的优点。(我宁愿不做位图截图。文本更有效。)想法?
我从: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
Run Code Online (Sandbox Code Playgroud)