<h1 id="my-apod-downloader">My APOD Downloader</h1>
 <h2 id="astronomy-picture-of-the-day">Astronomy Picture of the Day</h2>
 <p>You have probably heard of the <a href="https://apod.nasa.gov/apod/astropix.html">Astronomy Picture of the Day (APOD)</a> site. It has existed since 1995, is provided by <a href="https://en.wikipedia.org/wiki/NASA">NASA</a> and <a href="https://en.wikipedia.org/wiki/Michigan_Technological_University">Michigan Technological University (MTU)</a> and is created and managed by <a href="https://www.mtu.edu/physics/department/faculty/nemiroff/">Robert Nemiroff</a> and <a href="https://antwrp.gsfc.nasa.gov/htmltest/jbonnell/www/bonnell.html">Jerry Bonnell</a>. The FAQ on the site says <em>"The APOD archive contains the largest collection of annotated astronomical images on the internet"</em>.</p>
 <h2 id="the-downloader">The Downloader</h2>
 <p>Being a KDE user I quite like a moderate amount of bling, and I particularly like to have a picture on my desktop. I like to rotate my wallpaper pictures every so often, so I want to have a collection of images. To this end I download the APOD on my server every day and make the images available through an NFS-mounted volume.</p>
 <p>In 2012 I wrote a Perl script to perform the download, using a fairly primitive HTML parsing method. This script has been improved over the intervening years and now uses the Perl module <a href="https://search.cpan.org/~cjm/HTML-Tree-5.03/lib/HTML/TreeBuilder.pm"><code>HTML::TreeBuilder</code></a> which I believe is much better at parsing HTML.</p>
 <p>The version of the script I use myself also includes the Perl module <code>Image::Magick</code> which interfaces to the awesome <a href="https://www.imagemagick.org/"><code>ImageMagick</code></a> image manipulation software suite. I use this to annotate the downloaded image with the title parsed from the HTML so I know what it is.</p>
 <p>The script I am presenting here is called <code>collect_apod_simple</code> and does not use <code>ImageMagick</code>. I chose to omit it because the installation of this suite and the related Perl module can be difficult. Also, I do not feel that the annotation always works as well as it could, and I have not yet found the time to correct this shortcoming.</p>
 <p>A version of the more advanced script (called <code>collect_apod</code>) is available in the same place as <code>collect_apod_simple</code> should you wish to give it a try. Both scripts are available on <em>GitLab</em> under the link <a href="https://gitlab.com/davmo/hprmisc">https://gitlab.com/davmo/hprmisc</a>.</p>
 <h2 id="the-code">The Code</h2>
 <p>The script itself is described in the full show notes, available here: <a href="https://hackerpublicradio.org/eps/hpr1694_full_shownotes.html">https://hackerpublicradio.org/eps/hpr1694_full_shownotes.html</a></p>
 <h2 id="links">Links</h2>
 <ul>
  <li>Wikipedia entry <a href="https://en.wikipedia.org/wiki/Astronomy_Picture_of_the_Day">https://en.wikipedia.org/wiki/Astronomy_Picture_of_the_Day</a></li>
  <li>Astronomy Picture of the Day <a href="https://apod.nasa.gov/apod/astropix.html">https://apod.nasa.gov/apod/astropix.html</a></li>
  <li>NASA <a href="https://en.wikipedia.org/wiki/NASA">https://en.wikipedia.org/wiki/NASA</a></li>
  <li>Michigan Technological University (MTU) <a href="https://en.wikipedia.org/wiki/Michigan_Technological_University">https://en.wikipedia.org/wiki/Michigan_Technological_University</a></li>
  <li>Robert Nemiroff <a href="https://www.mtu.edu/physics/department/faculty/nemiroff/">https://www.mtu.edu/physics/department/faculty/nemiroff/</a></li>
  <li>Jerry Bonnell <a href="https://antwrp.gsfc.nasa.gov/htmltest/jbonnell/www/bonnell.html">https://antwrp.gsfc.nasa.gov/htmltest/jbonnell/www/bonnell.html</a></li>
  <li><code>HTML::TreeBuilder</code> Perl module <a href="https://search.cpan.org/~cjm/HTML-Tree-5.03/lib/HTML/TreeBuilder.pm">https://search.cpan.org/~cjm/HTML-Tree-5.03/lib/HTML/TreeBuilder.pm</a></li>
  <li><code>ImageMagick</code> image manipulation software suite <a href="https://www.imagemagick.org/">https://www.imagemagick.org/</a></li>
  <li><em>GitLab</em> link <a href="https://gitlab.com/davmo/hprmisc">https://gitlab.com/davmo/hprmisc</a>.</li>
 </ul>
