code.pablomurad.com

patchwork

Publishes the revisions of your pages as a feed, with notes and readable diffs, written in Go

  1. c893eb1
    Add a changelog for 0.1.0
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    

    Pablo Murad

  2. 60e53a1
    Date undated pages by their first mtime, space out word swaps, add a Dockerfile
    
    Found while wiring Patchwork into moonflowersociety.org:
    
    - a page with no date in its name or frontmatter took the day of the
      first scan as its original date, so starting Patchwork on an existing
      site dated every such page to the deploy; the baseline now uses the
      file's modification time and keeps it on later uploads
    - removed words right before inserted ones ran together in feed readers
      and in colored terminal output ("modificationthe day"); they're now
      separated by a space
    - Dockerfile: static binary on distroless nonroot, with a data directory
      a fresh volume can inherit
    - .gitattributes: LF everywhere, so golden files match on Windows too
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    

    Pablo Murad

  3. 973b474
    Publish revisions as a JSON API, Atom, JSON Feed and terminal text
    
    The store now becomes something readers and sites can use. One build
    renders every file; `serve` serves it over HTTP and rebuilds after each
    scan that changed something, and `export` writes the same bytes to a
    directory.
    
    - render: public model (retracted revisions and removed pages left
      out), the v1 JSON API, Atom and JSON Feed entries marked up with
      <del>/<ins>, and plain or ANSI text for curl
    - server: routes for slugs with slashes, .json aliases, ETag and 304,
      JSON errors, /healthz
    - export: atomic swap of the output directory
    - engine: retract (later diffs are rebased), amend, rebuild-diffs,
      backfill of older copies
    - schema/v1: strict JSON Schema for the API, checked against every
      generated file
    - cli: serve, export, retract, amend, snapshot, rebuild-diffs, backup,
      health
    - excerpts sum up long runs of deleted blocks, so a rewrite's new text
      isn't cut off
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    

    Pablo Murad

  4. f18feed
    Snapshot content folders and decide which edits become revisions
    
    Patchwork keeps the version history of pages that keep changing and
    publishes the revisions an author announces with a frontmatter note.
    This first commit is the core, with no feeds or HTTP yet.
    
    - slug: the moonflowersociety.org rule, checked against a parity table
      generated by the site's own JavaScript
    - doc: normalization, frontmatter, ignore regions, block splitting,
      plain text per block, word tokens, content hashes
    - diff: Myers on blocks and words, moves, modify pairing, excerpts
    - store: SQLite schema and migrations (pure Go, no cgo)
    - config: patchwork.yaml with defaults and env overrides
    - engine: baseline, silent, published, amended and folded revisions,
      two-scan removal
    - source/folder: scans with an upload settle time, watch with file
      events, debounce and polling
    - cli: init, scan, watch, log, diff, doctor, version
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    

    Pablo Murad