<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>cli &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/cli/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Fri, 13 Jun 2025 09:16:21 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>cli &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Convert Shotwell Photo Metadata to Digikam Metadata]]></title>
		<link>https://shkspr.mobi/blog/2025/06/convert-shotwell-photo-metadata-to-digikam-metadata/</link>
					<comments>https://shkspr.mobi/blog/2025/06/convert-shotwell-photo-metadata-to-digikam-metadata/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 20 Jun 2025 11:34:37 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=61338</guid>

					<description><![CDATA[Mostly notes to myself.  Shotwell stores most of its information in a database. Which I lost. Because I&#039;m an idiot.  But a bunch of metadata is also stored in the image&#039;s EXIF metadata!  Most importantly is the &#34;Original File Name&#34; which should become the &#34;Description&#34; in DigiKam. Unfortunately, there&#039;s no way to copy those values automatically on import.  So here&#039;s a one-liner which will read…]]></description>
										<content:encoded><![CDATA[<p>Mostly notes to myself.</p>

<p>Shotwell stores most of its information in a database. Which I lost. Because I'm an idiot.</p>

<p>But a bunch of metadata is <em>also</em> stored in the image's EXIF metadata!</p>

<p>Most importantly is the "Original File Name" which should become the "Description" in DigiKam. Unfortunately, there's no way to copy those values automatically on import.</p>

<p>So here's a one-liner which will read the "Original File Name" and store it in the "Title" EXIF - ready for DigiKam to parse!</p>

<pre><code class="language-bash">exiftool "-XMP-dc:Title&lt;XMP-getty:OriginalFileName" whatever.jpg
</code></pre>

<p>If you want to make sure any existing Title isn't overwritten, use:</p>

<pre><code class="language-bash">exiftool "-XMP-dc:Title&lt;${XMP-getty:OriginalFileName}" -if "not defined $XMP-dc:Title" whatever.jpg
</code></pre>

<p>Finally, to do it recursively, across all files:</p>

<pre><code class="language-bash">exiftool -r "-XMP-dc:Title&lt;${XMP-getty:OriginalFileName}" -if "not defined $XMP-dc:Title" /path/to/images
</code></pre>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=61338&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2025/06/convert-shotwell-photo-metadata-to-digikam-metadata/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[A quick guide to getting Mozilla VPN working on a headless Linux server]]></title>
		<link>https://shkspr.mobi/blog/2023/03/a-quick-guide-to-getting-mozilla-vpn-working-on-a-headless-linux-server/</link>
					<comments>https://shkspr.mobi/blog/2023/03/a-quick-guide-to-getting-mozilla-vpn-working-on-a-headless-linux-server/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 16 Mar 2023 12:34:56 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vpn]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=45148</guid>

					<description><![CDATA[The Mozilla VPN service is great, but it doesn&#039;t work using the CLI if you have a &#34;headless&#34; server.  After a bit of faffing about, I got it working.  I suffered so you don&#039;t have to.  Get an account  Sign up and use code MOZILLA20 for a cheeky 20% discount!  Get a token in the browser  To start with, you&#039;ll need to get an authentication token. This requires you to be on a machine which can run a …]]></description>
										<content:encoded><![CDATA[<p>The <a href="https://www.mozilla.org/en-US/products/vpn/">Mozilla VPN service</a> is great, but it <a href="https://github.com/mozilla-mobile/mozilla-vpn-client/issues/6301">doesn't work using the CLI if you have a "headless" server</a>.  After a bit of faffing about, I got it working.  I suffered so you don't have to.</p>

<h2 id="get-an-account"><a href="https://shkspr.mobi/blog/2023/03/a-quick-guide-to-getting-mozilla-vpn-working-on-a-headless-linux-server/#get-an-account">Get an account</a></h2>

<p><a href="https://www.mozilla.org/en-US/products/vpn/">Sign up</a> and use code <mark>MOZILLA20</mark> for a cheeky 20% discount!</p>

<h2 id="get-a-token-in-the-browser"><a href="https://shkspr.mobi/blog/2023/03/a-quick-guide-to-getting-mozilla-vpn-working-on-a-headless-linux-server/#get-a-token-in-the-browser">Get a token in the browser</a></h2>

<p>To start with, you'll need to get an authentication token. This requires you to be on a machine which can run a modern browser like Firefox or Chrome.</p>

<p>On a computer with a GUI, download <a href="https://github.com/NilsIrl/MozWire">MozWire</a>.  This is an unofficial way to download the necessary WireGuard config files.</p>

<p>Open up a terminal and make it executable:</p>

<pre>chmod +x mozwire-linux</pre>

<p>Run the app:</p>

<pre>./mozwire-linux --print-token</pre>

<p>That will automatically open your web browser. Sign in to the Mozilla VPN service in the browser. Return to your terminal and you'll see a long token like:</p>

<pre>abc.123.qwe.rty.uio</pre>

<p>It will be <em>much</em> longer than that! Save it somewhere safe.</p>

<h2 id="server-time"><a href="https://shkspr.mobi/blog/2023/03/a-quick-guide-to-getting-mozilla-vpn-working-on-a-headless-linux-server/#server-time">Server time!</a></h2>

<p>SSH into your server.  Download <a href="https://github.com/NilsIrl/MozWire">MozWire</a>.</p>

<pre>wget https://github.com/NilsIrl/MozWire/releases/latest/download/mozwire-linux</pre>

<p>Make it executable:</p>

<pre>chmod +x mozwire-linux</pre>

<p>Check that it works by getting it to list all the devices you have associated with your account:</p>

<pre>./mozwire-linux --token abc.123.qwe.rty.uio device list</pre>

<p>That should show the name of your devices - it <em>won't</em> include the server.</p>

<p>It's tedious to type in the token each time, so run:</p>

<pre>export MOZ_TOKEN="abc.123.qwe.rty.uio"</pre>

<p>Run:</p>

<pre>./mozwire-linux device list</pre>

<p>And you should get the same result as before.</p>

<p>Make sure you have installed WireGuard and resolvconf:</p>

<pre>sudo apt install wireguard wireguard-tools resolvconf</pre>

<p>Next, generate the public/private keypair and associate it with your server:</p>

<pre>./mozwire-linux device add --name My-Awesome-Server --privkey $(wg genkey)</pre>

<p>Once that's run, you can confirm the server has been added by again running:</p>

<pre>./mozwire-linux device list</pre>

<p>That should show your previous devices <em>and</em> the new one.</p>

<p>Next up, it's time to download all the Mozilla VPN WireGuard configs:</p>

<pre>./mozwire-linux relay save -o ~/mozwireconf -n 0</pre>

<p>That will upload your public key to Mozilla and then download a bunch of configurations into <code>~/mozwireconf</code> (or wherever you choose).</p>

<h2 id="run-wireguard"><a href="https://shkspr.mobi/blog/2023/03/a-quick-guide-to-getting-mozilla-vpn-working-on-a-headless-linux-server/#run-wireguard">Run Wireguard</a></h2>

<p>To connect to, say, the Denmark Copenhagen server, run:</p>

<pre>wg-quick up ~/mozwireconf/dk-cph-wg-101.conf</pre>

<p>And... that's it! If you run <code>ifconfig</code> you'll see a new network entry for WireGuard.</p>

<p>You can check that it's working by running:</p>

<pre>curl https://ifconfig.co/json ; echo</pre>

<p>That will print out some diagnostic information about the IP address your server presents to the world.</p>

<p>To turn off the MozillaVPN, run:</p>

<pre>wg-quick down ~/mozwireconf/dk-cph-wg-101.conf</pre>

<p>To run MozillaVPN for a single program, install <a href="https://github.com/jamesmcm/vopono/">Vopono</a></p>

<pre><code class="language-_">vopono exec --custom ~/.config/vopono/mozilla/wireguard/fi-hel-wg-103.conf "curl https://ifconfig.co/json"
</code></pre>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=45148&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/03/a-quick-guide-to-getting-mozilla-vpn-working-on-a-headless-linux-server/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Anatomy of my perfect ls command]]></title>
		<link>https://shkspr.mobi/blog/2020/12/anatomy-of-an-ls-command/</link>
					<comments>https://shkspr.mobi/blog/2020/12/anatomy-of-an-ls-command/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 27 Dec 2020 12:09:58 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=37629</guid>

					<description><![CDATA[Mostly notes to myself. Nestled away in my Linux Bash profile, I have this one-liner  alias lh=&#039;ls -trhgGN --color=always &#124; cut -d&#34; &#34; -f4-&#039;   When I run lh it outputs a list of files in the directory, showing their size, with the newest files on the bottom.  I use this regularly to see what I&#039;ve downloaded recently and how big the files are - so I made an alias.  Here&#039;s how it works.  Alias …]]></description>
										<content:encoded><![CDATA[<p>Mostly notes to myself. Nestled away in my Linux Bash profile, I have this one-liner</p>

<pre><code class="language-bash">alias lh='ls -trhgGN --color=always | cut -d" " -f4-'
</code></pre>

<p>When I run <code>lh</code> it outputs a list of files in the directory, showing their size, with the newest files on the bottom.  I use this regularly to see what I've downloaded recently and how big the files are - so I made an alias.</p>

<p>Here's how it works.</p>

<h2 id="alias"><a href="https://shkspr.mobi/blog/2020/12/anatomy-of-an-ls-command/#alias">Alias</a></h2>

<p>Alias is a <del>Jester in disguise</del> useful Linux tool which <a href="https://linuxize.com/post/how-to-create-bash-aliases/">lets you create a shortcut to a complicated command</a>. Every flavour of Linux has a different place to store them, so do a bit of RTFM to find out where to put your commands.</p>

<h2 id="ls"><a href="https://shkspr.mobi/blog/2020/12/anatomy-of-an-ls-command/#ls">ls</a></h2>

<p><code>ls</code> is the standard file listing tool. It has lots of options.</p>

<ul>
<li><code>-tr</code> sort by <strong>t</strong>ime in <strong>r</strong>everse order</li>
<li><code>-h</code> <strong>h</strong>uman readable size format. Shows in KB, MB, GB, rather than just bytes</li>
<li><code>-g</code> don't show the owner of the file</li>
<li><code>-G</code> don't show the <strong>g</strong>roup the file belongs to</li>
<li><code>-N</code> don't quote the file <strong>n</strong>ames</li>
<li><code>--color=always</code> always colours the output, making it easier to differentiate between fields</li>
</ul>

<p>There's no way to suppress the file permissions in <code>ls</code> so we need to pipe to <code>cut</code>.</p>

<h2 id="cut"><a href="https://shkspr.mobi/blog/2020/12/anatomy-of-an-ls-command/#cut">cut</a></h2>

<p><code>cut</code> takes a string and chops it up.</p>

<ul>
<li><code>-d" "</code> the <strong>d</strong>elimiter is the space character, cut will separate the string by the delimiter, each separated section is a field.</li>
<li><code>-f4-</code> print the fourth <strong>f</strong>ield and any subsequent field</li>
</ul>

<h2 id="putting-it-all-together"><a href="https://shkspr.mobi/blog/2020/12/anatomy-of-an-ls-command/#putting-it-all-together">Putting it all together</a></h2>

<p>"When I type <code>lh</code>, please list the files in reverse time order, showing the file size but not the owners or groups, don't quote the names, and keep the colouring - then discard the first 3 columns."</p>

<p>Thanks to <a href="https://maddison.io/">Maddison Hellstrom</a> for the help.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=37629&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/12/anatomy-of-an-ls-command/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Screenscraping Album Artwork From The Linux Command Line]]></title>
		<link>https://shkspr.mobi/blog/2013/04/screenscraping-album-artwork-from-the-linux-command-line/</link>
					<comments>https://shkspr.mobi/blog/2013/04/screenscraping-album-artwork-from-the-linux-command-line/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 21 Apr 2013 09:23:28 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[album art]]></category>
		<category><![CDATA[cd]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tools]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=8127</guid>

					<description><![CDATA[Like many people, I&#039;ve collected a fair number of CDs over the years.  As hard-drives and MicroSD cards have got larger and cheaper, I&#039;ve gradually been ripping them to FLAC.  Most CD rippers automatically tag the music files with the correct metadata and, nowadays, they will also download and embed album artwork as well.  (As an aside, it always boggled my mind that CDs don&#039;t come with metadata…]]></description>
										<content:encoded><![CDATA[<p>Like many people, I've collected a fair number of CDs over the years.  As hard-drives and MicroSD cards have got larger and cheaper, I've gradually been ripping them to FLAC.  Most CD rippers automatically tag the music files with the correct metadata and, nowadays, they will also download and embed album artwork as well.</p>

<p>(As an aside, it always boggled my mind that CDs don't come with metadata burned onto the disc. Even a single spare megabyte would be enough to hold detailed track listing, artwork, etc.)</p>

<p>Back when I started, there was no way to get album artwork.  Most media players will recognise that if a .jpg is in a folder with music, then it should be treated as the album artwork.  This file is usually called "cover.jpg" or "albumart.jpg" - but that's only convention; any name will do.</p>

<p>So, rather than re-rip all by CDs, I wrote a quick bash script to scrape the images from <a href="http://www.albumart.org">albumart.org</a>.  First the script and then some notes about the choices I made when writing it.</p>

<pre><code class="language-bash">#!/bin/bash -e
# get_coverart.sh
#
# This simple script will fetch the cover art for the album information provided on the command line.
# It will then download that cover image, and place it into the child directory.
#
# ./get_coverart.sh &lt;relative -path&gt;
#
# get_coverart Beatles/Sgt Pepper
#
# get_coverart Beatles/Sgt_Pepper
#
# get_coverart "Beatles - Sgt_Pepper"
#
# To auto-populate all directories in the current directory, run the following command
#
# find . -type d -exec ./get_coverart "{}" ;
albumpath="$1"

# Escape any problematic character
encoded="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$albumpath")"

# Skip if a cover.jpg exists in the directory
if [ -f "$albumpath/cover.jpg" ]
then
echo "$albumpath/cover.jpg already exists"
exit
fi

# Tell the user what is going on
echo ""
echo "Searching for: [$1]"

# scraping AlbumArt.org
url="http://www.albumart.org/index.php?skey=$encoded&amp;itempage=1&amp;newsearch=1&amp;searchindex=Music"
echo "Searching ... [$url]"

# Grab the first Amazon image without an underscore (usually the largest version)
coverurl=`wget -qO - "$url" | grep -m 1 -o 'http://ecx.images-amazon.com/images/I/*/[%0-9a-zA-Z.,-]*.jpg'`

echo "Cover URL: [$coverurl]"

# Save the imager
wget "$coverurl" -O "$albumpath/cover.jpg"
</code></pre>

<h2 id="notes"><a href="https://shkspr.mobi/blog/2013/04/screenscraping-album-artwork-from-the-linux-command-line/#notes">Notes</a></h2>

<p>I <a href="http://code.google.com/p/abcde/issues/detail?id=33#c8">originally suggested this as an enhancement</a> for the popular <a href="http://code.google.com/p/abcde/">ABCDE Linux ripper</a>.
It's based off <a href="https://web.archive.org/web/20150418143215/https://www.ludicrous-speed.com/wiki/index.php?title=How_To_Download_Album_Cover_Art">this older, now obsolete, script</a>.</p>

<h3 id="albumart-org-uses-images-from-amazon-com-why-not-just-use-the-amazon-api"><a href="https://shkspr.mobi/blog/2013/04/screenscraping-album-artwork-from-the-linux-command-line/#albumart-org-uses-images-from-amazon-com-why-not-just-use-the-amazon-api">AlbumArt.org uses images from Amazon.com - why not just use the Amazon API?</a></h3>

<p>The Amazon API is great but it requires that you <a href="https://web.archive.org/web/20130108015804/http://docs.aws.amazon.com/AWSECommerceService/2011-08-01/GSG/SubmittingYourFirstRequest.html">get an account with Amazon and include an API key with every request</a>.  That means you can't just dump the script on a box and start downloading - you'd need to configure it first?</p>

<h3 id="why-the-change-from-xpath"><a href="https://shkspr.mobi/blog/2013/04/screenscraping-album-artwork-from-the-linux-command-line/#why-the-change-from-xpath">Why the change from XPATH?</a></h3>

<p>I love XPATH and use it regularly.  What I found when deploying this script to a new Ubuntu install was that xmllint wasn't installed by default. On the other hand, grep is installed on every machine.  Seeing as how the Amazon images are a fixed pattern, a regular expression works just fine.</p>

<h3 id="what-if-there-are-multiple-results-from-a-search"><a href="https://shkspr.mobi/blog/2013/04/screenscraping-album-artwork-from-the-linux-command-line/#what-if-there-are-multiple-results-from-a-search">What if there are multiple results from a search?</a></h3>

<p>This will automatically download the first one.  As this is a command line tool, there's no practical way to display the various images.
I did look at ASCII art conversion, but that's problematic.
Some albums work well - e.g. Little Mix's DNA</p>

<pre>.=====+++O887?+++.+===~~INMNMMMMMN?~==~.
.=7I+=~~NMM8ND$=+.====~OMMMMMMMMMMMD~=~.
.~=+=ONMD8ZNNN88I.~~~~:MMMM=?MMMMMMMN=~.
.~==ZNN+:,,,N8ODO.:~~~=NMMZZ:$MMMMMMN=~.
.===NZNII..+O88ONI.=~:=,DM+$::7NMMMMN:~.
.+=7DD8,::~,,DD88O.OOIZOMMM~=7.+MMND+~,:
.=+8DND+,:~,=DD8DD~,8DZ+:NMZ?~?8MMMNNMO~
.==DNNNNI=++NDDNNDZ$MNOOOON7++IMMM8?==~M
.+?NMNNN78N8MNNNNNOI?+???I?I+=+IM8$+++I:
.=NMMMNDN==MNNMNMN$=+?8$I+?+==+???III==+
.8NMMMNN?=+M$IIII:I,77II7D?+~~=??:ONMNZ?
.MNMNMMZ7~+MO7~II:7=7???77$,......,:??=M
.MMMM8=.......,~=~=.I:I,7,I=+==+=====+=.
...,~=?8D878DO+~~~=?~=7++NNM8NNMD===+==.
.==~=~DD8DNNON8+7I=+?=78ND~:::~NNNI===~.
.==~~~NI:,,:I88+:~~~.~=8M?:,?,=+NOM7+=~.
.=~=~~8~,...,?8~~~~~.+=MDND:,I::8MMZ=+=.
.==~~~ZDD+.+7+$~~~~~,,~MM7:~=.,=DNNMI+=.
.~~~~:?:,~,,,7=:~::~~.+NMMI7:~:~NDNNN+=.
.~~==~:I,,,,~D::~:~~=.DMDNNI::O+NN8DN+=.
.====~=:,,,~N~:::~~==.N8NDDN+=~+DOODN$=.
.+====~D+,M~~,.,:====.ND8NNN+::=DD8OND=.
.??,++++I~,?+:,,:::~+87D8DNM:::~MNODND=.
.?=,.~=~,+,$+?+??++~IMNNNMNN$,,,MNNMNNOI
..$+~~=.:~,Z====++++7MMNMNM,~,,,MMNNNMM.</pre>

<p>Whereas Sgt Pepper is hard to make out.</p>

<pre>:::::::::::::::::::::::~~~~~~::::::,,,,,
:,:::::,~::==:::O7~~:~8~=~~=Z+~:I:::,,,.
~+.:+8~D7:::~+8??:==I:O?~$:~$ZI=7IO:,,~:
:I$=,N$=:8O7?7+I?=.8?78OI:~+I~7O$Z$O+?$:
,O$.~D8$~~Z+ZD7$$DOO=8ZZ?OI8?:D7=887Z8Z?
~87+Z$+:~8+,:OD8O~=NDD7OO$+Z8D:ZDDDD88Z?
$O88Z8?DDD?ZZN+ODI,D?88D887$7=D8D+D8O8Z=
,7ID=88II7IOZ7ZZZ7$:===$77~I:~88ZIIO88$?
~..DDDDDDDDOIN=7$7~?I?=OIZ$I:$Z7+?Z+88ZI
Z+,8DDDDDDD+D7O?8ZZ777?8Z8I==OD~8~D$7OZ?
,,D8DDDDNDDDO8Z=$Z8+IZDOZ+ZI+D?88+78O8~=
I?ZDDDDNDN8N=+O+7II$7?ZO+Z$7I8DDOZ?DDII=
=~DDDONNNNNDZZOZZI+?Z+87OOZOZ$8D888D8+II
+=D8NNDDDNDD8N+Z,?OZ~?~88ODOZ+ODDD88DI:?
~~DDDDD8DNDDDO~??:,+7~=DD8DNDDD8788:D,::
~=D8==8DDNNNDO=$=?O$~I:DDO$?DDDDDDD=?OZ+
OD8DZONNDNNDNNN=~7~Z+,DNN8?$DNZZ?DDDO8$7
7O=O8:D78DZNZZN77$7OD8?7$I7=?~D$O8O~~Z7I
=Z$O88D$N$O8N88ZZZ$ON8NDNNZO7ON$7OD8?Z$~
IZD8ZOD8O$OOD$8DDNZNN$DDNN$8ZDNDO$DDZ8OI
7ZDO8ODDO8DOD8N88$ZNDDNDNN8DD8N8$OOZ8O$?
IZDNNNNN8NNNNNNNMZ7N=+Z7O=O7ZI:~DD8DD8OI
Z8DND+$Z+OD+NNNDN8DNDNNNN++I+$=ZDDDDDD8?
ONNDDNO8=D8NNNNDDZD8~NNNONNNNNN8NDDDDDD$
8D88ZNNNOONNNNNDDD$ODNDD8ZMNNDN8D8NNDDDI</pre>

<p>There are <a href="http://superuser.com/a/378787/140864">amazing tools like aview</a> - but again, that's an extra program which the user might not have.</p>

<p>If your album directories are sensibly named, the first hit is usually good enough.</p>

<h3 id="hang-on-theres-a-mistake"><a href="https://shkspr.mobi/blog/2013/04/screenscraping-album-artwork-from-the-linux-command-line/#hang-on-theres-a-mistake">Hang on! There's a mistake!</a></h3>

<p>Quite probably, this is a quick and dirty script. I'm sure there are lots of edge case and (no-doubt) some poor coding practices.  If you wish to contribute a patch, please drop it in the comments.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=8127&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2013/04/screenscraping-album-artwork-from-the-linux-command-line/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
	</channel>
</rss>
