<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/"/>

<title>Jeff Epler's blog</title>
<modified>2026-07-30T14:39:05Z</modified>
<tagline>Photos, electronics, cnc, and more</tagline>
<author><name>Jeff Epler</name><email>jepler@unpythonic.net</email></author>
<entry>
<title>More junkdrawer features</title>
<issued>2026-07-30T14:39:05Z</issued>
<modified>2026-07-30T14:39:05Z</modified>
<id>https://emergent.unpythonic.net/01785422345</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/01785422345"/>
<content type="text/html" mode="escaped">

&lt;p&gt;I've continued enhancing the static site generator for my &lt;a href=&quot;https://jepler.grebedoc.dev/junkdrawer/&quot;&gt;junkdrawer&lt;/a&gt; (github gist / pastebin replacement). The source code for the static site generator lives right in the same repo.&lt;/p&gt;
&lt;p&gt;One thing I missed was some kind of ability to preview PDFs that I have uploaded to the junkdrawer,
such as &lt;a href=&quot;https://jepler.grebedoc.dev/junkdrawer/u1hnis1w/&quot;&gt;this m6800 reference card&lt;/a&gt; that disappeared earlier this year from its original site.&lt;/p&gt;
&lt;p&gt;Initially, I tried to directly show the PDF as an &lt;code&gt;embed&lt;/code&gt; or &lt;code&gt;object&lt;/code&gt; tag.
However, getting the embedded viewer properly sized was beyond what I wanted to tangle with.&lt;/p&gt;
&lt;p&gt;Instead, I took the same approach github does: Convert the first pages of the pdf to images and display them with the &lt;code&gt;img&lt;/code&gt; tag. This then gets the lightbox treatment from my mkdocs setup, so you can comfortably zoom the page image to its full 150dpi majesty.&lt;/p&gt;
&lt;p&gt;I have made the decision to not worry too much about specially-crafted PDF files that might exploit bugs in poppler's &lt;code&gt;pdftoppm&lt;/code&gt;: I'll have already locally viewed any PDF I'm putting in the junk drawer, so the Bad Thing will already have occurred. Anyway, the site generation process installs the latest packaged &lt;code&gt;pdftoppm&lt;/code&gt; so I'm also likely to have patches for known poppler flaws.&lt;/p&gt;
&lt;p&gt;The main downside I've identified is that the image is just an image and is therefore not searchable with the browser's search feature. Alas.&lt;/p&gt;

</content>
</entry>
<entry>
<title>junkdrawer gets a grebedoc page</title>
<issued>2026-07-23T00:09:29Z</issued>
<modified>2026-07-23T00:09:29Z</modified>
<id>https://emergent.unpythonic.net/01784765369</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/01784765369"/>
<content type="text/html" mode="escaped">

&lt;p&gt;I added machinery to my &lt;a href=&quot;https://codeberg.org/jepler/junkdrawer&quot;&gt;junkdrawer&lt;/a&gt; repo so that it also builds a &lt;a href=&quot;https://jepler.grebedoc.dev/junkdrawer/&quot;&gt;static website&lt;/a&gt; that's served by &lt;a href=&quot;https://grebedoc.dev/&quot;&gt;grebedoc&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The code to do it is in the junkdrawer's &amp;quot;site&amp;quot; directory and it functions just great using the free codeberg-tiny runner for CI.&lt;/p&gt;

</content>
</entry>
</feed>
