展示 lsix在mlterm lsix在uterm Photo from Unsplash 前言 你可能认为Linux终端就是枯燥的字符组成的,但实际上,如果你的终端支持的话它可以展示图片,lsix就是这样一个工具,同时由于其自身只是一个Shell脚本,因此其具有广泛的兼容性。 安装 其自身是一个Shell脚本,因此,直接复制到PATH并赋予权限即可。 使用wget安装: wget https://raw.githubusercontent.com/hackerb9/lsix/master/lsix && \ sudo mv lsix /usr/local/bin && \ sudo chmod +x /usr/local/bin/lsix 使用cURL安装: curl https://raw.githubusercontent.com/hackerb9/lsix/master/lsix > lsix && \ sudo mv lsix /usr/local/bin && \ sudo chmod +x /usr/local/bin/lsix 使用 cd到图片目录,执行lsix即可 无法输出图像 如果打印出这样的提示: Error: Your terminal does not report having sixel graphics support. Please use a sixel capable terminal, such as xterm -ti vt340, or ask your terminal manufacturer to add sixel support. You may test your terminal by viewing a single image, like so: convert foo.jpg -geometry 800x480 sixel:- If your terminal actually does support sixel, please file a bug report at http://github.com/hackerb9/lsix/issues Please mention device attribute codes: ^[[?65;1;9c 表明你的终端类型不支持Sixel协议,可以使用XTerm(需要设置终端类型),使用: ...
第一篇文章
Test Test html <svg width="80" height="80" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg"> <style> /* 动画关键帧 */ @keyframes rotate { 100% { transform: rotate(360deg); } } /* 轨迹样式 */ .track { stroke: #eee; fill: none; } /* 动画路径样式 */ .spin { stroke: #3f51b5; stroke-linecap: round; fill: none; animation: rotate 0.475s linear infinite; transform-origin: 50% 50%; } </style> <!-- 背景轨迹 --> <circle class="track" cx="19" cy="19" r="15" stroke-width="1"/> <!-- 动画路径 --> <circle class="spin" cx="19" cy="19" r="15" stroke-width="3" stroke-dasharray="25 500" stroke-dashoffset="0.2"/> </svg> end