<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>nytpu.com</title>
  <subtitle>Browse aymeric&#39;s, an independent, searchable archive of readable snapshots from followed feeds, preserved in Git with aggr.</subtitle>
  <id>https://aggr.aymericbeaumet.com/sources/nytpu.com/</id>
  <link rel="alternate" type="text/html" href="https://aggr.aymericbeaumet.com/sources/nytpu.com/"/>
  <link rel="self" type="application/atom+xml" href="https://aggr.aymericbeaumet.com/sources/nytpu.com/atom.xml"/>
  <updated>2026-10-14T06:24:41+00:00</updated>
  <author>
    <name>aymeric&#39;s</name>
  </author>
  <generator version="2.0.0" uri="https://github.com/aymericbeaumet/aggr">aggr</generator>
  <entry>
    <id>urn:aggr:item:a1bcbc075d48a5ac5307ad14c1fddd964b752e26</id>
    <title type="text">Fancy Curl Sites</title>
    <link rel="alternate" type="text/html" href="https://aggr.aymericbeaumet.com/items/lobste-rs/2026-10-14-fancy-curl-sites/"/>
    <link rel="via" type="text/html" href="https://nytpu.com/gemlog/2026-03-18"/>
    <published>2026-10-14T06:24:41+00:00</published>
    <updated>2026-10-14T06:24:41+00:00</updated>
    <author>
      <name>nytpu.com via seb</name>
    </author>
    <category term="news"/>
    <category term="web"/>
    <source>
      <title>Lobsters: Top Stories of the Past Week</title>
    </source>
    <summary type="text">Comments</summary>
    <content type="html">&lt;h3&gt;March 18, 2026 (Updated: October 14, 2026)&lt;/h3&gt;
&lt;p&gt;So a good while ago I added a fun curl version of my site, meant for viewing in the terminal. Try running these commands!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;code-snippet&quot;&gt;curl nytpu.com/gemlog/2026-03-18
# or
curl nytpu.com
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(sorry Windows users, not my fault that ANSI escape codes are disabled-by-default in &lt;code&gt;cmd.exe&lt;/code&gt;. And not my fault that in Powershell you have to use &lt;code&gt;curl.exe&lt;/code&gt; instead of &lt;code&gt;curl&lt;/code&gt; because Powershell inexplicably aliases that to &lt;code&gt;Invoke-WebRequest&lt;/code&gt;.)&lt;/p&gt;
&lt;p&gt;I posted about it a bit on the Fediverse, but otherwise didn&#39;t elaborate much on it becuase I figured it was fairly self-explanatory. But I&#39;ve had a handful of people ask me how I did it, so I decided it might actually be worth it to write a post about how I did it (…like seven months late).&lt;/p&gt;
&lt;p&gt;I should note this idea came from trinkey&#39;s (&lt;code&gt;curl trinkey.com&lt;/code&gt;) and strongsand&#39;s (&lt;code&gt;curl proot.party&lt;/code&gt;) curl sites, I didn&#39;t come up with it myself. Even though I did go about it quite a bit differently from them, all credit for the very cool idea goes to them. (UPDATE: unfortunately neither of their curl versions are functional anymore as of 2026-10-14.)&lt;/p&gt;
&lt;p&gt;First, since it&#39;s the more interesting part, actually generating the ANSI-marked-up files to send to the clients. I entirely hand-wrote the &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.sr.ht/~nytpu/nytpu.com/tree/master/item/static/curl/index.ansi&quot;&gt;index page&lt;/a&gt; and &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.sr.ht/~nytpu/nytpu.com/tree/master/item/static/curl/about.ansi&quot;&gt;about page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that I believe trinkey and strongsand generate theirs on-the-fly with the &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/ratatui/ratatui&quot;&gt;ratatui&lt;/a&gt; library (or similar), which is probably more convenient; hand-writing it seemed more expedient to me though.&lt;/p&gt;
&lt;p&gt;I had the main escape code—&lt;code&gt;ESC[&lt;/code&gt;, i.e. &lt;code&gt;\x1b[&lt;/code&gt;—&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn-1&quot; id=&quot;fnref-1&quot; data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt; in a Vim register to easily paste when needed, and then the &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://en.wikipedia.org/wiki/ANSI_escape_code#Select_Graphic_Rendition_parameters&quot;&gt;Wikipedia page for the main graphics codes&lt;/a&gt; open to reference the specific escape codes. And, yeah, that&#39;s about it. I experimented to decide on consistent styling I liked, and just referenced the Gopher version of my pages when crafting the marked-up curl pages.&lt;/p&gt;
&lt;p&gt;Now, the notable thing about my version is that I have curl versions of the entirety of my blog, rather than just one or two pages being available. This is entirely due to a convenient coincidence: over four years ago I implemented outputting ANSI-marked-up plaintext in my custom markup language I use for my blog, &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.sr.ht/~nytpu/gemroff&quot;&gt;Gemroff&lt;/a&gt;. Originally it was just to allow convenient previewing of drafts in the terminal while writing; but it was trivial to plug into my static site generator to immediately get Curl versions generated.&lt;/p&gt;
&lt;p&gt;I did manually write a &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.sr.ht/~nytpu/nytpu.com/tree/master/item/templates/gemlog-post.ansi&quot;&gt;wrapper template for blog posts&lt;/a&gt;, as well as a &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.sr.ht/~nytpu/nytpu.com/tree/master/item/templates/gemlog-index.ansi&quot;&gt;template for the index page listing posts&lt;/a&gt;, but that plus a few extra lines in my static site generator was all that was needed to wire it up.&lt;/p&gt;
&lt;p&gt;This is the main thing that makes it hard to say it&#39;s easy! since it was only easy for me because I use an entirely custom markup language and static site generator and I happened to make the right design choices years ago—e.g. my SSG also happened to already have support for multiple, modular output formats instead of solely HTML like other SSGs, since I tri-host my site on HTTP, Gemini, and Gopher.&lt;/p&gt;
&lt;p&gt;However, offering nothing but a few hand-written pages for fun is a completely acceptable way to set up a site like this anyways, since it&#39;s just a neat gimmick and no one&#39;s likely to actually use it more than a few minutes of browsing.&lt;/p&gt;
&lt;p&gt;Finally, the last step is actually presenting the Curl version of your site to any user agent containing &lt;code&gt;curl&lt;/code&gt;, which for me was just a &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://nytpu.com/gemlog/files/nytpu.com.conf&quot;&gt;few changes to my Nginx config&lt;/a&gt;, with other servers it&#39;d presumably be equivalently simple. The main feature I wanted was an override header (&lt;code&gt;X-Original: true&lt;/code&gt;) so you could still get an unmodified HTTP response like someone casually running Curl likely wanted, and I wanted everything to be served statically still.&lt;/p&gt;
&lt;p&gt;And… that&#39;s really it! As I said, when I first set it up it seemed fairly self-explanatory to me, but it is very non-orthogonal to what people normally do with either web servers or ANSI escape codes so I can see where people&#39;s curiosity/confusion came from. It would be neat to see more sites doing this trick around!&lt;/p&gt;
&lt;section class=&quot;footnotes&quot; data-footnotes&gt;
&lt;ol&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;EMDASH! AI-GENERATED! acksually I&#39;ll have you know that my markup language has had &lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.sr.ht/~nytpu/gemroff/tree/999d2f7da1757d756b9780c500f233d0b98e7628/item/doc/elements.md?view-source#L49&quot;&gt;an explicit markup element for emdashes since November 2022&lt;/a&gt;. And believe it nor not: LLMs are trained on shit copied from actual authors, so LLMs wouldn&#39;t be using emdashes if they weren&#39;t already used in human-written works.&lt;/p&gt;
&lt;p&gt;And what, am I supposed to avoid having twenty parentheticals a paragraph, to where I feel the need to use emdashes to vary it up? Unthinkable! &lt;a href=&quot;#fnref-1&quot; class=&quot;footnote-backref&quot; data-footnote-backref data-footnote-backref-idx=&quot;1&quot; aria-label=&quot;Back to reference 1&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
</content>
  </entry>
</feed>
