<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Posts about CLI</title><link>https://chriswarrick.com/</link><atom:link href="https://chriswarrick.com/blog/tags/cli.xml" rel="self" type="application/rss+xml" /><description>A rarely updated blog, mostly about programming.</description><lastBuildDate>Mon, 06 Jul 2015 12:30:00 GMT</lastBuildDate><generator>https://github.com/Kwpolska/YetAnotherBlogGenerator</generator><item><title>New project: upass — console UI for pass</title><dc:creator>Chris Warrick</dc:creator><link>https://chriswarrick.com/blog/2015/07/06/upass/</link><pubDate>Mon, 06 Jul 2015 12:30:00 GMT</pubDate><guid>https://chriswarrick.com/blog/2015/07/06/upass/</guid><description>
pass is the standard Unix password manager.
And I just wrote a slightly friendlier, clickier interface with urwid and
Python.
</description><content:encoded><![CDATA[
<p><a class="reference external" href="http://www.passwordstore.org/">pass</a> is the standard Unix password manager.
And I just wrote a slightly friendlier, clickier interface with urwid and
Python.</p>



<p style="text-align: center; clear: both;">
<a href="https://chriswarrick.com/projects/upass/" class="btn btn-primary" style="width: 250px;">
<i class="bi bi-info-circle"></i>
Project page
</a>
</p>
<p style="text-align: center; clear: both;">
<a href="https://chriswarrick.com/galleries/upass/" class="btn btn-secondary" style="width: 250px;">
<i class="bi bi-image"></i>
Screenshots
</a>
</p>
<p style="text-align: center; clear: both;">
<a href="https://github.com/Kwpolska/upass" class="btn btn-secondary" style="width: 250px;">
<i class="bi bi-github"></i>
GitHub
</a>
</p>
<p style="text-align: center; clear: both;">
<a href="https://pypi.python.org/pypi/upass" class="btn btn-secondary" style="width: 250px;">
<i class="bi bi-download"></i>
Downloads (PyPI)
</a>
</p><p><code class="docutils literal">upass</code> is using urwid, which means it has a friendly full-screen console
interface.  It shows your directory structure (with flattened subdirectories)
and calls <code class="docutils literal">pass</code> when requested.  (It does not use <code class="docutils literal">pass <span class="pre">-c</span></code> due to
subprocessing issues, instead opting for a manual copy — note that the
clipboard <strong>will not be cleared</strong>).</p>
<p>If you want to see how it looks, check out <a class="reference external" href="https://chriswarrick.com/galleries/upass/">the screenshots gallery</a>.</p>
<p><code class="docutils literal">upass</code> is under development (and was initially written in one evening).  If you have
ideas, bugs, or want to help, hop over to the <a class="reference external" href="https://github.com/Kwpolska/upass">GitHub page</a>.</p>
<p>You can install <code class="docutils literal">upass</code> from <a class="reference external" href="https://pypi.python.org/pypi/upass">PyPI</a> (with <code class="docutils literal">pip install upass</code>). Arch Linux
users can install the <code class="docutils literal">upass</code> package from the AUR.</p>
]]></content:encoded><category>Python</category><category>app</category><category>CLI</category><category>Linux</category><category>password</category><category>projects</category><category>Python</category><category>upass</category></item><item><title>New project: think (Terminal Think Music)</title><dc:creator>Chris Warrick</dc:creator><link>https://chriswarrick.com/blog/2015/05/30/think/</link><pubDate>Sat, 06 Jun 2015 12:15:00 GMT</pubDate><guid>https://chriswarrick.com/blog/2015/05/30/think/</guid><description>
Are you executing a process that takes a long time?  Do you want to know that it’s
still working while you are in another terminal/making coffee?  Do you have a
favorite game show tune to play while doing something?
If yes: think is just for you.  For more details, read on or hop onto the GitHub page.
</description><content:encoded><![CDATA[
<p>Are you executing a process that takes a long time?  Do you want to know that it’s
still working while you are in another terminal/making coffee?  Do you have a
favorite game show tune to play while doing something?</p>
<p>If yes: <code class="docutils literal">think</code> is just for you.  For more details, read on or <a class="reference external" href="https://github.com/Kwpolska/think">hop onto the GitHub page</a>.</p>



<p style="text-align: center; clear: both;">
<a href="https://chriswarrick.com/projects/think/" class="btn btn-primary" style="width: 250px;">
<i class="bi bi-info-circle"></i>
Project page
</a>
</p>
<p style="text-align: center; clear: both;">
<a href="https://github.com/Kwpolska/think" class="btn btn-secondary" style="width: 250px;">
<i class="bi bi-github"></i>
GitHub
</a>
</p>
<p style="text-align: center; clear: both;">
<a href="https://github.com/Kwpolska/think/releases" class="btn btn-secondary" style="width: 250px;">
<i class="bi bi-download"></i>
Downloads (GitHub)
</a>
</p>
<p style="text-align: center; clear: both;">
<a href="https://pypi.python.org/pypi/think" class="btn btn-secondary" style="width: 250px;">
<i class="bi bi-download"></i>
Downloads (PyPI)
</a>
</p><section id="installation">
<h1>Installation</h1>
<p>You can install <code class="docutils literal">think</code> from <a class="reference external" href="https://pypi.python.org/pypi/think">PyPI</a> (with <code class="docutils literal">pip install think</code>). Arch Linux
users can install the <code class="docutils literal">think</code> package from the AUR.</p>
</section>
<section id="configuration">
<h1>Configuration</h1>
<p>Create a file named <code class="docutils literal"><span class="pre">~/.config/think.conf</span></code> (or wherever your <code class="docutils literal">XDG_CONFIG_HOME</code> is) with the following four lines:</p>
<div class="code"><pre class="code ini"><a id="rest_code_6e90400217034172ab53f66941fff63d-1" name="rest_code_6e90400217034172ab53f66941fff63d-1" href="https://chriswarrick.com/blog/2015/05/30/think/#rest_code_6e90400217034172ab53f66941fff63d-1"></a><span class="k">[Think]</span>
<a id="rest_code_6e90400217034172ab53f66941fff63d-2" name="rest_code_6e90400217034172ab53f66941fff63d-2" href="https://chriswarrick.com/blog/2015/05/30/think/#rest_code_6e90400217034172ab53f66941fff63d-2"></a><span class="na">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">play</span>
<a id="rest_code_6e90400217034172ab53f66941fff63d-3" name="rest_code_6e90400217034172ab53f66941fff63d-3" href="https://chriswarrick.com/blog/2015/05/30/think/#rest_code_6e90400217034172ab53f66941fff63d-3"></a><span class="na">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">/home/kwpolska/Dropbox/Media/Wielka Gra.mp3</span>
<a id="rest_code_6e90400217034172ab53f66941fff63d-4" name="rest_code_6e90400217034172ab53f66941fff63d-4" href="https://chriswarrick.com/blog/2015/05/30/think/#rest_code_6e90400217034172ab53f66941fff63d-4"></a><span class="na">behavior</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">wait</span>
</pre></div>
<ul class="simple">
<li><p><code class="docutils literal">command</code> is the command of the player that will be executed.  You can use
<code class="docutils literal">play</code> (from <code class="docutils literal">sox</code>) or any other fast CLI music player.</p></li>
<li><p><code class="docutils literal">file</code> is the filename that will be given as the sole argument to the play command. No escaping is necessary. I’m using the <a class="reference external" href="https://www.youtube.com/watch?v=Nnu7I3b7ZbY">Wielka Gra</a> theme (BTW: I just published the MP3 file on the 1st anniversary of the upload!), Americans might want <a class="reference external" href="https://www.youtube.com/watch?v=vXGhvoekY44">Jeopardy! Think Music</a> (also the namesake for this command), Brits might want the <a class="reference external" href="https://www.youtube.com/watch?v=M2dhD9zR6hk">Countdown theme</a>.</p></li>
<li><p><code class="docutils literal">behavior</code> can be one of:</p>
<ul>
<li><p><code class="docutils literal">return</code> — return control to the terminal as soon as the program finishes, without stopping the music</p></li>
<li><p><code class="docutils literal">wait</code> — wait until music stops before returning control</p></li>
<li><p><code class="docutils literal">stop</code> — stop the music and return control immediately</p></li>
</ul>
</li>
</ul>
</section>
<section id="usage">
<h1>Usage</h1>
<p>Prepend <code class="docutils literal">think</code> before the command that takes too long to execute:</p>
<div class="code"><pre class="code console"><a id="rest_code_3ec72f2a2eb04801bbaf514420d7a006-1" name="rest_code_3ec72f2a2eb04801bbaf514420d7a006-1" href="https://chriswarrick.com/blog/2015/05/30/think/#rest_code_3ec72f2a2eb04801bbaf514420d7a006-1"></a><span class="go">think sleep 120</span>
</pre></div>
</section>
]]></content:encoded><category>Python</category><category>app</category><category>CLI</category><category>game show</category><category>Jeopardy!</category><category>Linux</category><category>projects</category><category>Python</category><category>think</category></item></channel></rss>