Punc takes the words out of a book and leaves the punctuation where it was. A lot of what steers you through a book isn't the words: a comma tells you to take a breath, and a period tells you to stop. With the words gone, you can see a book's rhythm on its own, where it runs without a breath and where it goes quiet. It's an erasure, like the blackout poems I make on paper, except a blackout poem keeps a few words and Punc keeps none.
See the books · Read the full statement
Node.js 18 or newer.
git clone https://github.com/JoeKarlsson/punc.git
cd punc
npm install
npm run site:serve # build the site and serve it at http://localhost:4597Run the CLI on any plain text file:
npm run build
node dist/cli.js book.txt # table of every mark and its count
node dist/cli.js book.txt --all --png # all six pictures, as PNGOr use the library:
import punc, { createSpiralSVG } from 'punc';
const { count } = await punc('alice.txt'); // { ',': 2427, '.': 999, ... }
await createSpiralSVG('alice.txt', { format: 'png' }); // alice.txt-spiral.pngThe npm release (punc@1.3.3) is older and only counts marks and makes PDFs;
build from source for everything above. The marks it tracks are in
src/mapping.ts.
npm run check # type check, lint, markdown lint and unit tests
npm run test:e2e # Playwright tests against the built site
npm run shelf:update # refresh the shelf from Project Gutenberg, then commit and push| Path | What's in it |
|---|---|
src/ |
The library and CLI |
site/ |
The website: pages, browser code, styles and the build script |
site/scripts/ |
Shelf refresh and image scripts |
e2e/ |
Playwright tests |
Every push to main runs CI and deploys the site.
Punc started in 2016 after Adam J. Calhoun's essay Punctuation in novels, which was inspired by Nicholas Rougeux's Between the Words. Books and covers come from Project Gutenberg.
MIT. See LICENSE.
