linux:ansi2html

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
linux:ansi2html [2022/10/02 03:05] – [ansi2html に処理結果をパイプする場合は '--color=auto' ではなく '--color=always' を指定する] ともやんlinux:ansi2html [2025/04/06 10:46] (現在) – [インストール] ともやん
行 8: 行 8:
  
 ===== インストール ===== ===== インストール =====
-**ansi2html** コマンドは **colorized-logs** または **python3-ansi2html** パッケージに含まれています😊**pipetty** コマンドなども必要な場合は **colorized-logs** パッケージをインストールする。\\+**ansi2html** コマンドは **colorized-logs** または **python3-ansi2html** パッケージに含まれています😊\\ 
 +**pipetty** コマンドなども必要な場合は **colorized-logs** パッケージをインストールする。\\
  
 **Fedora**\\ **Fedora**\\
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<span class=GRN>$</span> dnf provides ansi2html+<font color="#0087FF"><b>$</b></font> <font color="#26A269">dnf</font> provides ansi2html
 </pre></html></WRAP> </pre></html></WRAP>
-<WRAP color_result min-width_600><html><pre>+<WRAP color_result><html><pre>
 Last metadata expiration check: 6 days, 8:00:19 ago on 2021年03月24日 02時11分04秒. Last metadata expiration check: 6 days, 8:00:19 ago on 2021年03月24日 02時11分04秒.
 colorized-logs-2.5-4.fc33.x86_64 : Tools for logs with ANSI color colorized-logs-2.5-4.fc33.x86_64 : Tools for logs with ANSI color
行 33: 行 34:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<span class=GRN>$</span> sudo dnf install colorized-logs -y+<font color="#0087FF"><b>$</b></font> <font color="#26A269"><u style="text-decoration-style:solid">sudo</u></font> <font color="#26A269">dnf</font> install <font color="#A347BA">-y</font> colorized-logs
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result_long min-width_600><html><pre> <WRAP color_result_long min-width_600><html><pre>
行 74: 行 75:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<span class=GRN>$</span> apt-file search ansi2html+<font color="#AFFF00"><b>$</b></font> <font color="#26A269">apt-file</font> search ansi2html
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
行 84: 行 85:
  
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<span class=GRN>$</span> sudo apt install colorized-logs -y +<font color="#AFFF00"><b>$</b></font> <font color="#26A269"><u style="text-decoration-style:solid">sudo</u></font> <font color="#26A269">apt</font> install <font color="#A347BA">-y</font> colorized-logs 
-</pre</html></WRAP>+</pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
 Reading package lists... Done Reading package lists... Done
行 119: 行 120:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<span class=GRN>$</span> dmesg --color=always | ansi2html > dmesg.html +<font color="#0087FF"><b>$</b></font> <font color="#26A269">dmesg</font> <font color="#A347BA">--color=always</font> <font color="#2A7BDE"><b>|</b></font> <font color="#26A269">ansi2html</font> <font color="#2A7BDE"><b>&gt;</b></font> dmesg.html 
-</pre</html></WRAP>+</pre></html></WRAP>
 <WRAP color_result_long><html><pre> <WRAP color_result_long><html><pre>
 <span class=GRN>   0.000000] </span>Linux version 5.4.91-microsoft-standard-WSL2 (oe-user@oe-host) (gcc version 9.3.0 (GCC)) #1 SMP Mon Jan 25 18:39:31 UTC 2021 <span class=GRN>   0.000000] </span>Linux version 5.4.91-microsoft-standard-WSL2 (oe-user@oe-host) (gcc version 9.3.0 (GCC)) #1 SMP Mon Jan 25 18:39:31 UTC 2021
行 530: 行 531:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<span class=GRN>$</span> pipetty make -C build | ansi2html | tee build.html+<font color="#0087FF"><b>$</b></font> <font color="#26A269">pipetty</font> make <font color="#A347BA">-C</font> build <font color="#2A7BDE"><b>|</b></font> <font color="#26A269">ansi2html</font> <font color="#2A7BDE"><b>|</b></font> <font color="#26A269">tee</font> build.html
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result_long><html><pre> <WRAP color_result_long><html><pre>
行 1036: 行 1037:
 </WRAP> </WRAP>
  
-<WRAP mincode_long><code html fedora_ls-al.html>+<WRAP color_term> 
 +<WRAP color_mincode_long><code html fedora_ls-al.html>
 <!DOCTYPE html> <!DOCTYPE html>
 <html> <html>
行 1103: 行 1105:
 </html> </html>
 </code></WRAP> </code></WRAP>
 +</WRAP>
 +
  
 ===== 小枝🤤 画面出力と同時に ansi2html で HTML ファイルにも同時出力する🤔 ===== ===== 小枝🤤 画面出力と同時に ansi2html で HTML ファイルにも同時出力する🤔 =====
行 1292: 行 1296:
 <span class=GRN>$</span> cat ls-l.html <span class=GRN>$</span> cat ls-l.html
 </pre></html></WRAP> </pre></html></WRAP>
-<WRAP color_result_long><code css>+<WRAP color_mincode_long><code javascript>
 <!DOCTYPE html> <!DOCTYPE html>
 <html> <html>
行 1363: 行 1367:
 </WRAP> </WRAP>
  
-==== スタイル一覧 ====+===== スタイル一覧 =====
 <html> <html>
   <style>   <style>
行 1434: 行 1438:
 </WRAP> </WRAP>
 </WRAP> </WRAP>
 +
 +<WRAP color_term>
 +<WRAP color_mincode><html><pre>
 +<b class=BSc>
 +&lt;b class=BSc>
 +</b>
 +<b class=BScBLU>
 +&lt;span class=BScBLU>
 +</b>
 +<b class=BScHGRY>
 +&lt;b class=BScHGRY>
 +</b>
 +<b class=BScINDG>
 +&lt;b class=BScINDG>
 +</b>
 +</pre></html></WRAP>
 +</WRAP>
 +
 ※ ansi2html オリジナルカラーから当サイトテーマ用にアレンジしています🤔\\ ※ ansi2html オリジナルカラーから当サイトテーマ用にアレンジしています🤔\\
 +
 +==== Dokuwiki 雛形 ====
 +<WRAP color_term>
 +<WRAP color_mincode><code html>
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<b class=GRN>$</b> <b class=HIY>command</b> subcommand <b class=HIK>--options</b> <b class=DiYE>...</b>
 +</pre></html></WRAP>
 +
 +<WRAP color_result><html><pre>
 +</pre></html></WRAP>
 +
 +<WRAP color_result_long><html><pre>
 +</pre></html></WRAP>
 +
 +<WRAP color_mincode><html><pre>
 +</pre></html></WRAP>
 +
 +<WRAP color_mincode_long><html><pre>
 +</pre></html></WRAP>
 +</WRAP>
 +</code></WRAP>
 +</WRAP>
 +
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<b class=GRN>$</b> <b class=HIY>command</b> subcommand <b class=HIK>--options</b> <b class=DiYE>...</b>
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 +</pre></html></WRAP>
 +</WRAP>
 +
 +<WRAP color_term>
 +<WRAP color_mincode><code html>
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +(pyJupyterLab) <b class=GRN>$</b> <b class=HIY>pip</b> install jupyterlab-nvdashboard
 +</pre></html></WRAP>
 +
 +<WRAP color_result><html><pre>
 +...
 +  Downloading https://www.piwheels.org/simple/bokeh/bokeh-2.4.3-py3-none-any.whl (18.5 MB)
 +     <b class=PipBAR>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</b> <b class=GRN>18.5/18.5 MB</b> <b class=RED>130.2 kB/s</b> eta <b class=CYN>0:00:00</b>
 +</pre></html></WRAP>
 +</WRAP>
 +</code></WRAP>
 +</WRAP>
 +
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +(pyJupyterLab) <b class=GRN>$</b> <b class=HIY>pip</b> install jupyterlab-nvdashboard
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 +...
 +  Downloading https://www.piwheels.org/simple/bokeh/bokeh-2.4.3-py3-none-any.whl (18.5 MB)
 +     <b class=PipBAR>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</b> <b class=GRN>18.5/18.5 MB</b> <b class=RED>130.2 kB/s</b> eta <b class=CYN>0:00:00</b>
 +</pre></html></WRAP>
 +</WRAP>
  
 ===== ansi2html に処理結果をパイプする場合は '--color=auto' ではなく '--color=always' を指定する ===== ===== ansi2html に処理結果をパイプする場合は '--color=auto' ではなく '--color=always' を指定する =====
行 1440: 行 1520:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<span class=GRN>$</span> alias+<class=GRN>$</b> <b class=HIY>alias</b>
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
行 1459: 行 1539:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<span class=GRN>$</span> ls -l | cat+<class=GRN>$</b> <b class=HIY>ls</b> <b class=HIK>-l</b> <b class=HIY>cat</b>
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
行 1501: 行 1581:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<span class=GRN>$</span> ls -l --color=always | cat+<span class=GRN>$</span> <b class=HIY>ls</b> <b class=HIK>-l --color=always</b> <b class=HIY>cat</b>
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
  • linux/ansi2html.1664647527.txt.gz
  • 最終更新: 2022/10/02 03:05
  • by ともやん