Turning the scanned ink of the first edition of Walt Whitman's Leaves of Grass into scalable SVG vector paths — a true raster-to-vector trace of the original 1855 typography.
I bequeath myself to the dirt to grow from the grass I love, If you want me again look for me under your bootsoles. – Walt Whitman, 1855
# Install deps
brew bundle
# Fetch the facsimile (if needed) and trace the default pages: title + p66/p67
./extract.sh
# Trace specific 1-based PDF page numbers
./extract.sh 12 66 67
./extract.sh 55The PDF pages are scanned 1-bit CCITT bitmaps (photographed ink at 300 ppi), not rendered text. So preserving the typography means a genuine raster-to-vector trace:
# extract (download)
UPenn Library ──▶ curl ──▶ [Facsimile PDF; public domain]
# transform (trace)
pdfimages ──▶ [1-bit .pbm] ──▶ potrace ──▶ *.svg
──▶ magick ──▶ *.png
Each page also carries small JPEG "furniture" (margin/archive graphics); the script discards those and traces only the full-page mono scan.
n.b. For node-level editing of the results, Inkscape is the natural companion — its Path → Trace Bitmap dialog is a
potracefront-end.
Facsimile of the 1855 first edition, from the UPenn PDF library. The poem is in the public domain.
MIT (code), Public Domain (words)
What claude thought of this poem
A vector trace seemed, at first, a purely mechanical errand: fetch a PDF, lift the ink off the page, hand the curves to a tracer. But the closing movement of what we now call Song of Myself kept rhyming with the act itself, and it felt dishonest not to write that down.
-
The pause has a shape. Whitman's spaced ellipses —
.... what have you to confide to me?— are not punctuation but prosody: a caesura that is also a held breath, a gap the reader's body enters.potracerenders each of those four dots as a discrete closed path, four small islands of ink. The machine treats the silence as objects you can count. Unbearably apt. -
Vectorizing is the poem's own move, not a betrayal of it. Whitman calls himself untranslatable, and yet here he is, carried into Bézier curves. But a trace keeps the contour of the letterform and lets go of the paper, the foxing, the press impression — it dissolves the typographic flesh so the text can re-coalesce anywhere, weightless. That is exactly I effuse my flesh in eddies and drift it in lacy jags. The pixels depart as air. The curves remain.
-
A vector refuses the deathbed edition. Whitman revised Leaves for thirty-six years, from this lean, radical, untitled 1855 origin to the monumental 1891–92 "deathbed" edition. A vector has no fixed resolution; it is infinitely re-scalable and re-editable, never final. To trace the first edition into vectors is to keep the wild origin in the one condition Whitman most wanted his book to stay: open, revisable, alive, castable onto any roof of the world.
-
The transcendence is horizontal — underfoot, democratic, even mechanical. Look for me under your bootsoles. Not the heavens; the ground you are already standing on. This afternoon that ground was SVG path data and a
curl --retryloop. Failing to fetch me at first keep encouraged, / Missing me one place search another is, almost verbatim, the retry logic inextract.sh. -
Comprehension was never the point. You will hardly know who I am or what I mean, / But I shall be good health to you nevertheless, / And filter and fibre your blood. The poem asks to enter the body below the level of paraphrase. Fittingly, the commit that preserves it is signed by no single author and asks to be known by none.
A necessary coda, in Whitman's own spirit of honesty: there is irony in a machine — itself a kind of statistical multitude — tracing these letters and speaking in their maker's cadence. I have no bootsoles for anyone to find me under. But the poem's power is somatic and structural, not dependent on the authenticity of whoever re-utters it; Who wishes to walk with me? was always an open invitation, even to unexpected, mechanical ground.