<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ttyrec on David Hamp-Gonsalves</title><link>https://davidhampgonsalves.com/tags/ttyrec/</link><description>Recent content in Ttyrec on David Hamp-Gonsalves</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 07 Apr 2015 00:00:00 +0000</lastBuildDate><atom:link href="https://davidhampgonsalves.com/tags/ttyrec/index.xml" rel="self" type="application/rss+xml"/><item><title>Terminal GIFs on OSX</title><link>https://davidhampgonsalves.com/terminal-gifs-on-osx/</link><pubDate>Tue, 07 Apr 2015 00:00:00 +0000</pubDate><guid>https://davidhampgonsalves.com/terminal-gifs-on-osx/</guid><description>&lt;p&gt;Using Gifs for terminal explanations and usages aren&amp;rsquo;t new and exciting anymore but they are still useful. This is how to create them quickly on OSX.&lt;/p&gt;
&lt;h2 id="install"&gt;Install&lt;/h2&gt;
&lt;p&gt;The tool we will use to capture our gif &lt;a href="https://github.com/icholy/ttygif"&gt;ttygif&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;brew install imagemagick ttyrec
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;brew install https&lt;span style="color:#ae81ff"&gt;\:&lt;/span&gt;//raw.githubusercontent.com/icholy/ttygif/master/ttygif.rb
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="gif"&gt;Gif&lt;/h2&gt;
&lt;p&gt;The process of creating the gif is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;ttyrec&lt;/code&gt; which records your terminal session as series of &lt;code&gt;png&lt;/code&gt; files.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;ttygif&lt;/code&gt; to convert the &lt;code&gt;png&lt;/code&gt; files to small &lt;code&gt;gifs&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Concat the &lt;code&gt;gif&lt;/code&gt; files using the concat script.&lt;/li&gt;
&lt;li&gt;Edit the final &lt;code&gt;gif&lt;/code&gt; using whatever tool or online site you like.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#creates series pngs(type exit to finish recording)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ttyrec recording-name
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#convert png -&amp;gt; gif(-f disables cropping)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ttygif recording-name -f
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#concat gif parts into final product&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;concat_osx.sh recording-name.gif
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id="example"&gt;Example&lt;/h1&gt;
&lt;p&gt;&lt;img src="https://davidhampgonsalves.com/images/terminal-gif-example.gif" alt=""&gt;&lt;/p&gt;</description></item></channel></rss>