From 61ed9d2b85010dc6f307d02791ea6d52633f690a Mon Sep 17 00:00:00 2001 From: bluzername Date: Fri, 9 Oct 2026 07:34:20 +0300 Subject: [PATCH 1/3] feat: add openapi piece, the OpenAPI gauge logo Closes #35. Adds a new ascii.rest piece for the OpenAPI Initiative's gauge mark: a green segmented dial with a dark pointer, following the same drawing style as the existing company/logo pieces (cloudflare, vercel, python): one shape grid, a per-cell palette index, and the shared "glint" animation. The art is not hand-traced. It is generated by sampling the mark's own published icon onto a 46x23 grid: each cell gets a density character from its ink coverage and the nearest of 4 colours sampled from the source image (dark pointer, two greens, olive). The dark pointer is lifted on a dark page the same way other pieces lift pure black, so it does not sink into the background. Generation script is not part of this PR, only its output, same as the rest of the pieces in this repo. Testing: npm run check passes for all 217 pieces (one new), npm run typecheck and npm run build are clean, and npm run gen regenerated src/pieces/index.ts and src/library.ts for the new piece. Before this change, npm run check -- openapi fails with "no file src/pieces/ openapi.ts"; after, it reports the piece ok with cols/rows/fps as expected, and --show renders a recognizable dial and pointer. The OpenAPI mark is a trademark of its owner, shown here only to name the specification, same disclaimer as other company/logo pieces in this repo. --- src/library.ts | 3 +- src/pieces/index.ts | 1 + src/pieces/openapi.ts | 167 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 src/pieces/openapi.ts diff --git a/src/library.ts b/src/library.ts index 7ff812e..72dc3d5 100644 --- a/src/library.ts +++ b/src/library.ts @@ -152,6 +152,7 @@ export const load = { "ocaml": () => import("./pieces/ocaml.ts"), "ocean-sunset": () => import("./pieces/ocean-sunset.ts"), "omarchy": () => import("./pieces/omarchy.ts"), + "openapi": () => import("./pieces/openapi.ts"), "opensuse": () => import("./pieces/opensuse.ts"), "orchid": () => import("./pieces/orchid.ts"), "owl": () => import("./pieces/owl.ts"), @@ -248,7 +249,7 @@ export type PieceName = keyof typeof load; export const names = Object.keys(load) as PieceName[]; /** The coloured pieces, which draw on a rather than a
. */
-export const canvas: ReadonlySet = new Set(["a0","agentmail","almalinux","alpine-dawn","alpine-linux","amer-fort","apple","arch-linux","aurora-fjord","autumn","black-prism","c","centos","clojure","cloud-sea","cloudflare","coderabbit","collabute","command-city","command-code","cpp","csharp","css","dart","databuddy","debian","deep-reef","deepin","desert-night","earthrise","edge-orbit","elementary-os","elixir","elm","endeavouros","erlang","fedora","gangaur-ghat","gentoo","go","green-storm","greptile","haskell","helium","helmcode","html","jal-mahal","java","javascript","julia","jungle-falls","kali-linux","keiki","kite-festival","kotlin","kyoto-dusk","lake-pichola","lantern-lake","lava-wall","linux-mint","lua","manjaro","marine-drive","mintlify","misty-forest","night-coast","night-highway","nixos","ocaml","ocean-sunset","omarchy","opensuse","orchid","perl","php","planet-scale","planetscale","playstation","polar","pop-os","prism-city","python","r","red-hat","rocky-linux","ruby","rust","salt-flat","saturn-rise","scala","snow-train","storm-plains","supabase","supermemory","svelte","swift","taj-dawn","tokyo-rain","tux","typescript","ubuntu","varanasi-ghats","vercel","void-linux","volcano-night","zig","zorin-os"]);
+export const canvas: ReadonlySet = new Set(["a0","agentmail","almalinux","alpine-dawn","alpine-linux","amer-fort","apple","arch-linux","aurora-fjord","autumn","black-prism","c","centos","clojure","cloud-sea","cloudflare","coderabbit","collabute","command-city","command-code","cpp","csharp","css","dart","databuddy","debian","deep-reef","deepin","desert-night","earthrise","edge-orbit","elementary-os","elixir","elm","endeavouros","erlang","fedora","gangaur-ghat","gentoo","go","green-storm","greptile","haskell","helium","helmcode","html","jal-mahal","java","javascript","julia","jungle-falls","kali-linux","keiki","kite-festival","kotlin","kyoto-dusk","lake-pichola","lantern-lake","lava-wall","linux-mint","lua","manjaro","marine-drive","mintlify","misty-forest","night-coast","night-highway","nixos","ocaml","ocean-sunset","omarchy","openapi","opensuse","orchid","perl","php","planet-scale","planetscale","playstation","polar","pop-os","prism-city","python","r","red-hat","rocky-linux","ruby","rust","salt-flat","saturn-rise","scala","snow-train","storm-plains","supabase","supermemory","svelte","swift","taj-dawn","tokyo-rain","tux","typescript","ubuntu","varanasi-ghats","vercel","void-linux","volcano-night","zig","zorin-os"]);
 
 /** Whether a name is a piece in the library. */
 export const isPiece = (name: string): name is PieceName => Object.hasOwn(load, name);
diff --git a/src/pieces/index.ts b/src/pieces/index.ts
index b97bc11..63cb5af 100644
--- a/src/pieces/index.ts
+++ b/src/pieces/index.ts
@@ -150,6 +150,7 @@ export * as notFound from "./not-found.ts";
 export * as ocaml from "./ocaml.ts";
 export * as oceanSunset from "./ocean-sunset.ts";
 export * as omarchy from "./omarchy.ts";
+export * as openapi from "./openapi.ts";
 export * as opensuse from "./opensuse.ts";
 export * as orchid from "./orchid.ts";
 export * as owl from "./owl.ts";
diff --git a/src/pieces/openapi.ts b/src/pieces/openapi.ts
new file mode 100644
index 0000000..640595a
--- /dev/null
+++ b/src/pieces/openapi.ts
@@ -0,0 +1,167 @@
+/*
+ * openapi: the OpenAPI Initiative's gauge mark, a green segmented dial with a
+ * dark pointer, with a glint crossing it every few seconds.
+ *
+ * Drawn by sampling the OpenAPI Initiative's own published mark (its GitHub
+ * avatar, openapis.org) onto a grid: each cell takes the shade of its ink
+ * coverage and the nearest of 4 sampled colours. On a canvas it takes the
+ * logo's colours, with the dark pointer lifted on a dark page where it would
+ * sink into it; in a 
 it is one ink, from the same sampling. The mark is
+ * a trademark of its owner, shown here to name the specification.
+ */
+import type { Frame, Meta } from "../types.ts";
+
+export interface OpenapiOptions {
+  [key: string]: unknown;
+  /** Seconds between glints; 0 keeps the logo still. */
+  shine: number;
+}
+
+export const meta = {
+  name: "openapi",
+  category: "logos",
+  note: "the openapi gauge: a green dial and dark pointer, glinting now and then",
+  cols: 46,
+  rows: 23,
+  fps: 30,
+  options: { shine: 5 },
+  // The logo's 4 colours for a light page, then for a dark one; each as drawn, then twice lighter for the glint.
+  palette: [
+    "#485828", "#68a030", "#404040", "#90d008",
+    "#92b154", "#9dd268", "#838383", "#bff847",
+    "#cddbb0", "#d2eab9", "#c6c6c6", "#e2fcaa",
+    "#485828", "#68a030", "#a9a9a9", "#90d008",
+    "#92b154", "#9dd268", "#c7c7c7", "#bff847",
+    "#cddbb0", "#d2eab9", "#e5e5e5", "#e2fcaa",
+  ],
+} satisfies Meta;
+
+// In a 
, in the page's own colour.
+const MONO = String.raw`
+
+                                    -*%@@@#=  
+                                   *@@@@@@@@%-
+                .:::.:::.         =@@@@@@@@@@%
+           -+*%@@@@@+@@@@@%*=:    =@@@@@@@@@@%
+        ==*@@@@@@@@@+@@@@@@@@@@=  +@@@@@@@@@%:
+      -%@@**@@@@@@@@+@@@@@@@@#- +@@@@**#%#+-  
+    +@@**%@#+@@@@@@@+@@@@@@#- +@@@@*:         
+  .#@@@@@**%%=%@@@@@+@@@@#- +@@@@*::**        
+ .%@@@@@@@@**%=%@@%%=%@#- +@@@@*::*@@@*       
+ #@@@@@@@@@@@**--       +@@@@*::*@@@@@@*      
+=@@@@@@@@@@@@#  -*%@@@#@@@@*::*@@@@@@@@@:     
+#@@@@@@@@@@@#  +@@@@@@@@@%: *@@@@@@@@@@@+     
+%%%%%%%%%%%%- :@@@@@@@@@@@  -***********=     
+*###########- :@@@@@@@@@@%  *@@@@@@@@@@@#     
+*@@@@@@@@@@@#  -@@@@@@@@%: -@@@@@@@@@@@@=     
+-@@@@@@@@#**#%-  -+*#*+-  =@@@@@@@@@@@@@      
+ *@@@%***%@@%**%--:...:=+=**@@@@@@@@@@@=      
+  ****@@@@%**@@#+@@@@@@@@%=%**@@@@@@@@+       
+   +@@@@%**@@@%=@@@@@@@@@@@+%@**@@@@@-        
+    :#%**@@@@@=@@@@@@@@@@@@@+#@@**@*.         
+      .#@@@@@=%@@@@@@@@@@@@@@**@@*            
+        .+#@+#@@@@@@@@@@@@@@@@+-              
+            .=+#%@@@@@@%%*+=:                 
+
+`;
+
+// On a canvas, and the colour of each cell: an index into the logo's colours.
+const ART = String.raw`
+
+                                    -*%@@@#=  
+                                   *@@@@@@@@%-
+                .:::.:::.         =@@@@@@@@@@%
+           -+*%@@@@@+@@@@@%*=:    =@@@@@@@@@@%
+        ==*@@@@@@@@@+@@@@@@@@@@=  +@@@@@@@@@%:
+      -%@@**@@@@@@@@+@@@@@@@@#- +@@@@**#%#+-  
+    +@@**%@#+@@@@@@@+@@@@@@#- +@@@@*:         
+  .#@@@@@**%%=%@@@@@+@@@@#- +@@@@*::**        
+ .%@@@@@@@@**%=%@@%%=%@#- +@@@@*::*@@@*       
+ #@@@@@@@@@@@**--       +@@@@*::*@@@@@@*      
+=@@@@@@@@@@@@#  -*%@@@#@@@@*::*@@@@@@@@@:     
+#@@@@@@@@@@@#  +@@@@@@@@@%: *@@@@@@@@@@@+     
+%%%%%%%%%%%%- :@@@@@@@@@@@  -***********=     
+*###########- :@@@@@@@@@@%  *@@@@@@@@@@@#     
+*@@@@@@@@@@@#  -@@@@@@@@%: -@@@@@@@@@@@@=     
+-@@@@@@@@#**#%-  -+*#*+-  =@@@@@@@@@@@@@      
+ *@@@%***%@@%**%--:...:=+=**@@@@@@@@@@@=      
+  ****@@@@%**@@#+@@@@@@@@%=%**@@@@@@@@+       
+   +@@@@%**@@@%=@@@@@@@@@@@+%@**@@@@@-        
+    :#%**@@@@@=@@@@@@@@@@@@@+#@@**@*.         
+      .#@@@@@=%@@@@@@@@@@@@@@**@@*            
+        .+#@+#@@@@@@@@@@@@@@@@+-              
+            .=+#%@@@@@@%%*+=:                 
+
+`;
+const INK = String.raw`
+
+                                    22222222  
+                                   22222222221
+                111110001         122222222222
+           1111111111000000000    122222222222
+        331111111111100000000000  222222222221
+      3333311111111110000000000 222222222222  
+    0000333311111111100000000 2222221         
+  1000000033311111111000000 2222221000        
+ 100000000003331111110000 2222221000000       
+ 0000000000000331       2222221000000000      
+00000000000000  2222222222221000000000001     
+0000000000000  222222222221 0000000000000     
+0000000000001 222222222222  0000000000001     
+3333333333333 122222222222  1111111111111     
+3333333333333  22222222221 11111111111111     
+333333333331111  2222222  11111111111111      
+ 333333311111100033333333101111111111111      
+  3311111111000033333333333001111111111       
+   11111110000033333333333330001111111        
+    111100000033333333333333300001111         
+      1000000033333333333333330000            
+        100003333333333333333331              
+            33333333333333333                 
+
+`;
+
+const START = 0.5; // seconds before the first glint
+const PASS = 2; // seconds a glint takes to cross
+const HALF = 5; // half its width, in cells
+const LEAN = 0.9; // cells it shifts left a row down, so it leans like a slash
+const SOLID = "8dbqpPYOo0@#%*+=:.-"; // what the glint turns to slashes; thin edges keep their shape
+
+const lines = (art: string) => art.slice(1, -1).split("\n").map((line) => line.padEnd(meta.cols));
+
+export default function openapi({ shine = meta.options.shine }: Partial = {}): Frame {
+  const { cols, rows } = meta;
+  const mono = lines(MONO), art = lines(ART), ink = lines(INK);
+  const n = meta.palette.length / 6;
+  const every = shine > 0 ? Math.max(shine, PASS + 0.5) : 0;
+  // The glint crosses the logo's ink, edge to edge, rather than the whole frame.
+  let lo = Infinity, hi = -Infinity;
+  for (const pic of [mono, art])
+    pic.forEach((line, y) => {
+      for (let x = 0; x < cols; x++) if (line[x] !== " ") (lo = Math.min(lo, x + LEAN * y)), (hi = Math.max(hi, x + LEAN * y));
+    });
+  const span = hi - lo + 2 * HALF;
+
+  return (t, { paper = false, color } = {}) => {
+    const pic = color ? art : mono;
+    const since = t - START;
+    const at = every && since >= 0 ? lo - HALF + (span * (since % every)) / PASS : -Infinity;
+    const out: string[] = [];
+    for (let y = 0; y < rows; y++) {
+      let line = "";
+      for (let x = 0; x < cols; x++) {
+        let ch = pic[y][x];
+        if (ch !== " ") {
+          const d = Math.abs(x + LEAN * y - at);
+          let k = d < HALF ? 1 - d / HALF : 0;
+          k = k * k * (3 - 2 * k);
+          if (k > 0.55 && SOLID.includes(ch)) ch = "/";
+          if (color) color[y * cols + x] = (paper ? 0 : 3 * n) + (k > 0.6 ? 2 : k > 0.25 ? 1 : 0) * n + parseInt(ink[y][x], 36);
+        }
+        line += ch;
+      }
+      out.push(line);
+    }
+    return out.join("\n");
+  };
+}

From d1f7b90b69b893a4da9617edcdcd427095ee8f4c Mon Sep 17 00:00:00 2001
From: bluzername 
Date: Fri, 16 Oct 2026 07:20:11 +0300
Subject: [PATCH 2/3] fix: openapi logo row count so the bottom is not cut off

rows was 23, but the MONO/ART/INK blocks give 25 lines after the
blank padding row above and below. render loop only read up to
row 22, so it draw the blank top row plus 21 content rows and skip
the last one. set rows to 25, same convention every other piece use.
---
 src/pieces/openapi.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pieces/openapi.ts b/src/pieces/openapi.ts
index 640595a..e356351 100644
--- a/src/pieces/openapi.ts
+++ b/src/pieces/openapi.ts
@@ -22,7 +22,7 @@ export const meta = {
   category: "logos",
   note: "the openapi gauge: a green dial and dark pointer, glinting now and then",
   cols: 46,
-  rows: 23,
+  rows: 25,
   fps: 30,
   options: { shine: 5 },
   // The logo's 4 colours for a light page, then for a dark one; each as drawn, then twice lighter for the glint.

From 9f925ec71cd685d1cb5460df69283fb2a0d575d6 Mon Sep 17 00:00:00 2001
From: Evyatar Bluzer 
Date: Tue, 3 Nov 2026 07:26:05 +0200
Subject: [PATCH 3/3] fix: rebase the openapi logo onto the pieces main added
 since

---
 src/library.ts      | 6 +++++-
 src/pieces/index.ts | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/library.ts b/src/library.ts
index 72dc3d5..5ddcd00 100644
--- a/src/library.ts
+++ b/src/library.ts
@@ -33,6 +33,7 @@ export const load = {
   "candlesticks": () => import("./pieces/candlesticks.ts"),
   "cat": () => import("./pieces/cat.ts"),
   "centos": () => import("./pieces/centos.ts"),
+  "chat": () => import("./pieces/chat.ts"),
   "cherry-blossom": () => import("./pieces/cherry-blossom.ts"),
   "chladni": () => import("./pieces/chladni.ts"),
   "clojure": () => import("./pieces/clojure.ts"),
@@ -90,6 +91,7 @@ export const load = {
   "gangaur-ghat": () => import("./pieces/gangaur-ghat.ts"),
   "gauge": () => import("./pieces/gauge.ts"),
   "gentoo": () => import("./pieces/gentoo.ts"),
+  "git-graph": () => import("./pieces/git-graph.ts"),
   "glider-gun": () => import("./pieces/glider-gun.ts"),
   "glitch": () => import("./pieces/glitch.ts"),
   "glxgears": () => import("./pieces/glxgears.ts"),
@@ -104,6 +106,7 @@ export const load = {
   "heartbeat": () => import("./pieces/heartbeat.ts"),
   "heatmap": () => import("./pieces/heatmap.ts"),
   "helium": () => import("./pieces/helium.ts"),
+  "helixdb": () => import("./pieces/helixdb.ts"),
   "helmcode": () => import("./pieces/helmcode.ts"),
   "hilbert-curve": () => import("./pieces/hilbert-curve.ts"),
   "hourglass": () => import("./pieces/hourglass.ts"),
@@ -159,6 +162,7 @@ export const load = {
   "pendulum-wave": () => import("./pieces/pendulum-wave.ts"),
   "perl": () => import("./pieces/perl.ts"),
   "php": () => import("./pieces/php.ts"),
+  "pipeline": () => import("./pieces/pipeline.ts"),
   "planet": () => import("./pieces/planet.ts"),
   "planet-scale": () => import("./pieces/planet-scale.ts"),
   "planetscale": () => import("./pieces/planetscale.ts"),
@@ -249,7 +253,7 @@ export type PieceName = keyof typeof load;
 export const names = Object.keys(load) as PieceName[];
 
 /** The coloured pieces, which draw on a  rather than a 
. */
-export const canvas: ReadonlySet = new Set(["a0","agentmail","almalinux","alpine-dawn","alpine-linux","amer-fort","apple","arch-linux","aurora-fjord","autumn","black-prism","c","centos","clojure","cloud-sea","cloudflare","coderabbit","collabute","command-city","command-code","cpp","csharp","css","dart","databuddy","debian","deep-reef","deepin","desert-night","earthrise","edge-orbit","elementary-os","elixir","elm","endeavouros","erlang","fedora","gangaur-ghat","gentoo","go","green-storm","greptile","haskell","helium","helmcode","html","jal-mahal","java","javascript","julia","jungle-falls","kali-linux","keiki","kite-festival","kotlin","kyoto-dusk","lake-pichola","lantern-lake","lava-wall","linux-mint","lua","manjaro","marine-drive","mintlify","misty-forest","night-coast","night-highway","nixos","ocaml","ocean-sunset","omarchy","openapi","opensuse","orchid","perl","php","planet-scale","planetscale","playstation","polar","pop-os","prism-city","python","r","red-hat","rocky-linux","ruby","rust","salt-flat","saturn-rise","scala","snow-train","storm-plains","supabase","supermemory","svelte","swift","taj-dawn","tokyo-rain","tux","typescript","ubuntu","varanasi-ghats","vercel","void-linux","volcano-night","zig","zorin-os"]);
+export const canvas: ReadonlySet = new Set(["a0","agentmail","almalinux","alpine-dawn","alpine-linux","amer-fort","apple","arch-linux","aurora-fjord","autumn","black-prism","c","centos","clojure","cloud-sea","cloudflare","coderabbit","collabute","command-city","command-code","cpp","csharp","css","dart","databuddy","debian","deep-reef","deepin","desert-night","earthrise","edge-orbit","elementary-os","elixir","elm","endeavouros","erlang","fedora","gangaur-ghat","gentoo","go","green-storm","greptile","haskell","helium","helixdb","helmcode","html","jal-mahal","java","javascript","julia","jungle-falls","kali-linux","keiki","kite-festival","kotlin","kyoto-dusk","lake-pichola","lantern-lake","lava-wall","linux-mint","lua","manjaro","marine-drive","mintlify","misty-forest","night-coast","night-highway","nixos","ocaml","ocean-sunset","omarchy","openapi","opensuse","orchid","perl","php","planet-scale","planetscale","playstation","polar","pop-os","prism-city","python","r","red-hat","rocky-linux","ruby","rust","salt-flat","saturn-rise","scala","snow-train","storm-plains","supabase","supermemory","svelte","swift","taj-dawn","tokyo-rain","tux","typescript","ubuntu","varanasi-ghats","vercel","void-linux","volcano-night","zig","zorin-os"]);
 
 /** Whether a name is a piece in the library. */
 export const isPiece = (name: string): name is PieceName => Object.hasOwn(load, name);
diff --git a/src/pieces/index.ts b/src/pieces/index.ts
index 63cb5af..d2cc6f1 100644
--- a/src/pieces/index.ts
+++ b/src/pieces/index.ts
@@ -31,6 +31,7 @@ export * as candle from "./candle.ts";
 export * as candlesticks from "./candlesticks.ts";
 export * as cat from "./cat.ts";
 export * as centos from "./centos.ts";
+export * as chat from "./chat.ts";
 export * as cherryBlossom from "./cherry-blossom.ts";
 export * as chladni from "./chladni.ts";
 export * as clojure from "./clojure.ts";
@@ -88,6 +89,7 @@ export * as galaxy from "./galaxy.ts";
 export * as gangaurGhat from "./gangaur-ghat.ts";
 export * as gauge from "./gauge.ts";
 export * as gentoo from "./gentoo.ts";
+export * as gitGraph from "./git-graph.ts";
 export * as gliderGun from "./glider-gun.ts";
 export * as glitch from "./glitch.ts";
 export * as glxgears from "./glxgears.ts";
@@ -102,6 +104,7 @@ export * as heart from "./heart.ts";
 export * as heartbeat from "./heartbeat.ts";
 export * as heatmap from "./heatmap.ts";
 export * as helium from "./helium.ts";
+export * as helixdb from "./helixdb.ts";
 export * as helmcode from "./helmcode.ts";
 export * as hilbertCurve from "./hilbert-curve.ts";
 export * as hourglass from "./hourglass.ts";
@@ -157,6 +160,7 @@ export * as owl from "./owl.ts";
 export * as pendulumWave from "./pendulum-wave.ts";
 export * as perl from "./perl.ts";
 export * as php from "./php.ts";
+export * as pipeline from "./pipeline.ts";
 export * as planet from "./planet.ts";
 export * as planetScale from "./planet-scale.ts";
 export * as planetscale from "./planetscale.ts";