<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>hi, it&#39;s mike</title>
    <link>https://mike.puddingtime.org/tags/hugo/</link>
    <description>Recent content on hi, it&#39;s mike</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>mike@puddingtime.org (mike)</managingEditor>
    <webMaster>mike@puddingtime.org (mike)</webMaster>
    <copyright>© 2026, mike</copyright>
    <lastBuildDate>Thu, 23 Apr 2026 22:18:42 -0700</lastBuildDate>
    <atom:link href="https://mike.puddingtime.org/tags/hugo/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>I seem to be in the mood for Hugo again</title>
      <link>https://mike.puddingtime.org/posts/2026-04-23-i-seem-to-be-in-the-mood-for-hugo-again/</link>
      <pubDate>Thu, 23 Apr 2026 22:18:42 -0700</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2026-04-23-i-seem-to-be-in-the-mood-for-hugo-again/</guid>
      <description>I dunno. Maybe everything was getting too easy.</description>
      <content:encoded><![CDATA[<p>I got bit by the &ldquo;spruce the old Hugo blog up&rdquo; bug this week and ended up tearing apart the old theme, restyling some stuff, and fixing up the <a href="https://mph.puddingtime.org/posts/about-old-posts/">old post notice</a>.</p>
<p>Once I was done with that, I took a long look at the micro.blog and decided I was done with it. I think I subscribed hoping I was in the mood for the slow-moving community over there, but most people I know from it seem to have moved on since I was last there. So I pointed its custom domain to this one, exported all my stuff from it, and set up shop here again.</p>
<p>micro.blog hews so close to things I think I would really like to exist somewhere in a less elaborate manner. I appreciate the way you can start with what feels like a short-form social-media-style post and end up tipping over into a whole blog entry without having to switch context. What&rsquo;d be fine, honestly, would be &ldquo;Mastodon except your Markdown works and you can kinda blog in there, not just toot.&rdquo; Then sometimes it&rsquo;d be a pithy little comment, other times it&rsquo;d be a screed, and you could get kicked out of your instance because a lot of words is violent or whatever.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Hugo posting in Emacs</title>
      <link>https://mike.puddingtime.org/posts/2025-04-21-hugo-posting-in-emacs/</link>
      <pubDate>Mon, 21 Apr 2025 08:37:39 -0700</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2025-04-21-hugo-posting-in-emacs/</guid>
      <description>ox-hugo is nice and all</description>
      <content:encoded><![CDATA[<p>I dug a bunch of stuff out of archived configs to get the Hugo blog going again, including my old <a href="https://ox-hugo.scripter.co/">ox-hugo</a> setup.</p>
<p><code>ox-hugo</code> lets you keep a monolithic org file where each post is an org heading:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="nv">**</span> <span class="nv">SyncTrain</span> <span class="nv">for</span> <span class="nv">Syncthing</span> <span class="nv">on</span> <span class="nv">iOS</span> <span class="ss">:syncthing:ios:iphone:</span>
</span></span><span class="line"><span class="cl"><span class="ss">:PROPERTIES:</span>
</span></span><span class="line"><span class="cl"><span class="ss">:EXPORT_FILE_NAME:</span> <span class="nv">2025-04-20-synctrain-for-syncthing-on-ios</span>
</span></span><span class="line"><span class="cl"><span class="ss">:EXPORT_HUGO_DATE:</span> <span class="nv">&lt;2025-04-20&gt;</span>
</span></span><span class="line"><span class="cl"><span class="ss">:EXPORT_DATE:</span> <span class="nv">2025-04-20</span>
</span></span><span class="line"><span class="cl"><span class="ss">:EXPORT_HUGO_SECTION:</span> <span class="nv">blog</span>
</span></span><span class="line"><span class="cl"><span class="ss">:EXPORT_HUGO_CUSTOM_FRONT_MATTER+:</span> <span class="ss">:cover</span> <span class="o">&#39;</span><span class="p">((</span><span class="nv">image</span> <span class="o">.</span><span class="s">&#34;&#34;</span> <span class="p">)</span> <span class="p">(</span><span class="nv">caption</span> <span class="o">.</span> <span class="s">&#34;&#34;</span> <span class="p">))</span>
</span></span><span class="line"><span class="cl"><span class="ss">:EXPORT_HUGO_CUSTOM_FRONT_MATTER+:</span> <span class="ss">:images</span> <span class="o">&#39;</span><span class="p">(</span><span class="nv">/mph-logo.png</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="ss">:EXPORT_DESCRIPTION:</span>
</span></span><span class="line"><span class="cl"><span class="ss">:END:</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">A</span> <span class="nv">few</span> <span class="nv">years</span> <span class="nv">ago</span> <span class="nv">I</span> <span class="nv">gave</span> <span class="nv">Mobius</span> <span class="nv">Sync</span> <span class="nv">a</span> <span class="nv">try</span> <span class="nv">as</span> <span class="nv">a</span> <span class="nv">Syncthing</span> <span class="nv">client</span> <span class="nv">on</span> <span class="nv">my</span> <span class="nv">iPhone</span> <span class="nb">and</span> <span class="nv">iPad.</span> <span class="nv">That</span> <span class="nv">went</span> <span class="nv">about</span> <span class="nv">as</span> <span class="nv">well</span> <span class="nv">as</span> <span class="nv">you</span><span class="ss">&#39;d</span> <span class="nv">expect</span> <span class="nv">for</span> <span class="nv">an</span> <span class="nv">iOS</span> <span class="nv">adaptation</span> <span class="nv">of</span> <span class="nv">something</span> <span class="nv">that</span> <span class="nv">wants</span> <span class="nv">to</span> <span class="nv">be</span> <span class="nv">an</span> <span class="nv">always-on</span> <span class="nv">filesystem-watching</span> <span class="nv">daemon.</span> <span class="nv">It</span> <span class="nv">wasn</span><span class="ss">&#39;t</span> <span class="nv">really</span> <span class="nv">worth</span> <span class="k">the</span> <span class="nv">stress</span> <span class="nv">of</span> <span class="nv">wondering</span> <span class="nv">what</span> <span class="nv">quantum</span> <span class="nv">state</span> <span class="nv">of</span> <span class="nv">sync</span> <span class="nv">everything</span> <span class="nv">is</span> <span class="nv">in,</span> <span class="nb">and</span> <span class="nv">I</span> <span class="nv">hated</span> <span class="nv">having</span> <span class="nv">to</span> <span class="nv">explicitly</span> <span class="nf">open</span> <span class="nv">it</span> <span class="nv">up</span> <span class="nv">to</span> <span class="nv">nudge</span> <span class="nv">it</span> <span class="nv">to</span> <span class="nv">sync.</span></span></span></code></pre></div>
<p>If a heading is marked as <code>TODO</code>, that translates to &ldquo;draft&rdquo; for Hugo. If you use org tags in the heading <code>:tag1:tag2:</code> those become post tags.</p>
<p>If you set up <code>org-capture</code> and a few hooks correctly, it takes a lot of friction away by exporting the Markdown files when you save the file.</p>
<p>Something has changed since I was last using it regularly, and some bugs crept into my setup. I was willing to live with a few of them, but last night I came across some goofy thing where Hugo&rsquo;s Markdown renderer (goldmark) and ox-hugo were interacting strangely, and the org-to-markdown conversion was indenting unordered lists enough that goldmark picked them up as indented code blocks. I did some poking around and saw that a lot of people have been vexed by that: goldmark uses the <a href="https://commonmark.org/">CommonMark</a> specification, which includes indented code blocks, and goldmark offers no toggle for it as a workaround.</p>
<p>How many seconds do we have of this precious life?</p>
<p>I do like working out of Emacs and not switching around to do stuff, so I found an old Ruby script I wrote to make generating a Hugo post with all the stuff particular to my setup and worked with a co-pilot to convert it to a lisp package.</p>
<p>When you invoke <code>hpost-new</code> it prompts for whether to follow the &ldquo;daily&rdquo; or regular post style, then asks for title, tags, and description, then plops the new file into the right place and opens it for editing.</p>
<p>This goes in <code>~/.config/doom/lisp</code>:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="c1">;;; hpost.el --- Create new Hugo posts from Emacs  -*- lexical-binding: t; -*-</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">;; Adjust this to point at your Hugo or ox‑hugo content directory.</span>
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">defcustom</span> <span class="nv">hpost-posts-dir</span> <span class="s">&#34;~/blog/content/posts/&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Directory where new Hugo posts are written.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="ss">:type</span> <span class="ss">&#39;directory</span> <span class="ss">:group</span> <span class="ss">&#39;hpost</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">hpost--slugify</span> <span class="p">(</span><span class="nv">title</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Convert TITLE to a URL‑friendly slug.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="k">let*</span> <span class="p">((</span><span class="nv">s</span> <span class="p">(</span><span class="nv">downcase</span> <span class="nv">title</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">s</span> <span class="p">(</span><span class="nv">replace-regexp-in-string</span> <span class="s">&#34;[^a-z0-9]+&#34;</span> <span class="s">&#34;-&#34;</span> <span class="nv">s</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">s</span> <span class="p">(</span><span class="nv">replace-regexp-in-string</span> <span class="s">&#34;^-\|-$&#34;</span> <span class="s">&#34;&#34;</span> <span class="nv">s</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nv">truncate-string-to-width</span> <span class="nv">s</span> <span class="mi">60</span> <span class="no">nil</span> <span class="no">nil</span> <span class="s">&#34;&#34;</span><span class="p">)))</span> <span class="c1">; hard cap at 60 chars</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">hpost--today</span> <span class="p">()</span> <span class="p">(</span><span class="nv">format-time-string</span> <span class="s">&#34;%Y-%m-%d&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">hpost--now</span>   <span class="p">()</span> <span class="p">(</span><span class="nv">format-time-string</span> <span class="s">&#34;%Y-%m-%dT%H:%M:%S%z&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">;;;###autoload</span>
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">hpost-new</span> <span class="p">(</span><span class="nv">title</span> <span class="nv">tags</span> <span class="nv">summary</span> <span class="k">&amp;optional</span> <span class="nv">daily</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Create a new Hugo post.
</span></span></span><span class="line"><span class="cl"><span class="s">
</span></span></span><span class="line"><span class="cl"><span class="s">Interactively prompts for TITLE, TAGS (comma‑delimited), and SUMMARY.
</span></span></span><span class="line"><span class="cl"><span class="s">With prefix arg, treat it as a daily note (pre‑sets title and tags).&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">interactive</span>
</span></span><span class="line"><span class="cl">   <span class="p">(</span><span class="k">let*</span> <span class="p">((</span><span class="nv">daily</span> <span class="p">(</span><span class="nf">y-or-n-p</span> <span class="s">&#34;Daily note? &#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">          <span class="p">(</span><span class="nv">title</span> <span class="p">(</span><span class="k">if</span> <span class="nv">daily</span>
</span></span><span class="line"><span class="cl">                     <span class="p">(</span><span class="nf">format</span> <span class="s">&#34;Daily notes for %s&#34;</span> <span class="p">(</span><span class="nv">hpost--today</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">                   <span class="p">(</span><span class="nv">read-string</span> <span class="s">&#34;Title: &#34;</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">          <span class="p">(</span><span class="nv">tags</span>  <span class="p">(</span><span class="k">if</span> <span class="nv">daily</span> <span class="s">&#34;journal&#34;</span>
</span></span><span class="line"><span class="cl">                   <span class="p">(</span><span class="nv">read-string</span> <span class="s">&#34;Tags (comma): &#34;</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">          <span class="p">(</span><span class="nv">summary</span> <span class="p">(</span><span class="nv">read-string</span> <span class="s">&#34;Summary: &#34;</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">     <span class="p">(</span><span class="nc">list</span> <span class="nv">title</span> <span class="nv">tags</span> <span class="nv">summary</span> <span class="nv">daily</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="k">let*</span> <span class="p">((</span><span class="nv">slug</span>    <span class="p">(</span><span class="k">if</span> <span class="nv">daily</span> <span class="s">&#34;daily-notes&#34;</span> <span class="p">(</span><span class="nv">hpost--slugify</span> <span class="nv">title</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">fname</span>   <span class="p">(</span><span class="nv">concat</span> <span class="p">(</span><span class="nv">hpost--today</span><span class="p">)</span> <span class="s">&#34;-&#34;</span> <span class="nv">slug</span> <span class="s">&#34;.md&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">path</span>    <span class="p">(</span><span class="nv">expand-file-name</span> <span class="nv">fname</span> <span class="nv">hpost-posts-dir</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nb">when</span> <span class="p">(</span><span class="nv">file-exists-p</span> <span class="nv">path</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nv">user-error</span> <span class="s">&#34;File %s already exists&#34;</span> <span class="nv">fname</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nv">with-temp-buffer</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nv">insert</span> <span class="p">(</span><span class="nf">format</span>
</span></span><span class="line"><span class="cl"><span class="s">&#34;---
</span></span></span><span class="line"><span class="cl"><span class="s">title: \&#34;%s\&#34;
</span></span></span><span class="line"><span class="cl"><span class="s">date: %s
</span></span></span><span class="line"><span class="cl"><span class="s">draft: true
</span></span></span><span class="line"><span class="cl"><span class="s">tags:%s
</span></span></span><span class="line"><span class="cl"><span class="s">summary: \&#34;%s\&#34;
</span></span></span><span class="line"><span class="cl"><span class="s">---
</span></span></span><span class="line"><span class="cl"><span class="s">
</span></span></span><span class="line"><span class="cl"><span class="s">&#34;</span> <span class="nv">title</span> <span class="p">(</span><span class="nv">hpost--now</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">        <span class="p">(</span><span class="nv">mapconcat</span> <span class="p">(</span><span class="nb">lambda</span> <span class="p">(</span><span class="no">t</span><span class="p">)</span> <span class="p">(</span><span class="nf">format</span> <span class="s">&#34;\n- %s&#34;</span> <span class="p">(</span><span class="nf">string-trim</span> <span class="no">t</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">                   <span class="p">(</span><span class="nv">split-string</span> <span class="nv">tags</span> <span class="s">&#34;,&#34;</span><span class="p">)</span> <span class="s">&#34;&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">        <span class="nv">summary</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nv">write-region</span> <span class="p">(</span><span class="nv">point-min</span><span class="p">)</span> <span class="p">(</span><span class="nv">point-max</span><span class="p">)</span> <span class="nv">path</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nv">find-file</span> <span class="nv">path</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nv">message</span> <span class="s">&#34;New post created: %s&#34;</span> <span class="nv">path</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nf">provide</span> <span class="ss">&#39;hpost</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">;;; hpost.el ends here</span></span></span></code></pre></div>
<p>&hellip; and the config:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="c1">;; --- Hugo post helper ---------------------------------------</span>
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">use-package!</span> <span class="nv">hpost</span>
</span></span><span class="line"><span class="cl">  <span class="ss">:load-path</span> <span class="s">&#34;lisp/&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="ss">:defer</span> <span class="no">t</span>
</span></span><span class="line"><span class="cl">  <span class="ss">:custom</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">hpost-posts-dir</span> <span class="s">&#34;~/blog/content/posts/&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="ss">:config</span>
</span></span><span class="line"><span class="cl">  <span class="c1">;; Optional keybinding:  &lt;leader&gt; n h</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">map!</span> <span class="ss">:leader</span>
</span></span><span class="line"><span class="cl">        <span class="p">(</span><span class="ss">:prefix</span> <span class="p">(</span><span class="s">&#34;n&#34;</span> <span class="o">.</span> <span class="s">&#34;notes&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">         <span class="ss">:desc</span> <span class="s">&#34;New Hugo post&#34;</span> <span class="s">&#34;h&#34;</span> <span class="nf">#&#39;</span><span class="nv">hpost-new</span><span class="p">)))</span></span></span></code></pre></div>
<p>It goes well with a few helpers I made to fire up or shut down the Hugo preview server within Emacs:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">my-start-hugo-server</span> <span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Run Hugo server with live reloading.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="k">let*</span> <span class="p">((</span><span class="nv">root</span> <span class="p">(</span><span class="nv">projectile-project-root</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">default-directory</span> <span class="nv">root</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nf">compile</span> <span class="s">&#34;hugo server -D --navigateToChanged&#34;</span> <span class="no">t</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">my-stop-hugo-server</span> <span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Stop Hugo server.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nv">kill-compilation</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">map!</span> <span class="ss">:leader</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="ss">:prefix</span> <span class="p">(</span><span class="s">&#34;H&#34;</span> <span class="o">.</span> <span class="s">&#34;Hugo&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">       <span class="ss">:desc</span> <span class="s">&#34;Start Hugo Server&#34;</span> <span class="s">&#34;S&#34;</span> <span class="nf">#&#39;</span><span class="nv">my-start-hugo-server</span>
</span></span><span class="line"><span class="cl">       <span class="ss">:desc</span> <span class="s">&#34;Stop Hugo Server&#34;</span> <span class="s">&#34;s&#34;</span> <span class="nf">#&#39;</span><span class="nv">my-stop-hugo-server</span><span class="p">))</span></span></span></code></pre></div>
<p>So, <code>SPC H S</code> to start the test server, and <code>SPC n h</code> to start a new post. When I save the buffer, the preview server jumps to the newly written page in the browser.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Hugo Bear, ox-hugo, etc.</title>
      <link>https://mike.puddingtime.org/posts/2025-04-19-hugo-bear-ox-hugo-etc-dot/</link>
      <pubDate>Sat, 19 Apr 2025 00:00:00 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2025-04-19-hugo-bear-ox-hugo-etc-dot/</guid>
      <description>I&amp;rsquo;ve been feeling envious of the bear people.</description>
      <content:encoded><![CDATA[<p>I&rsquo;ve been feeling a little envious of the <a href="https://bearblog.dev">bear blog people</a>, and I sort of missed my Hugo blog, <em>and</em> I missed the very nice blogging pipeline I had all set up between GitHub and Cloudflare, so I spent some time reassembling it all and tweaking a few things here and there. I know I&rsquo;ve left a few bits of old functionality out, but I think that&rsquo;s okay: All part of the campaign to just do whatever seems okay to do, or to decide I don&rsquo;t want to do it anymore and quit doing it.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Daily Notes for 2024-01-11</title>
      <link>https://mike.puddingtime.org/posts/2024-01-11-daily-notes/</link>
      <pubDate>Thu, 11 Jan 2024 00:00:00 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2024-01-11-daily-notes/</guid>
      <description>Secrets of the ancients.</description>
      <content:encoded><![CDATA[<h2 id="secrets-of-the-ancients">Secrets of the Ancients</h2>
<p>I felt a little nostalgic for my old <a href="https://github.com/kaushalmodi/ox-hugo">ox-hugo setup</a> today. What was so great about it?</p>
<ul>
<li>One big org file.</li>
<li>Your stuff ends up in a regular Markdown file for portability.</li>
<li>Pretty nicely wired up in Doom&rsquo;s menu structure: <code>SPC X b d</code> and a daily post is underway.</li>
</ul>
<p>I took a look in <code>config.org</code> and it looked like all the config was still there, so I started a daily post. type type type type type &hellip; saaaaave? What was supposed to happen next? Whatever it was, it didn&rsquo;t happen. I tried the whole &ldquo;close your eyes and start typing&rdquo; thing to see if muscle memory would take over, but no &hellip; I hadn&rsquo;t used this setup since last June and it was gone from my fingers.</p>
<p>More fiddling and fussing &ndash; it turned out there was no muscle memory to forget because I&rsquo;d had it set up to autopublish on save. One of the cool things about <code>ox-hugo</code> is that if you leave a post heading in <code>TODO</code> state, it&rsquo;s a draft, so saving and auto-publishing is safe, even if you forget and wander off and push another commit somewhere.</p>
<p>But saving availed me nothing &hellip; huh &hellip; more poking.</p>
<p>Oh, right &hellip; I took <code>ox-hugo</code> out of my <code>packages.el</code> when I stopped using it to keep things light.</p>
<p>Now it&rsquo;s working again.</p>
<p>And wow did I just elide a ton of stuff I had so step back through to get it to where it &ldquo;just worked&rdquo; again. My <code>config.org</code> was full of helpful notes like:</p>
<blockquote>
<p>Of particular interest: <code>org-hugo-auto-set-lastmod</code>, which is set <code>'t</code> in a lot of examples. This one is pesky because when set <code>'t</code> it will bump the date on posts that don&rsquo;t have a <code>date:</code> property set (in favor of org-hugos <code>EXPORT_HUGO_DATE</code>). You don&rsquo;t get bit until you have <code>org-hugo-auto-export-on-save</code> set, at which point fat-fingering a save in the wrong post will change its mod date and hence its published date, teleporting it into the future.</p>
</blockquote>
<p>&hellip; but the whole setup was still littered with stuff I couldn&rsquo;t understand. Like &hellip;</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"> <span class="nv">COMMENT</span> <span class="nv">Local</span> <span class="nv">Variables</span> <span class="ss">:ARCHIVE:</span>
</span></span><span class="line"><span class="cl"><span class="err">#</span> <span class="nv">Local</span> <span class="nv">Variables:</span>
</span></span><span class="line"><span class="cl"><span class="err">#</span> <span class="nv">eval:</span> <span class="p">(</span><span class="nv">org-hugo-auto-export-mode</span> <span class="no">t</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="err">#</span> <span class="nv">End:</span></span></span></code></pre></div>
<p>Why the COMMENT thing? Why the ARCHIVE thing? Why &ldquo;End:&rdquo;  I don&rsquo;t remember how I learned that stuff or why it is what it is. I am pretty sure there were 10th century Saxon peasants who understood more about how ancient Roman highways were engineered than I was able to understand about my own setup.</p>
<p>I don&rsquo;t think, the day before I was let go from, er, &ldquo;Puppet by Perforce&rdquo; that I imagined I&rsquo;d spend as much time as I did doinking around with org-mode blogging, but wow did I. It was fun. I can tell it was fun because I was leaving myself paragraph-long notes on minor configuration issues.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Daily notes for 2023-12-11</title>
      <link>https://mike.puddingtime.org/posts/2023-12-11-daily-notes/</link>
      <pubDate>Mon, 11 Dec 2023 11:24:37 -0800</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2023-12-11-daily-notes/</guid>
      <description>Pop!_OS redux. Bad company in Emacs. You are not my spin doctor. A fun documentary about the Star Wars Holiday Special. Hugo previews in Emacs.</description>
      <content:encoded><![CDATA[<h2 id="pop_os-redux">Pop!_OS redux</h2>
<p>I set up a Linux PC over the weekend, and I&rsquo;m going to give Pop!_OS a try on it. I want to be able to use this machine for work sometimes, and there are a few desktop-y things that work better under Pop! than they do Fedora, maybe owing to Pop! remaining on xorg. Screen sharing in Zoom, for instance, works like you&rsquo;d expect on xorg and does not under Wayland. Apps with taskbar icons also work without the need for an extension.</p>
<p>You can tell Pop! is a little behind Fedora 39, but I&rsquo;m not sure it&rsquo;s that big a deal. I found <a href="https://launchpad.net/~ubuntuhandbook1/+archive/ubuntu/emacs">a PPA for Emacs 29.1</a>, but don&rsquo;t worry about much else: The stuff that moves with any speed is coming from a Flatpak. My <code>~/bin</code>, <code>~/.fonts</code>, and <code>~/.config/doom</code> are all handled via SyncThing.</p>
<p>What else?</p>
<ul>
<li>I noticed that my Elgato CamLink 4k + FujiFilm X-T2 work with a little less lag. I think there still is some, but it&rsquo;s pretty smooth.</li>
<li><a href="https://github.com/mikebrady/shairport-sync">shairplay-sync</a> has some permissions issues as a service, but works fine when I start it in daemon mode, so I&rsquo;ve moved my bookshelf speakers over to this machine: It acts like an AirPlay 2 endpoint for all my other stuff, and I can use Cider to get at my Apple Music stuff when I&rsquo;m working on this machine.</li>
<li>There&rsquo;s less font weirdness than under Fedora, meaning most apps show most fonts at a normal size out of the box and don&rsquo;t require passing environmental variables along or messing with config files.</li>
<li>My Jabra Engage 75 works fine with this thing, so no more messing around with AirPods: I just plugged it into an open port and I&rsquo;m back to reliable audio.</li>
<li>The rbenv and ruby-build that ship with Jammy don&rsquo;t have any of Ruby 3.x available. I just installed that on my own and added ruby-build as a plugin. Problem solved.</li>
</ul>
<p>Otherwise &hellip; I got through a day with it and it worked great: No weird glitches, crashes, or whatever. Multiple Zoom calls. Oh, and I&rsquo;m down to my last possum sticker, but the wireless scanning stuff works great, too: I managed to get a hi-res scan of my last sticker so I can make more.</p>
<h2 id="bad-company">Bad company</h2>
<p>I like <code>company-mode</code> in Emacs when I&rsquo;m coding, I hate it when I&rsquo;m writing prose. It slows everything down to suggest words I do not need suggested. This incantation fixed it:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="k">setq</span> <span class="nv">company-global-modes</span> <span class="o">&#39;</span><span class="p">(</span><span class="nf">not</span> <span class="nv">text-mode</span> <span class="nv">markdown-mode</span> <span class="nv">org-mode</span><span class="p">))</span></span></span></code></pre></div>
<h2 id="dont-spin-me">Don&rsquo;t spin me</h2>
<p>I enjoyed the most recent episode of <a href="https://www.patreon.com/badfaithpodcast/posts">Bad Faith</a>, &ldquo;Vibecession?&rdquo;, partly for the analysis and partly because one of the guests got to the thing that has been bothering me the most about the discourse around the economy:</p>
<blockquote>
<p>&ldquo;&hellip; as to why people are so heated in the first place I think you have a few things going on. One you do have people who are just kind of concerned about Biden&rsquo;s electoral prospects they&rsquo;re worried about Trump and they&rsquo;re worried about [&hellip;] a negative narrative.</p>
</blockquote>
<blockquote>
<p>&ldquo;You&rsquo;ve always got people out there who although they [&hellip;] appear to be kind of making objective arguments about this or that topic they&rsquo;re really mostly worried about trying to kind of steer the discourse in one way or another to to be more favorable to Democrats or less favorable to Democrats or whatever so there&rsquo;s that aspect [&hellip;] of the election worrying &hellip;&rdquo;</p>
</blockquote>
<p>I posted about it a few days ago:</p>
<iframe src="https://social.lol/@mph/111547466665352579/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://social.lol/embed.js" async="async"></script>
<p>&hellip; and then:</p>
<iframe src="https://social.lol/@mph/111547498854213817/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://social.lol/embed.js" async="async"></script>
<p>&hellip; and then I favorably boosted this:</p>
<iframe src="https://mastodon.social/@tess/111545872352995486/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://mastodon.social/embed.js" async="async"></script>
<p>&hellip; because if there&rsquo;s one word I have worn some grooves into over the past four years, it is &ldquo;precarity.&rdquo;</p>
<p>I don&rsquo;t know. We can either speak truthfully or we cannot, and I am not responding well to progressives or leftists or whatever who do not want to speak truthfully because they believe that are actually unpaid press secretaries for the Biden administration.</p>
<p>I&rsquo;m not telling anyone what to do with their spare time, I&rsquo;m just saying that if you&rsquo;re talking to me, leave me out of the four-dimensional chess game. I show up every election and vote exactly as you&rsquo;d expect. It is <em>okay</em> if, in December of the year before an election, I say &ldquo;I wish we had a better alternative than Biden.&rdquo; And it is super okay if I say, &ldquo;you know what, I wish we had a better alternative than this entire way of being we&rsquo;ve landed on.&rdquo;</p>
<h2 id="a-disturbance-in-the-force">A Disturbance in The Force</h2>
<p><em><a href="https://www.disturbanceintheforce.com/">A Disturbance in the Force</a></em> is a documentary about the 1978 <em>Star Wars Holiday Special</em>.</p>
<p>Al and I went to see it at the Hollywood Theater several years ago. I managed to win a cool Boba Fett poster (the cartoon version, from the special). It truly is wretched, but the documentary does a nice job of explaining that actually <em>everything</em> in 1978 was at least a little wretched, including the entire variety show genre.</p>
<p>And it does a nice job of explaining why the silly thing even mattered to anyone.</p>
<p>I had just turned nine when <em>Star Wars</em> came out. My family went to the theater to see a 6 p.m. showing on opening weekend in 1977, and ended up waiting around for a special 10 p.m. showing the theater added. It stayed in that theater for the better part of a year, and it became a way to just get me out of the house: Mom would give me ticket money, I&rsquo;d walk across the field and hop a ditch to get into the loading dock area of the mall, then walk around to the theater. When we visited relatives that year, &ldquo;what would Mike like to do&rdquo; was always &ldquo;go see <em>Star Wars</em>.&rdquo;</p>
<p>I was completely saturated in anything <em>Star Wars</em> I could get my hands on. Magazines, copies of <em>People</em> featuring any of the cast, the novelization, the comic books, <em>aaaaanything.</em> So the Holiday Special was a huge deal because it was gonna be more actual <em>Star Wars</em> and not just stuff <em>about</em> <em>Star Wars</em>.</p>
<p>And, as someone points out in the documentary, <em>Star Wars</em> was a very wild property at that point. Like, there were hints of deep lore and all, but the only &ldquo;canon&rdquo; you had to work with was the movie itself and wild theorizing. Some heretics thought Darth Vader was actually a robot. There were rumors that there would be a whole movie about Wookies. It was just this crazy thing that had landed in our pop culture lives and nothing was ever going to be the same again. So we were ripe for whatever George Lucas wanted to churn off the assembly line, including, apparently, a superannuated Wookie grandfather perving out to VR porn with Dianne Carroll.</p>
<p>Anyhow, the documentary is a fun 90-minute diversion. Not super heavy, but cool to hear from people who actually worked on it, and fun to see a lot of period clips, like the bonkers Donnie and Marie episode with Kris Kristofferson Han Solo and Paul Lynde Imperial officer.</p>
<h2 id="hugo-previews-in-emacs">Hugo Previews in Emacs</h2>
<p>I made this function to spin up the Hugo preview server while still working in Emacs:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">my-start-hugo-server</span> <span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Run Hugo server with live reloading.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="k">let*</span> <span class="p">((</span><span class="nv">root</span> <span class="p">(</span><span class="nv">projectile-project-root</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">default-directory</span> <span class="nv">root</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nf">compile</span> <span class="s">&#34;hugo server -D --navigateToChanged&#34;</span> <span class="no">t</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">my-stop-hugo-server</span> <span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Stop Hugo server.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nv">kill-compilation</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">map!</span> <span class="ss">:leader</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="ss">:prefix</span> <span class="p">(</span><span class="s">&#34;H&#34;</span> <span class="o">.</span> <span class="s">&#34;Hugo&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">       <span class="ss">:desc</span> <span class="s">&#34;Start Hugo Server&#34;</span> <span class="s">&#34;S&#34;</span> <span class="nf">#&#39;</span><span class="nv">my-start-hugo-server</span>
</span></span><span class="line"><span class="cl">       <span class="ss">:desc</span> <span class="s">&#34;Stop Hugo Server&#34;</span> <span class="s">&#34;s&#34;</span> <span class="nf">#&#39;</span><span class="nv">my-stop-hugo-server</span><span class="p">))</span></span></span></code></pre></div>
]]></content:encoded>
    </item>
    <item>
      <title>Daily notes for 2023-07-02</title>
      <link>https://mike.puddingtime.org/posts/2023-07-02-daily-notes/</link>
      <pubDate>Sun, 02 Jul 2023 10:38:55 -0700</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2023-07-02-daily-notes/</guid>
      <description>First Thorns match. A little more on Lemmy. Secret Invasion. Tagging Hugo posts in Emacs. Looking for monitor recommendations. Ben in France.</description>
      <content:encoded><![CDATA[<h2 id="first-thorns-match">First Thorns match</h2>
<p>Al and I went to our first Portland Thorns match last night. I think this is maybe the third soccer match I&rsquo;ve ever been to. The two previous were Timbers games for company parties and one of them got rained on pretty hard.</p>
<p>Since this was my first &ldquo;go sit in the regular seating, pay attention for 90 minutes&rdquo; match I wasn&rsquo;t sure what to expect. It was pretty fun. Our hosts are on their first season passes and newly energized about the sport, so their enthusiasm rubbed off. I think the other thing I kept coming back to was that watching requires patience similar to watching high-level jiu jitsu grapplers, but the other fans do a lot to contribute to your sense of the ebb, flow, rising and falling tension.</p>
<h2 id="more-lemmy">More Lemmy</h2>
<p>I have three accounts on assorted Lemmy instances, with a fourth pending. I learned about <a href="http://wefwef.app">wefwef</a> yesterday, which is a PWA that provides a nice client you can save to your phone homescreen same as Elk for Mastodon. I also have the beta of <a href="https://github.com/gkasdorf/memmy">memmy</a> on my phone.</p>
<p>There&rsquo;s not a ton of interaction on many of the communities I&rsquo;ve subscribed to so far. There&rsquo;s <a href="https://lemmy.ml/c/portland">a portland one</a> where people are swearing to be nicer, less hostile, and less censorious than /r/portland, which is a super low bar; and also less reactionary and goonish than /r/PortlandOR, which &mdash; again &mdash; low bar.</p>
<p>You can subscribe to communities in Mastodon by adding their address sans the <code>!</code> lemmy convention. I added a few but there&rsquo;s the usual &ldquo;now your instance needs to start pulling their stuff in&rdquo; lag.</p>
<h2 id="secret-invasion">Secret Invasion</h2>
<p>I&rsquo;m two episodes into the Skrull/Nick Fury espionage series <em>Secret Invasion</em>. Not sure. It feels like in terms of size, scale, and texture it&rsquo;s maybe a step down from <em>The Falcon and The Winter Soldier</em>, which felt pretty slick; and maybe a step up from <em>She-Hulk Attorney at Law</em>, which felt like it was made on a shoestring budget. None of those three have the charm of <em>Hawkeye</em>.</p>
<p>The dialog&rsquo;s sort of flat, there are &ldquo;big scenes&rdquo; that feel small. Samuel L. Jackson is doing something different and I&rsquo;m not sure it always works. There&rsquo;s a reason to not involve the Avengers that &hellip; it&rsquo;s going to always be a problem when there are any issues going on of a sub-Thanos scale where you&rsquo;re not just sending a group of second-string probationary Avengers to fix it.</p>
<p>But, you know, let&rsquo;s see where it goes.</p>
<h2 id="emacs-function-for-tagging-posts-in-hugo">Emacs function for tagging posts in Hugo</h2>
<p>I seem to be sticking to just blogging in Markdown, <a href="https://gist.github.com/pdxmph/9271cbb22d90f7e73a4b88664e0eaadd">using the Ruby script I wrote</a>. I didn&rsquo;t realize how much I missed reference links, or Markdown link notation in general. Tags are a little different story. I like the way <code>ox-hugo</code> uses org-mode&rsquo;s heading tags (<code>:foo:bar:baz:</code>) instead of Markdown/YAML&rsquo;s key tags (<code>tags: [&quot;foo&quot;,&quot;bar&quot;,&quot;baz&quot;]</code>).</p>
<p>So I made <code>mph/replace-tags-in-frontmatter</code> and stuck it in my growing Hugo submenu. You just invoke it and enter a comma-delimited set of tags and it replaces that frontmatter key. My script asks for tags up front, which is fine for single-topic posts where I know the tags up front. Doesn&rsquo;t work as well for daily posts, where it takes a day to know what&rsquo;s going in.</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">mph/replace-tags-in-frontmatter</span> <span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Replace the &#39;tags&#39; line in YAML frontmatter with user input.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nb">interactive</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nb">let*</span> <span class="p">((</span><span class="nv">frontmatter-start-regexp</span> <span class="s">&#34;^---\n&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">frontmatter-end-regexp</span> <span class="s">&#34;\n---\n&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">tags-regexp</span> <span class="s">&#34;^\\s-*tags:\\s-*\\[.*\\]&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">input</span> <span class="p">(</span><span class="nf">read-string</span> <span class="s">&#34;Enter new tags (comma-separated): &#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">new-tags</span> <span class="p">(</span><span class="nf">mapcar</span> <span class="p">(</span><span class="nb">lambda</span> <span class="p">(</span><span class="nv">tag</span><span class="p">)</span> <span class="p">(</span><span class="nf">format</span> <span class="s">&#34;\&#34;%s\&#34;&#34;</span> <span class="p">(</span><span class="nv">string-trim</span> <span class="nv">tag</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">                           <span class="p">(</span><span class="nv">split-string</span> <span class="nv">input</span> <span class="s">&#34;,&#34;</span><span class="p">))))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nb">save-excursion</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nf">goto-char</span> <span class="p">(</span><span class="nf">point-min</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nf">re-search-forward</span> <span class="nv">frontmatter-end-regexp</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nf">backward-char</span> <span class="mi">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nf">re-search-backward</span> <span class="nv">frontmatter-start-regexp</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nf">forward-char</span> <span class="mi">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nf">re-search-forward</span> <span class="nv">tags-regexp</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nf">replace-match</span> <span class="p">(</span><span class="nf">format</span> <span class="s">&#34;tags: [%s]&#34;</span> <span class="p">(</span><span class="nf">mapconcat</span> <span class="nf">#&#39;identity</span> <span class="nv">new-tags</span> <span class="s">&#34;,&#34;</span><span class="p">))))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nf">message</span> <span class="s">&#34;Tags replaced successfully.&#34;</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">map!</span> <span class="nb">:leader</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nb">:prefix</span> <span class="p">(</span><span class="s">&#34;H&#34;</span> <span class="o">.</span> <span class="s">&#34;Hugo&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">       <span class="nb">:desc</span> <span class="s">&#34;Set tags for Hugo post&#34;</span> <span class="s">&#34;t&#34;</span> <span class="nf">#&#39;</span><span class="nv">mph/replace-tags-in-frontmatter</span><span class="p">))</span></span></span></code></pre></div>
<h2 id="ben-in-france">Ben in France</h2>
<p>Ben watched the Apple store in Strasbourg get smashed and looted, avoided a tear-gassing, and was briefly separated from his bike. He finally made it to the train after missing the first one out of town. Now he&rsquo;s on to the Netherlands.</p>
<p>When I was almost his exact age I went to Europe and then the then-Soviet Union as part of a student group. Our professor gave us a lot of advice on how to avoid local trouble, and since it was winter things were pretty much on rails anyhow: Cologne was mild, Copenhagen was wintry but okay, Stockholm was extremely cold, then Leningrad and Moscow were where I learned that -40 is the same on both the Fahrenheit and Celsius scales. Hungary: Cold and snowbound. Zurich: Not so bad but we were staying near a park known for aggressive cop sweeps. So there were opportunities for a little bit of mischief, but the overall vibe was &ldquo;travel in groups, don&rsquo;t go off alone.&rdquo; So we mostly didn&rsquo;t except for one guy who made himself sort of the group pariah.</p>
<p>When I think about my year in Korea, I&rsquo;m surprised nothing happened. I was there during a summer with some violent anti-US protests thanks to high-profile brawls between soldiers and Korean civilians. We were locked down on post for several weekends straight because the risk of violent altercation was high. I was a little bit of a loner over there, so it wasn&rsquo;t unusual for me to be out in the ville on my own, and a few times when I had to drive command staff up to Seoul for overnighters I just wandered around on my own after they cut me loose for the day. My <a href="https://en.wikipedia.org/wiki/Korean_Augmentation_To_the_United_States_Army">KATUSA</a> friend said my lonerish-ness made him nervous. I was in a weird frame of mind at that point &mdash; fresh out of jump school and hence invulnerable, more physically capable than I&rsquo;d ever been &mdash;  but he had a list of places I wasn&rsquo;t supposed to ever go and said the stakes would be higher than a beating or a black eye,  so I didn&rsquo;t go to those places. I got followed a few times other places, did the whole &ldquo;demonstrate situational awareness&rdquo; thing, and nothing ever happened.</p>
<p>Ben&rsquo;s over there with two other kids just roaming around, with the itinerary seeming to change as whims take them. It continues to make me incredibly happy for him. It took me a while to gain the confidence he has, his street savvy is a lot higher than mine was at his age, and his confidence comes from knowing how to get away from whatever it is, not steer into it.</p>
<h2 id="typography">typography</h2>
<p>I saw a blog go by with a really nice serifed body type. I spent 30 minutes messing around with Google Fonts trying to dial in something similar and ended up not liking anything I saw, so I picked something completely different to freshen up headings and nav but otherwise left everything alone.  I&rsquo;m not sure how much of not liking things was not liking them and how much was not being sure of my own typographical taste. Part of me thought &ldquo;oh! well! Go learn!&rdquo; and the rest of me outvoted that part.</p>
<p>Anyhow, day two of a four-day weekend. Nothing on the agenda for the next two days besides visiting a friend for a walk through Oaks Bottom tomorrow, and having some friends over for dinner for the Fourth. The park across the street is going to go completely bananas with the usual impromptu fireworks show, and there&rsquo;s a  better-than-even chance of the show more or less ending with a drunken brawl, so we tend to stick close to the house every year to make sure nothing catches on fire. This will be the 14th year we&rsquo;ve enjoyed this particular experience. This year I&rsquo;m anticipating it with less dread than normal, and maybe even a little amusement.</p>
<p>Somehow our little park became the place a lot of people go to set off their illegal fireworks. People start showing up in the early afternoon to set up chairs and blankets at the edge of the treeline. Within an hour of sundown everything is parked in and there are two rows of picnic chairs around the perimeter of the park, which is a block square minus maybe 50 or 75 yards of treeline on our end of it.</p>
<p>On the one hand, wow it can be annoying, especially when people block your driveway, set fireworks off next to your car, or set things on fire. And nobody packs out their trash, so the park is strewn with trash and expended fireworks the next morning. But it&rsquo;s also just &hellip; this thing that happens. People get a lot of joy from it. It&rsquo;s not official or sanctioned. It&rsquo;s seems to be a spontaneous thing and it happens every year. When we had a rescue dog who was terrorized by the whole thing it was the absolute worst. Now that we don&rsquo;t, I feel bad for all the other dogs and people in the neighborhood who are suffering, but it doesn&rsquo;t feel <em>personal</em>, and the cops and fire department have zero interest in doing anything to curtail something they come around and watch every year. So there&rsquo;s not much to do but watch it unfold and people watch.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Daily Notes for 2023-06-04</title>
      <link>https://mike.puddingtime.org/posts/2023-06-04-daily-notes/</link>
      <pubDate>Sun, 04 Jun 2023 00:00:00 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2023-06-04-daily-notes/</guid>
      <description>Denote and encrypted notes plus the whole mobile angle.  Hugo preview server and ox-hugo. What happened to V.</description>
      <content:encoded><![CDATA[<h2 id="denote-and-encrypted-notes">Denote and encrypted notes</h2>
<p>I want to have access to my Denote notes via SyncThing on a machine I don&rsquo;t completely control (but is not, to be clear, operating in a hostile environment) and I want them to be encrypted, same as my <code>org-journal</code> files. I should probably just ask Prot, but as near as I can tell the <em>clean</em> way to encrypt notes in Denote is to add an &ldquo;org.gpg&rdquo; type to <code>denote-file-types</code>, like this:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nv">add-to-list</span> <span class="ss">&#39;denote-file-types</span>
</span></span><span class="line"><span class="cl">             <span class="o">&#39;</span><span class="p">(</span><span class="nv">org-gpg</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:extension</span> <span class="s">&#34;.org.gpg&#34;</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:date-function</span> <span class="nv">denote-date-org-timestamp</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:front-matter</span> <span class="nv">denote-org-front-matter</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:title-key-regexp</span> <span class="s">&#34;^#\\+title\\s-*:&#34;</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:title-value-function</span> <span class="nf">identity</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:title-value-reverse-function</span> <span class="nv">denote-trim-whitespace</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:keywords-key-regexp</span> <span class="s">&#34;^#\\+filetags\\s-*:&#34;</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:keywords-value-function</span> <span class="nv">denote-format-keywords-for-org-front-matter</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:keywords-value-reverse-function</span> <span class="nv">denote-extract-keywords-from-front-matter</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:link</span> <span class="nv">denote-org-link-format</span>
</span></span><span class="line"><span class="cl">               <span class="nb">:link-in-context-regexp</span> <span class="nv">denote-org-link-in-context-regexp</span><span class="p">))</span></span></span></code></pre></div>
<p>It looks like a lot to do a little, but it&rsquo;s just a clone of the <code>org</code> type that&rsquo;s already in that list, with the extension changed. I suppose one could just alter the <code>org</code> type, but then you don&rsquo;t have an unencrypted type if you want it.</p>
<p>With that in place, you can do:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nb">setq</span> <span class="nv">denote-file-type</span> <span class="ss">&#39;org-gpg</span><span class="p">)</span></span></span></code></pre></div>
<p>&hellip; and anything you create with the <code>denote</code> command uses that type, with the correct extension. Given the right general config:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nb">require</span> <span class="ss">&#39;epa-file</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">epa-file-enable</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nb">setq</span> <span class="nv">org-crypt-key</span> <span class="s">&#34;foo@bar.baz&#34;</span><span class="p">)</span></span></span></code></pre></div>
<p>&hellip; it all &ldquo;just works,&rdquo; with decryption handled transparently provided the gpg agent is set up correctly, and I preserve the option to have unencrypted notes for whatever reason I might want them at some point.</p>
<p>To get my existing notes into an encrypted state, I used this script:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="cp">#!/bin/zsh
</span></span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">encrypt_file<span class="o">()</span> <span class="o">{</span>
</span></span><span class="line"><span class="cl">  <span class="nb">local</span> <span class="nv">file_path</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="nb">local</span> <span class="nv">recipient</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$2</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="nb">local</span> <span class="nv">encrypted_file_path</span><span class="o">=</span><span class="s2">&#34;</span><span class="si">${</span><span class="nv">file_path</span><span class="si">}</span><span class="s2">.gpg&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  gpg --encrypt --recipient <span class="s2">&#34;</span><span class="nv">$recipient</span><span class="s2">&#34;</span> --output <span class="s2">&#34;</span><span class="nv">$encrypted_file_path</span><span class="s2">&#34;</span> <span class="s2">&#34;</span><span class="nv">$file_path</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="nb">echo</span> <span class="s2">&#34;File encrypted: </span><span class="nv">$encrypted_file_path</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">encrypt_files_in_directory<span class="o">()</span> <span class="o">{</span>
</span></span><span class="line"><span class="cl">  <span class="nb">local</span> <span class="nv">directory</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="nb">local</span> <span class="nv">recipient</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$2</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="k">for</span> file_path in <span class="s2">&#34;</span><span class="nv">$directory</span><span class="s2">&#34;</span>/*.org<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">    encrypt_file <span class="s2">&#34;</span><span class="nv">$file_path</span><span class="s2">&#34;</span> <span class="s2">&#34;</span><span class="nv">$recipient</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="k">done</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Usage: ./encrypt_files.sh directory recipient_email</span>
</span></span><span class="line"><span class="cl"><span class="nv">directory</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">recipient_email</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$2</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="o">[[</span> -n <span class="s2">&#34;</span><span class="nv">$directory</span><span class="s2">&#34;</span> <span class="o">&amp;&amp;</span> -n <span class="s2">&#34;</span><span class="nv">$recipient_email</span><span class="s2">&#34;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">  encrypt_files_in_directory <span class="s2">&#34;</span><span class="nv">$directory</span><span class="s2">&#34;</span> <span class="s2">&#34;</span><span class="nv">$recipient_email</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">else</span>
</span></span><span class="line"><span class="cl">  <span class="nb">echo</span> <span class="s2">&#34;Usage: ./encrypt_files.sh directory recipient_email&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">fi</span></span></span></code></pre></div>
<h2 id="the-mobile-problem">The mobile problem</h2>
<p>The tradeoff with that approach is that your mobile use case gets harder. I can still do something like mosh my way in to the Mac Studio with Tailscale, I guess.</p>
<p>I have the nagging feeling that Emacs-centric note taking wouldn&rsquo;t work great for me if I were dealing with a commute or other scenarios where mobile access is more important. Yes, there are beorg, <a href="https://plainorg.com">Plainorg</a>, and a few other options, but the syncing layer is the complicator. Some people seem to live fine just using git and maybe <a href="https://github.com/ryuslash/git-auto-commit-mode">git-auto-commit</a>, or just generally being more disciplined about their file use. I have generally felt better served by bespoke solutions, like you get with Obsidian, Things, and others. They&rsquo;re still subject to the occasional screwup, but I don&rsquo;t feel like I see them as often as I do with things that simply watch a file system and try to react appropriately.</p>
<p>I have been doing a little personal journaling about my preoccupations with mobile stuff. After tracing things back over the years, I recently realized that a lot of my fixation on getting stuff to work on a phone came from a pretty terrible time during the 2001 downturn.</p>
<p>All my teammates had been laid off and I was holding down a small network of Linux/open source sites that had previously involved a much larger team. If I didn&rsquo;t want things to get out of control I had to keep an eye on them over the weekend. That mentality caused a lot of lines to blur and it took years to unblur them. I was an early iPad enthusiast because I&rsquo;d internalized the idea that I should be able to do all kinds of work from anywhere at any time. Before that, I was really into the netbook thing because I could put an eeePC into a hip bag.</p>
<p>By the time I got to Puppet in 2012, working from home wasn&rsquo;t a novelty or an aspirational goal: I&rsquo;d been doing it for 13 or 14 years and was really glad to have an office to go to. Covid lockdown sparked a pretty bad reaction after the initial &ldquo;let&rsquo;s build a fire and sing songs while we wait for the drop ship&rdquo; phase because lines started blurring again.</p>
<div style="position: relative; width: 100%; padding-bottom: 56.25%;margin-bottom:20px;">
<iframe style="position:absolute; width:100%; height:100%;" src="https://getyarn.io/yarn-clip/1700a3aa-2d58-4411-a8cf-02cea98e8561/embed?autoplay=false&responsive=true"
frameborder="0">
</iframe>
</div>
<p>At the same time, just last week I had a pair of things to do in the afternoon and I&rsquo;d written some thoughts down about one of the events that I wanted to review while I was out of the house. Well &hellip; apparently SyncThing hadn&rsquo;t picked up on the changes before the machine I wrote them on went to sleep, so none of the other machines in the mesh &mdash; including a Synology I put SyncThing on for just these occasions &mdash; knew the notes existed.</p>
<p>At some point, &ldquo;oh, no problem, I&rsquo;ll just Tailscale in to the home network and WoL the Mac Studio so I can wake up SyncThing and then sync my changes down&rdquo; loses all its charm.</p>
<p>Ugh. Need to stop before I talk myself into doing something rash and disruptive.</p>
<h2 id="hugo-previews-while-working-in-ox-hugo">Hugo previews while working in ox-hugo</h2>
<p>I&rsquo;m not sure if there&rsquo;s a better way to do this, but this is working for me:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">mph/start-hugo-server</span> <span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Run Hugo server with live reloading and open the server URL in a browser.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nb">interactive</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nb">let*</span> <span class="p">((</span><span class="nv">root</span> <span class="p">(</span><span class="nv">projectile-project-root</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">default-directory</span> <span class="nv">root</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nv">compile</span> <span class="s">&#34;hugo server -D --navigateToChanged&#34;</span> <span class="no">t</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nv">run-at-time</span> <span class="s">&#34;3 sec&#34;</span> <span class="no">nil</span> <span class="p">(</span><span class="nb">lambda</span> <span class="p">()</span>
</span></span><span class="line"><span class="cl">                              <span class="p">(</span><span class="nv">browse-url</span> <span class="s">&#34;http://localhost:1313&#34;</span><span class="p">)))))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">mph/stop-hugo-server</span> <span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Stop Hugo server.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nb">interactive</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nv">kill-compilation</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">map!</span> <span class="nb">:leader</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nb">:prefix</span> <span class="p">(</span><span class="s">&#34;H&#34;</span> <span class="o">.</span> <span class="s">&#34;Hugo&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">       <span class="nb">:desc</span> <span class="s">&#34;Start Hugo Server&#34;</span> <span class="s">&#34;S&#34;</span> <span class="nf">#&#39;</span><span class="nv">mph/start-hugo-server</span>
</span></span><span class="line"><span class="cl">       <span class="nb">:desc</span> <span class="s">&#34;Stop Hugo Server&#34;</span> <span class="s">&#34;s&#34;</span> <span class="nf">#&#39;</span><span class="nv">mph/stop-hugo-server</span><span class="p">))</span></span></span></code></pre></div>
<p>I get a little <em>Compiling</em> treatment in the modeline while the preview server is running. My browser reloads any time I save my work.</p>
<h2 id="what-happened-to-v">What happened to V</h2>
<p>I always sort of wondered <a href="https://www.vanityfair.com/hollywood/2023/05/the-v-files-legacy">what happened to V</a> between the miniseries and the regular series. I had a vague sense it had gotten worse, but I was also a teenager and didn&rsquo;t have a lot of critical faculties beyond &ldquo;this seems sort of sucky and boring now.&rdquo; Well, now I know: They got rid of the person who created it, made it cheaper, and tossed out what someone thought were the dumb parts, which were actually the good parts.</p>
<p>Interesting factoid:</p>
<blockquote>
<p>V was watched in more than 33 million homes, which amounted to 40 percent of all TV viewership. (The most popular series in America today, Yellowstone, averages 13.1 million viewers per episode.)</p>
</blockquote>
<p>I recently tried to dig up what&rsquo;s considered &ldquo;good numbers&rdquo; in the streaming era and didn&rsquo;t get many satisfying answers. Seeing that a modern phenomenon like <em>Yellowstone</em> pulls about 40 percent of V&rsquo;s numbers is helpful. <em>V</em> was hyped all to hell at the time, so its &ldquo;television special event&rdquo; status probably skews things a little. (The <em>M*A*S*H</em> finale did 105.97 million total viewers, and that record may be impossible to break as streaming-driven atomization deepens.)</p>
<h2 id="the-phony-solidarity-of-the-american-pundit-class">&ldquo;The Phony Solidarity of the American Pundit Class&rdquo;</h2>
<p>I got to <a href="https://www.thenation.com/article/society/jordan-neely-pundits/">this post in The Nation</a> after it sat on the read later pile for a while.</p>
<p>It&rsquo;s very strange to see the post-2016 realignments continuing apace. This particular link targets the slice of the center-left-to-center-right commentariat that has learned to talk about &ldquo;working people.&rdquo;  That tic &mdash; the &ldquo;won&rsquo;t somebody think of the working people&rdquo; tic &mdash; feels symptomatic of a kind of <a href="/posts/2022-06-20-elite-capturehttpsmicroblogbooks-by/">elite capture</a> all its own.</p>
<p>I wrote a few years ago:</p>
<blockquote>
<p>&ldquo;I have a lot of time for some heterodox thinkers. I wish &lsquo;heterodox&rsquo; was narrow-able to something less broad than &lsquo;a coalition of middle class trolls, rebadged culture warriors, people who hate how much they get ratioed, and well-meaning independent thinkers.&rsquo;&rdquo;</p>
</blockquote>
<p>I think I may need to retract that. I was going through the podcast searching for an episode and saw a few descriptions here and there that tell me &ldquo;heterodox&rdquo; has stopped being a word one lands on after casting about for a better one, and has become a sort of branding exercise.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Daily Notes for 2023-05-18</title>
      <link>https://mike.puddingtime.org/posts/2023-05-18-daily-notes/</link>
      <pubDate>Thu, 18 May 2023 00:00:00 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2023-05-18-daily-notes/</guid>
      <description>Changing how Vertico opens projects in Doom: A shaggy dog story. The security system.  They Live!</description>
      <content:encoded><![CDATA[<h2 id="doom-emacs-opening-a-project-in-dired-instead-of-having-to-pick-a-file">Doom Emacs: Opening a project in dired instead of having to pick a file</h2>
<p>So, I thought that &ldquo;<a href="https://en.wikipedia.org/wiki/Feghoot">feghoot</a>&rdquo; and &ldquo;shaggy dog story&rdquo; were interchangeable. They are not. This section of today&rsquo;s daily post, while possibly qualifying as a shaggy dog story,  will not end with a pun. If you&rsquo;d like I am happy to do a Zoom call or meet for coffee or lunch and share one or two of the three feghoots I cherish. If there is anything more fun than telling one of them and seeing how long I can prolong your agony, I don&rsquo;t know what it is.</p>
<p>Actually, I do: It&rsquo;s being stuck in a room with a bunch of directors all sitting around awkwardly awaiting the CEO&rsquo;s arrival having exhausted all their small talk, and telling three feghoots in a row. The first one elicits uneasy and nervous grins, but what the hell: It&rsquo;s Mike and he does things like this and also we&rsquo;re out of small talk.</p>
<p>Rounding into the second one, the smiles are more forced. Is he going to prolong the telling? Is this one perhaps more efficient? Has anyone checked Slack to see where Yvonne is?</p>
<p>The third one, and you&rsquo;re out of &ldquo;nervous grin&rdquo; territory, and into the family of facial expressions that pair well with &ldquo;rictus.&rdquo; Except for the one or two people who are completely here for the performance. <em>Your</em> people.</p>
<p>And it&rsquo;s completely a race against time. The CEO could turn up at any time. Three feghoots in a row is a punishing exercise, so getting them all in without betraying the form with efficiency and then quietly packing up your wagon and riding out of town/slipping back into the mien of your accustomed station &hellip; it&rsquo;s a craft.  You know you&rsquo;re good at it when you start any conversation over the next six months with &ldquo;so &hellip; &quot; and people wince.</p>
<p>Anyhow:</p>
<p>By default, Doom&rsquo;s projectile project switcher command (<code>SPC p p</code>) uses <code>projectile-switch-project</code> to take you to another project. That means you hit <code>SPC p p</code> and it presents a list of known projects, you select one, and then it asks for a file. If you don&rsquo;t want to open a file, you just want to be in a project directory, and if you&rsquo;re using Helm, you can use <code>CTRL d</code> to open a given project directory in dired at the point in the workflow where you have a list of projects.</p>
<p>This is fine, and I think I actually may have seen a testy Stack Overflow exchange about the matter, because one would-be answerer could not understand for the life of them why you&rsquo;d <em>not</em> want to get to a specific file in a project right away &hellip; do you not know why you&rsquo;re going there?</p>
<p>I do, but I&rsquo;ve got my reasons. One is very straightforward: I want to go to the project so I can do magit stuff with it, and it is weird to me to have to open a file. Another is just a personal tic: When I switch to a project, opening its directory is sort of like pulling a project&rsquo;s folder out of the filing cabinet and opening it on my desk. It&rsquo;s a small mental reset. &ldquo;I was there doing that, I am now here doing this.&rdquo;</p>
<p>Anyhow, I&rsquo;m using <a href="https://github.com/minad/vertico">Vertico</a> instead of Helm. Vertico does not, as near as I can tell, have a way to open a directory in dired from the Projectile picker.</p>
<p>So &hellip;</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">my-vertico-project-dired</span> <span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nb">interactive</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nb">let*</span> <span class="p">((</span><span class="nv">collection</span> <span class="p">(</span><span class="nv">projectile-relevant-known-projects</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">         <span class="p">(</span><span class="nv">project</span> <span class="p">(</span><span class="nf">completing-read</span> <span class="s">&#34;Open project in dired: &#34;</span> <span class="nv">collection</span><span class="p">)))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nv">dired</span> <span class="p">(</span><span class="nf">expand-file-name</span> <span class="nv">project</span><span class="p">))))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">map!</span> <span class="nb">:leader</span>
</span></span><span class="line"><span class="cl">      <span class="nb">:desc</span> <span class="s">&#34;Open project in dired&#34;</span> <span class="s">&#34;p p&#34;</span> <span class="nf">#&#39;</span><span class="nv">my-vertico-project-dired</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="nb">:desc</span> <span class="s">&#34;Select project and file&#34;</span> <span class="s">&#34;p P&#34;</span> <span class="nf">#&#39;</span><span class="nv">projectile-switch-project</span><span class="p">)</span></span></span></code></pre></div>
<p>That just remaps <code>SPC p p</code> to a function that opens a given projectile project in dired, and then moves the original command to <code>SPC p P</code> if I ever want to go that way.</p>
<p>But that made me think about what problem I was really trying to solve initially, which was just opening my blog project in magit right away while in another project. So:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nb">defun</span> <span class="nv">my-magit-start-in-hugo</span> <span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nb">interactive</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">magit-status</span> <span class="s">&#34;~/src/hugo&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">map!</span> <span class="nb">:leader</span>
</span></span><span class="line"><span class="cl">      <span class="nb">:desc</span> <span class="s">&#34;Start Magit in ~/src/hugo&#34;</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;g h&#34;</span> <span class="nf">#&#39;</span><span class="nv">my-magit-start-in-hugo</span><span class="p">)</span></span></span></code></pre></div>
<p><code>SPC p p</code> is so wired into my muscle memory after just a few months of Doom use that I can imagine I won&rsquo;t use the shortcut that routes through the Hugo submenus that much. But it&rsquo;s there.</p>
<p>Anyhow, once I went through all that I asked myself why I had my <code>blog.org</code> file over in my <code>~/org/</code> hierarchy to begin with. I remember <em>why</em> I did it that way, but realized I didn&rsquo;t <em>need</em> to do it like that. So I moved it over into my Hugo repo/project where it can just travel around with the project it belongs in, anyhow.</p>
<p>But I can open any project straight into its directory using Vertico now!</p>
<h2 id="my-tiger-rock">My tiger rock</h2>
<p>Nine or ten years ago our house got broken into. Al came home to do the front door jimmied open, all of our small electronics crammed into suitcases, and our bikes moved out of the garage and into the living room. She closed the door, turned around, and walked across the street, where she sat on the curb and called me. Given that everything was sitting there in the living room, it stood to reason someone was, perhaps, still upstairs.</p>
<p>So I left work early, picked Ben up from his art camp, and came home. I poked my head in the house, saw the situation, and yelled up the stairs that it&rsquo;d be best, were anyone to still be up there, to get out, and that if they wanted to do that I&rsquo;d be across the street and not in their way. I don&rsquo;t know if that strategy made a ton of sense, but I wasn&rsquo;t going to commit to going in the house and cornering someone, and I wanted to offer them an out that might avert eventual violence.</p>
<p>So we all sat on the curb across the street from the house, unsure of how to proceed. Nobody had come out for over an hour, so it seemed unlikely they were still upstairs. Eventually, when I checked my mail, I realized that UPS had dropped a package off about an hour before Al got home. UPS always bangs on the door when they drop something off, so we reasoned that the UPS person had dropped off a package, pounded on the door, and frightened off the thieves. I poked my head back in, saw that the back sliding door was slightly ajar, and realized they&rsquo;d gone out the back.</p>
<p>The police eventually turned up, took the crowbar into custody in case there were prints, and told us it was sort of a nothingburger situation because nothing had been stolen. We had to pay to repair the door. It was sort of gross, once we took stock, to see how they&rsquo;d gone through drawers, dumped out boxes, tossed underwear around, etc.</p>
<p>So, we got an alarm system.  It&rsquo;s a common kind, not super expensive, easy to set up, has an app, and it will call a dispatcher if you don&rsquo;t disable a triggered alarm within a minute.</p>
<p>It has worked fine for the last decade, but a few months ago we were told it needed to have its cellular module upgraded, and we settled into a routine of the alarm system telling us it would soon be useless if we didn&rsquo;t open the manila envelope the vendor sent us and do brain surgery and us ignoring it and the increasingly insistent emails.</p>
<p>Maybe it&rsquo;s complacency, but we&rsquo;ve lived through the several years since that incident and we have formed an impression: We&rsquo;ve called 911 a few times over neighborhood shootings, a brutal assault in the park across the street from our house, a brush fire on the Springwater, an attempt to get help for a Spanish-speaking guy who&rsquo;d been mugged on the trail, and Al&rsquo;s shattered elbow joint from a longboarding accident. One of the faster responses we ever got was to the longboarding accident, which involved a three-jurisdiction squabble over who should come get her. The fire response wasn&rsquo;t bad. The violent crimes took over an hour, and on one of them no reports were collected even though we had a license number and description.</p>
<p>&ldquo;Should we even bother calling next time?&rdquo;</p>
<p>&ldquo;Yeah, tell your state representatives to give the police more money. We&rsquo;re not going to investigate it.&rdquo;</p>
<p><em>Literally.</em></p>
<p>This is, theoretically, the same agency that the alarm system dispatchers would contact were someone to break in.</p>
<p>So as I sat at the kitchen table with a tiny screw driver, carefully removing the old cell module and screwing in the new one, I rationalized the use of my time by remembering that the one time we have had a break-in, a loud noise is probably what frightened off the burglar, and that the alarm system does make a super loud noise. And also that if we had an alarm, and someone broke in, we&rsquo;d at least know it because we&rsquo;d get a ping from the app or an SMS and there&rsquo;d be less chance of anyone walking in on someone.</p>
<p>But the police part? There&rsquo;s always the Simpsons.</p>
<div style="text-align:center;">
<iframe width="560" height="315" src="https://www.youtube.com/embed/xSVqLHghLpw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
<h2 id="they-live">They Live</h2>
<p>&hellip; is <a href="https://hollywoodtheatre.org/events/they-live/">showing at the Hollywood</a> this week and next.</p>
<figure><img src="/img/they_live.gif"
    alt="GIF of Roddy Rowdy Piper in They Live - I&#39;m all outta bubblegum" width="500">
</figure>

<p>Its time was then. Its time is now.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Full content in the RSS feed (and how to add a second Hugo feed)</title>
      <link>https://mike.puddingtime.org/posts/2023-05-18-full-content-in-the-rss-feed/</link>
      <pubDate>Thu, 18 May 2023 00:00:00 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2023-05-18-full-content-in-the-rss-feed/</guid>
      <description>There&amp;rsquo;s finally a full-content RSS feed here.</description>
      <content:encoded><![CDATA[<p>It took me a while to figure it out after a failed first attempt, but I finally made a <a href="https://mike.puddingtime.org/index.xml">full-content RSS feed.</a> It&rsquo;s going under the same name as it was before as a partial feed, so it ought to just start providing the full content of posts now.</p>
<p>Previously I was using a modified feed that was meant to work well for social syndication (e.g. cross-posting to Mastodon and Twitter). It included just the post summary plus + tags as a way to aid with discovery (especially in Mastodon). That didn&rsquo;t sit super well with me &ndash; I&rsquo;m a &ldquo;full content&rdquo; kind of person &ndash; but figuring out how to get Hugo to do two feeds took some doing.</p>
<p>While I was in there, I also shortened the length of the feeds to 20 posts. I think there are a few more things to do to make it all work just so, but I&rsquo;m content to just have a full content feed back in place for now.  Also, if you liked the old feed format (I guess some people like summaries and clicking through?) it&rsquo;s still around, but I renamed it to <a href="https://mike.puddingtime.org/social.xml">/social.xml</a>, since its primary purpose is driving an <a href="https://ifttt.com">IFTTT</a> cross-posting recipe.</p>
<h2 id="setting-it-up">Setting it up</h2>
<p>If you&rsquo;re curious about how the two feeds are configured:</p>
<p>First, you need two template files in your site&rsquo;s <code>layouts/_default</code> directory:</p>
<ul>
<li><code>rss.xml</code></li>
<li><code>list.socialrss.xml</code></li>
</ul>
<p>The first one is a <a href="https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml">standard Hugo RSS template</a> with a slight modification to the <code>description</code> property to use the full content of a post vs. the summary.</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">description</span><span class="p">&gt;</span>{{ .Content | html }}<span class="p">&lt;/</span><span class="nt">description</span><span class="p">&gt;</span></span></span></code></pre></div>
<p>The second template uses the post summary, and adds a partial:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">description</span><span class="p">&gt;</span>{{ .Summary | html }} <span class="p">&lt;</span><span class="nt">br</span> <span class="p">/&gt;</span>
</span></span><span class="line"><span class="cl">   {{ partial &#34;rss_tags.html&#34; . }}
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">description</span><span class="p">&gt;</span></span></span></code></pre></div>
<p>The partial is how I get post tags for use in syndication to the social feed. Mastodon clients tend to auto-link hashtags, and hashtags are key to discovery in Mastodon:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">{{- $tags := .Language.Params.Taxonomies.tag | default &#34;tags&#34; }}
</span></span><span class="line"><span class="cl">{{- range ($.GetTerms $tags) }} #{{ .LinkTitle }}  {{- end }}</span></span></code></pre></div>
<p><code>config.yml</code> looks like this in my setup:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">outputs</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">home</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span>- <span class="l">HTML</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span>- <span class="l">RSS</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span>- <span class="l">SocialRSS</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span>- <span class="l">JSON</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">outputFormats</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">RSS</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">mediatype</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;application/rss+xml&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">baseName</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;index&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">isPlainText</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">notAlternative</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">SocialRSS</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">mediatype</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;application/rss+xml&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">baseName</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;social&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">isPlainText</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">mediaTypes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="s2">&#34;application/rss&#34;</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">suffixes</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">&#34;xml&#34;</span><span class="p">]</span></span></span></code></pre></div>
]]></content:encoded>
    </item>
    <item>
      <title>Daily notes for 2023-03-02</title>
      <link>https://mike.puddingtime.org/posts/2023-03-02-daily-notes-for-2023-03-02/</link>
      <pubDate>Thu, 02 Mar 2023 09:27:24 -0800</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2023-03-02-daily-notes-for-2023-03-02/</guid>
      <description>Tech industry resentment, language wars &amp;amp; PMC piety, how I write these, CSS of Theseus, Playdate cometh-ish, CNET and the PE people.</description>
      <content:encoded><![CDATA[<h2 id="cnet-and-the-pe-people">CNET and the PE people</h2>
<p><a href="https://www.theverge.com/2023/3/2/23622231/cnet-layoffs-ai-articles-seo-red-ventures">Reporting from The Verge on layoffs at CNET</a>:</p>
<blockquote>
<p>&ldquo;Under Red Ventures, former CNET employees say the venerated publication’s focus increasingly became winning Google searches by prioritizing SEO. On these highly trafficked articles, the company crams in lucrative affiliate marketing ads for things like loans or credit cards, cashing in every time a reader signs up.&rdquo;</p>
</blockquote>
<p>I worked for a company similar to this after they acquired the more traditional online news play I started at. They weren&rsquo;t so much a heavily operationalized affiliate marketing company as they were into something euphemistically referred to as &ldquo;performance marketing&rdquo; and more recognizably called &ldquo;lead generation.&rdquo;</p>
<p>Basically, they came in did a good thing (dropped all the display advertising), and then filled the resulting holes in the page with widgets and internal ads for whitepapers, ebooks, and insurance cost estimators. They had a set of verticals including:</p>
<ul>
<li>home construction</li>
<li>home health care</li>
<li>auto insurance</li>
<li>for-profit education</li>
<li>home finance</li>
<li>IT (the vertical I landed in)</li>
</ul>
<p>The basic model was:</p>
<ul>
<li>They buy up actual content plays that had tried to make a go of monetizing regular editorial content, or popular blogs in a given space, that have good SEO and good placement.</li>
<li>You, the consumer, search for &ldquo;enterprise routers&rdquo; or whatever topic</li>
<li>You find a piece of straight editorial content (e.g. a review, an howto article, whatever)</li>
<li>You see an ad for a free ebook about enterprise networking you can download in exchange for your email</li>
<li>The progressive data gathering kicks in: You see an offer to get access to the &ldquo;complete library of ebooks&rdquo; in exchange for information about your company, its size, and your purchasing authority</li>
<li>A Cisco, Juniper, or Ubiquiti orders up a list of verified leads, which is sold to them for some amount of money per lead.</li>
</ul>
<p>These same people <a href="https://www.sfgate.com/education/article/QuinStreet-settles-complaints-it-misled-veterans-3671497.php">lost a massive lawsuit from 16 state attorneys general</a> over their deceptive use of the gibill.com domain, which used little &ldquo;what kind of degree would you like to get with your benefits&rdquo; widgets to steer veterans to <a href="https://www.brookings.edu/blog/how-we-rise/2021/01/12/the-for-profit-college-system-is-broken-and-the-biden-administration-needs-to-fix-it/">for-profit educational outfits</a> and their notoriously bad outcomes.</p>
<p>It wasn&rsquo;t the best 18 months of my career.</p>
<p>Affiliate marketing is a little more direct, but both models are obsessed with SEO for obvious reasons. I did pay a visit to CNET to see if I could spot what the article is talking about and it looked more on the &ldquo;affiliate&rdquo; end than the &ldquo;lead-gen&rdquo; end.</p>
<p>This part from the Verge&rsquo;s coverage elicited a bitter laugh:</p>
<blockquote>
<p>&ldquo;Former staff recounted multiple instances in which CNET employees were pressured to change their coverage of companies that advertised with Red Ventures — a flagrant violation of journalistic ethics that put CNET’s editorial independence at serious risk.&rdquo;</p>
</blockquote>
<p>Yeah, no. Let&rsquo;s rewrite for accuracy:</p>
<blockquote>
<p>&ldquo;Former staff recounted multiple instances in which CNET employees were pressured to change their coverage of companies that advertised with Red Ventures — a flagrant violation of journalistic ethics that <s>put</s> destroyed CNET’s editorial independence <s>at serious risk</s>.&rdquo;</p>
</blockquote>
<h2 id="playdate-cometh-ish">Playdate cometh-ish</h2>
<p>I pre-ordered a <a href="https://play.date">Playdate</a> July of &lsquo;21, putting me early in Group 4. It looks like I <a href="https://lists.play.date/w/eT5LjRL6jVI2BVrlom3qpg/zCICVfx2YsIGsFqqjzVdUw/NsQButOkd892H763U7m76327bDKg">might get it</a> a few months shy of the second anniversary of that order.</p>
<p>It&rsquo;s funny, because over the past few years I&rsquo;ve gone through this evolution:</p>
<ol>
<li>I love video games.</li>
<li>I love the idea of loving video games but I don&rsquo;t seem to play much lately.</li>
<li>I like some video games, but not many and it seems like there are fewer of them all the time.</li>
<li>It&rsquo;s possible I actually don&rsquo;t like video games and won&rsquo;t admit this to myself.</li>
<li>It&rsquo;s not me that changed, it&rsquo;s the games.</li>
<li>No, I just don&rsquo;t like video games.</li>
<li>I miss loving video games, but I still don&rsquo;t like them.</li>
<li>I miss playing video games, but what&rsquo;s the point: Even games on the Switch are overdone.</li>
<li>I would like to try video games again, especially the big, overdone ones.</li>
<li>I like video games quite a bit.</li>
</ol>
<p>I ordered the Playdate as my thoughts darted around between stages 4 and 7, and the lingering thinking around stage &ldquo;7&rdquo; caused me to think a few times over the past two years &ldquo;maybe I should just cancel my order.&rdquo;</p>
<p>But I remember seeing that Group 3 was shipping in the past several months and forgetting what group I was even in and feeling briefly excited, then really let down that I am in Group 4. Where the Playdate is concerned, I am at stage 10, and am very excited that I might have the thing around my birthday.</p>
<p>Oh, looks like they&rsquo;re having <a href="https://www.destructoid.com/playdate-update-stream-airing-march-catalog-games/">some sort of media event next week</a>, too, to announce an online store?</p>
<h2 id="tech-industry-resentment">Tech industry resentment</h2>
<p><a href="https://www.niemanlab.org/2023/03/those-meddling-kids-the-reverse-scooby-doo-theory-of-tech-innovation-comes-with-the-excuses-baked-in/?utm_source=pocket_saves">Nieman again today</a> with a dyspeptic take on tech industry hype and blame-shifting. I have my share of gripes about tech hucksters, and there is nothing more fun than going back to turn-of-the-millennium WIRED to jeer, but the example of &ldquo;push&rdquo; as an over-hyped nothing-burger is weird to me. The ad-driven, surveillance capitalism model WIRED argued was inevitable most definitely did find us. Is &ldquo;the web&rdquo; dead? No, but there&rsquo;s a reason people like JWZ are constantly reminding us that <a href="https://www.jwz.org/blog/2022/11/psa-do-not-use-services-that-hate-the-internet/">apps are not the web</a>.</p>
<p>Generally on board with the idea that the tech people anti-regulation mantra is not great, though. It would have served the thesis better to steer clear of the WIRED-bashing this time, or just stuck to the odiousness of <a href="https://www.metamute.org/editorial/articles/californian-ideology">the Californian Ideology</a> generally.</p>
<h2 id="language-scuffles">Language scuffles</h2>
<p>Two things this week from George Packer and Katha Pollitt:</p>
<ul>
<li><a href="https://www.theatlantic.com/magazine/archive/2023/04/equity-language-guides-sierra-club-banned-words/673085/">&ldquo;The Moral Case Against Euphemism&rdquo;</a></li>
<li><a href="https://www.thenation.com/article/culture/roald-dahl-edited/">&ldquo;Let Kids Read Roald Dahl’s Books the Way He Wrote Them&rdquo;</a></li>
</ul>
<p>Packer&rsquo;s piece is more &hellip; reactionary? &hellip; and sort of late to the &ldquo;grousing about inclusive language&rdquo; party. I read it, but it&rsquo;s an exhausting discussion with examples on the usual spectrum from &ldquo;yes, George, &lsquo;urban&rsquo; is in fact a bad euphemism we&rsquo;d do well to not use the way these guides recommend we not use it&rdquo; to &ldquo;yes, their reasons for not using &lsquo;field work&rsquo; are not great, but &lsquo;practicum&rsquo; has been in common use for a long while.&rdquo;</p>
<p>I guess Packer annoys me: I&rsquo;ve read some version of his essay at least once every five years my entire adult life, and have come to view it the way I came to view the William Proxmire Golden Fleece Award. There is something reductive and showy about the whole exercise. If you&rsquo;re the type of reader to pause for even a second on one of his examples, you realize it&rsquo;s not even a very good exercise in nut-picking.</p>
<h2 id="how-the-sausage-is-made">How the sausage is made</h2>
<iframe src="https://social.lol/@tomk/109952435170112455/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://social.lol/embed.js" async="async"></script>
<p>My first little digest post practice was a way to keep up a blog during the work day: I&rsquo;d just open up a BBEdit file and start dropping stuff in during little breaks. I created a sort of dead man&rsquo;s switch situation, where a cron job would launch an AppleScript that grabbed the file at 17:30 and posted it for me.</p>
<p>I brought the practice with me, only over a week timeline, when I joined the Puppet marketing team. The content was always aimed at &ldquo;practitioners who like Puppet,&rdquo; but I had an informal rule about having only one item that promoted the company&rsquo;s interests: My belief was that marketing teams should give more value &ndash; help, interesting stuff to read &ndash; than they take. The posts did really well: They usually led the week in page views and stickiness, and people clicked through on the promotional stuff.</p>
<p>Most recently I&rsquo;ve brought the format back because I&rsquo;m still trying to suss out how I want blogging to work for me generally.</p>
<p>I&rsquo;ve got this blog, I&rsquo;ve got my omg.lol weekly update blog, and I&rsquo;ve got my micro.blog. I&rsquo;m beginning to chafe with the latter: It has great cross-posting capabilities, but I don&rsquo;t feel like a match for the culture on that service. If I&rsquo;m going to have a hosted provider of some sort, I want them to be more of a common carrier than a boutique. I think micro.blog is great, but:</p>
<ul>
<li>It feels opinionated in a way that doesn&rsquo;t work for me.</li>
<li>It feels like the feature requests I see go by are often filtered through some opinions about What Went Wrong with Social Media that are reactive guesses.</li>
<li>It&rsquo;s a little confusing in a needless way. There&rsquo;s a muddiness in the language in the interface.</li>
</ul>
<p>I guess it just feels suspended between the conflicting imperatives of making a mass tool &ndash; or at least wanting to build a mass tool &ndash; and preferring to remain in a very high-concept place where ideas don&rsquo;t have to cohere into well articulated, concrete outcomes for users. I&rsquo;m sure happy users of the service will disagree.</p>
<p>Anyhow, there is a standing todo on my writing topics list that&rsquo;s &ldquo;figure out your content strategy,&rdquo; which maybe sounds cold-blooded and businessy for a sole proprietor blog, but I am not doing this entirely for the entertainment value. &ldquo;Digest posts&rdquo; are a good way to keep from swamping your feed, post output, and archives, and to prevent burying the stuff you&rsquo;d like people to find without having to carve out a whole special hole to stick business stuff in.</p>
<p>But there&rsquo;s also just a good unto its own in doing the thing. It&rsquo;s daily writing, and it&rsquo;s framed in a way that makes it low stakes. If some of these things were their own entries, I&rsquo;d feel compelled to have a more concrete thesis, more detailed reasoning, citations, etc. That is not, in my experience, a good way to maintain the part of writing that is less about craft and more about motion.</p>
<p>So, the workflow to make these every day is:</p>
<ul>
<li>I spend the first 30 minutes of the day over tea and my RSS reader. I bookmark anything of passing interest if something about it stirs a comment in me.</li>
<li>When I go upstairs to sit down and do day planning, I pop open a terminal and run my <a href="https://paste.lol/mph/hpost.rb">Hugo posting script</a>. I added a switch that puts the right tags and title in place for me, and it opens a Sublime window if I just run <code>hpost --daily</code>.</li>
<li>I drop in any initial headings I&rsquo;ve thought of and put those in the post summary just to remind me.</li>
</ul>
<p>Then it&rsquo;s just a question of pecking at it during the day. I try to do Pomodoros for my important stuff, so I&rsquo;ll type in a few words here and there during the five-minute breaks, or if I&rsquo;m caught up for the day I might give the thing a full Pomodoro of its own. I give myself an hour for lunch, and often spend a chunk of that time filling things in or expanding on stuff.</p>
<p>That&rsquo;s about it. When I&rsquo;m at a point in the day where I can&rsquo;t see putting anything more into it, I ship it. I&rsquo;m working with Hugo and a Git-based publishing pipeline, so if there are multiple WIP commits I squash them and push them up just to make it easier to eyeball non-content changes. I&rsquo;m using <a href="https://mastofeed.org/">Mastofeed</a> to automate the posting process.</p>
<p>I&rsquo;d like more descriptive Masto posts, so I&rsquo;m considering cloning the RSS feed I use to make them: Mastofeed provides template tokens for title and link, so the description/summary goes missing. I might just do it by hand, for that matter.</p>
<h2 id="design-notes">Design notes</h2>
<p>The past few days I&rsquo;ve been making little improvements to the CSS of my theme here. The last time I did much with CSS was over ten years ago, and it was mostly in the context of using Bootstrap for personal projects. Responsive design practices &ndash; and the CSS features that support them &ndash; are new to me as something I&rsquo;d code for myself vs. relying on a framework, but I like being able to do stuff like progressively hide the visual clutter that works fine on a laptop or big tablet but not great on a phone. I started by taking a lot away, and now I&rsquo;m adding it back.</p>
<p>It&rsquo;s beginning to weigh on me a little, though:</p>
<p>I&rsquo;ve written a Hugo shortcode to make tags link to interesting things, and that&rsquo;s portable. I&rsquo;ve done some stuff to drive the front page &ldquo;Picture of the Week&rdquo; feature that is probably generalizable to another theme. I&rsquo;ve done a few other things that are probably better done some other way.</p>
<p>But basically I&rsquo;m layering stuff on top of a theme that was done more as a PoC for how to use <a href="https://simplecss.org">SimpleCSS</a> with Hugo out of the box and that plainly was not meant to carry some kinds of weight. So with all my little amendments and changes, my override directory is running about 25% of the total size of the original theme, for something where I started by thinking &ldquo;I&rsquo;ll just swap in my preferred palette.&rdquo;</p>
<p>That&rsquo;s not necessarily a bad thing in a &ldquo;well, many websites are CSS of Theseus propositions&rdquo; sense, but I know my own limitations. I&rsquo;ve also gotten better with Hugo over the past couple of months and would probably understand what some more complex themes are trying to do, rather than bouncing off of them and going primitivist.</p>
<p>Probably time to make a branch and see how badly stuff blows up when I lay on another theme.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Making a Picture of the Week feature on Hugo (Updated)</title>
      <link>https://mike.puddingtime.org/posts/2023-02-02-making-a-picture-of-the-week-feature-on-hugo/</link>
      <pubDate>Thu, 02 Feb 2023 07:25:02 -0800</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2023-02-02-making-a-picture-of-the-week-feature-on-hugo/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Updated: See the last section&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I wanted to take advantage of the flexibility I gave myself with Hugo to have a &amp;ldquo;Picture of the Week&amp;rdquo; (PotW) feature on my new site. It took a few iterations to get it to where I liked it, and there are some things about Hugo I learned along the way, but it&amp;rsquo;s done enough for now.&lt;/p&gt;
&lt;p&gt;The basic idea is that I want to take advantage of the streamlined upload and metadata workflow I&amp;rsquo;ve set up between Lightroom and &lt;a href=&#34;https://github.com/pdxmph/imgup&#34;&gt;imgup&lt;/a&gt; to share photos without a lot of repeating myself when it comes to writing titles, alt text, etc.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><strong>Updated: See the last section</strong></p>
<p>I wanted to take advantage of the flexibility I gave myself with Hugo to have a &ldquo;Picture of the Week&rdquo; (PotW) feature on my new site. It took a few iterations to get it to where I liked it, and there are some things about Hugo I learned along the way, but it&rsquo;s done enough for now.</p>
<p>The basic idea is that I want to take advantage of the streamlined upload and metadata workflow I&rsquo;ve set up between Lightroom and <a href="https://github.com/pdxmph/imgup">imgup</a> to share photos without a lot of repeating myself when it comes to writing titles, alt text, etc.</p>
<h3 id="first-try">First try</h3>
<p>My first iteration was to keep the data for a featured picture in the site config, like this:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">potw_img_url</span><span class="p">:</span><span class="w"> </span><span class="l">https://photos.smugmug.com/photos/i-TkDZjHx/0/ce3d02d6/XL/i-TkDZjHx-XL.jpg</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">potw_caption</span><span class="p">:</span><span class="w"> </span><span class="l">Manzanita Beach at Dawn</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">potw_alt</span><span class="p">:</span><span class="w"> </span><span class="l">A rocky beach at dawn with hills and a mountain shrouded in mist. A person in a red jacket looks over the ocean.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">potw_gallery_link</span><span class="p">:</span><span class="w">  </span><span class="l">https://pix.puddingtime.org/Uploads/n-47GBfb/i-TkDZjHx</span></span></span></code></pre></div>
<p>&hellip; then pull use a partial:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&#39;front-image&#39;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">figure</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;{{ .Site.Params.potw_gallery_link  }}&#34;</span> <span class="na">alt</span><span class="o">=</span><span class="s">&#34;{{ .Site.Params.potw_alt }}&#34;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&#34;{{ .Site.Params.potw_img_url }}&#34;</span> <span class="p">/&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">figcaption</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">Picture of the Week: {{ .Site.Params.potw_caption }}
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">figcaption</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">figure</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span></span></span></code></pre></div>
<p>That worked fine for my purposes, but I didn&rsquo;t like all the clicking to get SmugMug photo info into the config, and I hated the idea of touching my config to do a simple task.</p>
<p>It also had no memory of previous images and I preferred the idea of building a list of these items over time to make a specific PotW page, or to just have them in the record.</p>
<p>What I&rsquo;ve settled on now is a little less clicky, and I&rsquo;ve got an idea for how to make it even less clicky.</p>
<h3 id="second-try">Second try</h3>
<p>I started by setting up a specific PotW album in SmugMug. Anyone with the URL can see it, but it&rsquo;s not exposed right now. I upload photos to there.</p>
<p>Next, I made a shortcode that can talk to metadata stored in a page:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">figure</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;{{ $.Page.Params.potw_gallery_link  }}&#34;</span> <span class="na">alt</span><span class="o">=</span><span class="s">&#34;{{ $.Page.Params.potw_alt }}&#34;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&#34;{{ $.Page.Params.potw_img_url }}&#34;</span> <span class="p">/&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">figcaption</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">{{ $.Page.Params.title }}
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">figcaption</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">figure</span><span class="p">&gt;</span></span></span></code></pre></div>
<p>As you can see, the frontmatter needs to have a few extra bits in it:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nn">---</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">title:  &#39;Picture of the Week</span><span class="p">:</span><span class="w"> </span><span class="l">Profit from the Panic&#39;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">potw_img_url</span><span class="p">:</span><span class="w"> </span><span class="l">https://photos.smugmug.com/photos/i-87Bm3V2/0/ecba06f4/XL/i-87Bm3V2-XL.jpg</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">potw_alt</span><span class="p">:</span><span class="w"> </span><span class="l">Wheatpaste of a tv mounted on a human body giving a thumbs up. The TV reads &#34;Profit from the Panic&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">potw_gallery_link</span><span class="p">:</span><span class="w">  </span><span class="l">https://pix.puddingtime.org/Picture-of-the-Week/n-D5HJ4W/i-87Bm3V2</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">date</span><span class="p">:</span><span class="w"> </span><span class="ld">2023-02-01T20:10:15</span><span class="m">-0800</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">tags</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s1">&#39;potw&#39;</span><span class="p">,</span><span class="s1">&#39;photography&#39;</span><span class="p">]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">draft</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nn">---</span></span></span></code></pre></div>
<p>imgup&rsquo;s PotW page gives me the YAML frontmatter:</p>
<p><img src="https://photos.smugmug.com/photos/i-FmJxrP3/0/84ceb986/XL/i-FmJxrP3-XL.jpg" alt="A screenshot of a browser showing a page that has YAML snippets next to thumbnails of photos."></p>
<p>I can copy and paste it into a PotW post along with the shortcode and it&rsquo;s ready to go.</p>
<p>Pulling it into the front page is just a partial that pulls in the most recent item tagged <code>potw</code>:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl">{{ range first 1 .Site.Taxonomies.tags.potw }}
</span></span><span class="line"><span class="cl">    
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&#39;front-image&#39;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Picture of the Week<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">figure</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;{{ .Page.Params.potw_gallery_link  }}&#34;</span> <span class="na">alt</span><span class="o">=</span><span class="s">&#34;{{ .Page.Params.potw_alt }}&#34;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&#34;{{ .Page.Params.potw_img_url }}&#34;</span> <span class="p">/&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">figcaption</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">{{ .Page.Params.title }}
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">figcaption</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">figure</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">{{ end }}</span></span></code></pre></div>
<h3 id="whats-next">What&rsquo;s next</h3>
<p>It was quick and easy to just copy a route in imgup to make the PotW page, but it&rsquo;s still manual and clicky to make a PotW post. So my next step will be to hang an endpoint off imgup that automates the process of getting the most recent PotW gallery image and its metadata so I don&rsquo;t have to write the posts at all.</p>
<h3 id="update">Update</h3>
<p>Sinatra made it easy to add a tiny bit of logic to the existing PotW route to make it send back JSON:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl"><span class="k">unless</span> <span class="n">json</span> <span class="o">==</span> <span class="kp">true</span>
</span></span><span class="line"><span class="cl">  <span class="n">haml</span> <span class="ss">:potw</span>
</span></span><span class="line"><span class="cl"><span class="k">else</span> 
</span></span><span class="line"><span class="cl">  <span class="n">content_type</span>  <span class="ss">:json</span>
</span></span><span class="line"><span class="cl">  <span class="vi">@recents</span><span class="o">.</span><span class="n">first</span><span class="o">.</span><span class="n">to_json</span>
</span></span><span class="line"><span class="cl"><span class="k">end</span></span></span></code></pre></div>
<p>A simple script hits the endpoint, grabs the JSON, and writes it out to a file:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl"><span class="c1">##!/usr/bin/env ruby</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">require</span> <span class="s1">&#39;net/http&#39;</span>
</span></span><span class="line"><span class="cl"><span class="nb">require</span> <span class="s1">&#39;uri&#39;</span>
</span></span><span class="line"><span class="cl"><span class="nb">require</span> <span class="s1">&#39;json&#39;</span>
</span></span><span class="line"><span class="cl"><span class="nb">require</span> <span class="s1">&#39;date&#39;</span>
</span></span><span class="line"><span class="cl"><span class="nb">require</span> <span class="s1">&#39;slugify&#39;</span>
</span></span><span class="line"><span class="cl"><span class="nb">require</span> <span class="s1">&#39;yaml&#39;</span>
</span></span><span class="line"><span class="cl"><span class="nb">require</span> <span class="s1">&#39;optparse&#39;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># set default tags for each entry. The &#34;tags&#34; option allows you to add more</span>
</span></span><span class="line"><span class="cl"><span class="n">tags</span> <span class="o">=</span> <span class="o">[</span><span class="s1">&#39;photography&#39;</span><span class="p">,</span> <span class="s1">&#39;potw&#39;</span><span class="o">]</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">options</span> <span class="o">=</span> <span class="p">{}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="no">OptionParser</span><span class="o">.</span><span class="n">new</span> <span class="k">do</span> <span class="o">|</span><span class="n">parser</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">  <span class="n">parser</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="s2">&#34;-t&#34;</span><span class="p">,</span> <span class="s2">&#34;--test&#34;</span><span class="p">,</span> <span class="s2">&#34;Changes the endpoint to localhost:4567&#34;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">o</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">    <span class="n">options</span><span class="o">[</span><span class="ss">:test</span><span class="o">]</span> <span class="o">=</span> <span class="kp">true</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="n">parser</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="s2">&#34;-o&#34;</span><span class="p">,</span> <span class="s2">&#34;--overwrite&#34;</span><span class="p">,</span> <span class="s2">&#34;Danger: Overwrite the existing potw if there&#39;s a conflict.&#34;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">o</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">    <span class="n">options</span><span class="o">[</span><span class="ss">:overwrite</span><span class="o">]</span> <span class="o">=</span> <span class="kp">true</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="n">parser</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="s2">&#34;-T&#34;</span><span class="p">,</span> <span class="s2">&#34;--tags TAGS&#34;</span><span class="p">,</span> <span class="s2">&#34;Comma-delimited tags for the post, e.g. &#39;banana,apple,pear&#39;&#34;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">o</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">    <span class="n">options</span><span class="o">[</span><span class="ss">:tags</span><span class="o">]</span> <span class="o">=</span> <span class="n">o</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;,&#39;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">options</span><span class="o">[</span><span class="ss">:tags</span><span class="o">].</span><span class="n">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">t</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">      <span class="n">tags</span> <span class="o">&lt;&lt;</span> <span class="n">t</span>
</span></span><span class="line"><span class="cl">    <span class="k">end</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="n">parser</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="s2">&#34;-h&#34;</span><span class="p">,</span> <span class="s2">&#34;--help&#34;</span><span class="p">,</span> <span class="s2">&#34;Get help.&#34;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">o</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">    <span class="nb">puts</span> <span class="n">parser</span>
</span></span><span class="line"><span class="cl">    <span class="nb">exit</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">end</span><span class="o">.</span><span class="n">parse!</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="n">options</span><span class="o">[</span><span class="ss">:test</span><span class="o">]</span> <span class="o">==</span> <span class="kp">true</span>
</span></span><span class="line"><span class="cl">  <span class="n">endpoint</span> <span class="o">=</span> <span class="s1">&#39;http://localhost:4567/potw?json=1&#39;</span>
</span></span><span class="line"><span class="cl"><span class="k">else</span>
</span></span><span class="line"><span class="cl">  <span class="n">endpoint</span> <span class="o">=</span> <span class="s1">&#39;https://imgup.puddingtime.org/potw?json=1&#39;</span>
</span></span><span class="line"><span class="cl"><span class="k">end</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">site_posts_dir</span> <span class="o">=</span> <span class="s2">&#34;~/src/simple/content/posts/&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">date</span> <span class="o">=</span> <span class="no">Date</span><span class="o">.</span><span class="n">today</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&#34;%Y-%m-%d&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">long_date</span> <span class="o">=</span> <span class="no">Time</span><span class="o">.</span><span class="n">now</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&#34;%Y-%m-%dT%H:%M:%S%z&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">title</span> <span class="o">=</span> <span class="n">date</span> <span class="o">+</span> <span class="s1">&#39;-potw&#39;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">slug</span> <span class="o">=</span> <span class="n">title</span><span class="o">.</span><span class="n">slugify</span>
</span></span><span class="line"><span class="cl"><span class="n">filename</span> <span class="o">=</span>  <span class="n">slug</span> <span class="o">+</span> <span class="s1">&#39;.md&#39;</span>
</span></span><span class="line"><span class="cl"><span class="n">file_path</span> <span class="o">=</span> <span class="no">File</span><span class="o">.</span><span class="n">expand_path</span><span class="p">(</span><span class="n">site_posts_dir</span> <span class="o">+</span> <span class="n">filename</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="no">File</span><span class="o">.</span><span class="n">exists?</span><span class="p">(</span><span class="n">file_path</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="n">options</span><span class="o">[</span><span class="ss">:overwrite</span><span class="o">]</span> <span class="o">!=</span> <span class="kp">true</span>
</span></span><span class="line"><span class="cl">  <span class="nb">abort</span><span class="p">(</span><span class="s2">&#34;*** Error: </span><span class="si">#{</span><span class="n">file_path</span><span class="si">}</span><span class="s2"> already exists. Exiting.&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="k">end</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">uri</span> <span class="o">=</span> <span class="no">URI</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">endpoint</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">request</span> <span class="o">=</span> <span class="no">Net</span><span class="o">::</span><span class="no">HTTP</span><span class="o">::</span><span class="no">Get</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">uri</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">request</span><span class="o">.</span><span class="n">basic_auth</span><span class="p">(</span><span class="no">ENV</span><span class="o">[</span><span class="s1">&#39;IMGUP_USER&#39;</span><span class="o">]</span><span class="p">,</span> <span class="no">ENV</span><span class="o">[</span><span class="s1">&#39;IMGUP_PASS&#39;</span><span class="o">]</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">req_options</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="ss">use_ssl</span><span class="p">:</span> <span class="n">uri</span><span class="o">.</span><span class="n">scheme</span> <span class="o">==</span> <span class="s2">&#34;https&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">response</span> <span class="o">=</span> <span class="no">Net</span><span class="o">::</span><span class="no">HTTP</span><span class="o">.</span><span class="n">start</span><span class="p">(</span><span class="n">uri</span><span class="o">.</span><span class="n">hostname</span><span class="p">,</span> <span class="n">uri</span><span class="o">.</span><span class="n">port</span><span class="p">,</span> <span class="n">req_options</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">http</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">  <span class="n">http</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="n">request</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="k">end</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">json</span> <span class="o">=</span> <span class="no">JSON</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">response</span><span class="o">.</span><span class="n">body</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">yaml</span> <span class="o">=</span> <span class="no">YAML</span><span class="o">.</span><span class="n">dump</span><span class="p">(</span><span class="n">json</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">potw_post</span> <span class="o">=</span> <span class="s">&lt;&lt;-POTW
</span></span></span><span class="line"><span class="cl"><span class="c1">#{yaml}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="ss">date</span><span class="p">:</span> <span class="c1">#{long_date}</span>
</span></span><span class="line"><span class="cl"><span class="ss">tags</span><span class="p">:</span> <span class="c1">#{tags}</span>
</span></span><span class="line"><span class="cl"><span class="ss">categories</span><span class="p">:</span> <span class="o">[</span><span class="s1">&#39;photography&#39;</span><span class="o">]</span>
</span></span><span class="line"><span class="cl"><span class="ss">draft</span><span class="p">:</span> <span class="kp">true</span>
</span></span><span class="line"><span class="cl"><span class="o">---</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># escaped  to keep hugo from parsing this as a shortcode: </span>
</span></span><span class="line"><span class="cl"><span class="c1"># {\{&lt; potw &gt;}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="no">POTW</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="no">File</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">file_path</span><span class="p">,</span> <span class="n">potw_post</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="sb">`open </span><span class="si">#{</span><span class="n">file_path</span><span class="si">}</span><span class="sb">`</span></span></span></code></pre></div>
<p>Much more turnkey than it was, and with a little more logic I might be able to build it into a pre-build script of some kind to completely automate the whole thing.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Daily Notes for 2023-04-11</title>
      <link>https://mike.puddingtime.org/posts/2023-04-11-daily-notes-for-2023-04-11/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2023-04-11-daily-notes-for-2023-04-11/</guid>
      <description>pinboard/Emacs integration, hoping Yellowjackets doesn&amp;rsquo;t disappoint, blogging with ox-hugo.</description>
      <content:encoded><![CDATA[<h2 id="bookmarks-and-org">Bookmarks and org</h2>
<p>I&rsquo;ve been back and forth on bookmarking. For a period there was some noise about pinboard.in appearing moribund. The obvious explanation for some of the noise generally was that Maciej Cegłowski&rsquo;s smartest guy in the room schtick had finally run afoul of peoples&rsquo; sensibilities. The one supporting piece of evidence I had in my own experience was an unanswered bug report about broken feed functionality.</p>
<p>So I tried raindrop.io (didn&rsquo;t really take), and then just stopped bookmarking stuff because I wasn&rsquo;t sure where to put it, and then started playing around with beorg to capture bookmarks on mobile, which worked fine but I hadn&rsquo;t yet figured out a way to make the practice scale.</p>
<p>Well, the bug I reported about pinboard got fixed, Maciej seems to be active online again, and pinboard is my favorite service, so I&rsquo;m using it. For mobile I like the <a href="https://get-pins.app">Pins app</a> a lot. It&rsquo;s just clean and simple, and it&rsquo;s a universal app so its share extension works on my Macs in apps like Reeder.</p>
<p>Since I&rsquo;ve moved blogging into Emacs, it&rsquo;d be nice to be able to get links I save out of pinboard and into a buffer, and it looks like <a href="https://github.com/davep/pinboard.el">Dave Pearson&rsquo;s pinboard.el</a> will suffice. It provides a pinboard client in Emacs: invoke it, get a list of your bookmarks, do things with them. Konrad Hensen wrote a function that can <a href="https://gist.github.com/khinsen/7ed357eed9b27f142e4fa6f5c4ad45dd">store a pinboard.el link as an org link</a>.</p>
<h2 id="blogging-and-org">Blogging and org</h2>
<p>I added <a href="https://ox-hugo.scripter.co">ox-hugo</a> to my blogging toolkit as an experiment in blogging with org-mode. You just add a section to a monolithic file, compose with org markup, and save. ox-hugo exports the content to a well-formed Hugo Markdown file. Used in conjunction with Hugo server&rsquo;s <code>--navigateToChanged</code> switch, realtime feedback is easy.</p>
<p>Some things I like about it:</p>
<ul>
<li>Adding <code>TODO</code> to the front of the heading makes the post a draft.</li>
<li>Normal org tags at the end of the heading, e.g. <code>:emacs:gtd:blogging:</code> become tags for the post.</li>
<li>Participation in the org ecosystem, e.g. being able to use <code>org-refile</code> on stuff that&rsquo;s not quite ready for today&rsquo;s edition.</li>
</ul>
<p>I&rsquo;m not so sure about it as a longterm document pipeline. This isn&rsquo;t a workflow amenable to anything other than a normal computer that can properly run Emacs. That&rsquo;s not a big deal right now: My iPad is pretty strictly for content consumption these days. But when I think about camping season arriving and how much better suited to that an iPad is, I have qualms. I have no problem imagining an iPad-centric Hugo workflow using any of a number of tools, especially given my publishing pipeline. I don&rsquo;t like the idea of dragging a laptop along.</p>
<p>I get the feeling this is going to land in the &ldquo;fun but not for me&rdquo; pile.</p>
<p>On the other hand, I&rsquo;ve got Tailscale running and there&rsquo;s Blink. I can always get to something that can run Emacs that way. If I&rsquo;m on the grid enough to blog, I&rsquo;m on the grid enough to <code>mosh</code> into something and push out a post.</p>
<p>It&rsquo;s worth a little thinking because the more I do with org mode the more I realize it&rsquo;s how I&rsquo;d prefer to author stuff of any complexity, or stuff that could become part of something more complex at some point.</p>
<h2 id="hoping-yellowjackets-won-t-disappoint">Hoping Yellowjackets won&rsquo;t disappoint</h2>
<p>Al and I have been watching the first season. We&rsquo;ve arrived in the traditional part of a ten-episode season, where things begin to bog down a little and I&rsquo;m hoping it will get a little more sprightly again. And I&rsquo;m going through my usual qualms about shows that look and act like this one: I don&rsquo;t mind some mystery, but I have lost my tolerance for series that won&rsquo;t resolve anything. If it looks like it&rsquo;s going to be an endless puzzlebox, it&rsquo;s not going to get my time.</p>
<p>The ten episode thing: I wish I knew some television writers who could walk me through the realities of doing an eight-, ten-, twelve-, or twenty-episode season.</p>
<p><em>Sharp Objects</em>, <em>Mare of Easttown</em> and <em>Severance</em> all came in at seven or eight episodes, and they felt just right to me. Things stayed tight and they kept moving. <em>For All Mankind</em> comes in at ten per season, and sometimes it drags. <em>The Wire</em> ran 12 or 13 episodes per season (except the last), and I&rsquo;d say it could have tightened down, too.</p>
<p>You just hit those moments, I suppose, where all the setup is done, the Big Problem for the season is established, and &hellip; wham, into a bottle episode or a dream episode that feels loosely connected &ndash; or a subplot goes on unresolved for a few episodes &ndash; and you feel the momentum seeping out.</p>
<p>I suppose there are some economics around the first run and eventual syndication, and probably increasingly good metrics around what audiences will stick with in what numbers. I just wonder what about the structure (at the episode level and the season level) makes things seem to get a little pokey at ten episodes. I took a writing for film class years ago where the person who did the screenplay for <em>Erin Brokovich</em> sat with the class and walked us through the structure, and I&rsquo;ve read since that these things follow predictable patterns you mainly notice when they&rsquo;re broken. I can see how perhaps writers learn a certain tempo within a certain framework and end up with more time than they know what to do with.</p>
<p>And maybe it&rsquo;s just me being affected by streaming and binge-watching. I&rsquo;m still generally on team &ldquo;3 hours for a movie? Sounds like a good deal!&rdquo; so I don&rsquo;t think my attention span has been completely ruined, but there&rsquo;s just so much out there &ndash; maybe I&rsquo;ve been conditioned by the bounty that is Peak Television to look ahead to the next thing in a way I have not by movies.</p>
<p>Anyhow: We are enjoying it for now. The cast is solid, the timeline switching keeps things moving, and showing us the fate of one of the main characters in the first scene of the first episode seems to have worked, though I get the feeling something will happen along the way to complicate that.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
