<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>susisu</author_name>
  <author_url>https://blog.hatena.ne.jp/susisu/</author_url>
  <blog_title>Object.create(null)</blog_title>
  <blog_url>https://susisu.hatenablog.com/</blog_url>
  <categories>
    <anon>プログラミング</anon>
    <anon>小ネタ</anon>
  </categories>
  <description>みなさんも生きていればコマンドの出力をブログに貼り付けたいということがあるでしょう. というわけでコマンド出力をなんとか HTML にして貼り付ける方法のご紹介です. TL; DR: script -q /dev/null &lt;command&gt; | ansi2html -i | pbcopy まず HTML は基本的には以下のような形で良いはずです. 色とかフォントとかは適当に変えたければ変える. &lt;pre style=&quot;color:#CCC;background-color:#000&quot;&gt; &lt;!-- ここにコマンドの出力を貼り付ける --&gt; &lt;/pre&gt; 例えば ls の結果を貼り付けたいとする…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsusisu.hatenablog.com%2Fentry%2F2019%2F01%2F24%2F032045&quot; title=&quot;コマンドの出力を HTML に変換して貼り付ける - Object.create(null)&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-01-24 03:20:45</published>
  <title>コマンドの出力を HTML に変換して貼り付ける</title>
  <type>rich</type>
  <url>https://susisu.hatenablog.com/entry/2019/01/24/032045</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
