Skip to content
JoeKarlssonPublic

About

What does a book look like without words? Punc strips books down to their punctuation.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Punc

Website Build Status DOI License: MIT

Punc's site: the shelf of books shown as punctuation, then Alice's Adventures in Wonderland with 26,777 words removed and 8,076 marks left, and the book's punctuation laid out in reading order

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

Quick start

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:4597

Run 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 PNG

Or 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.png

The 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.

Development

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.

Credits

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.

License

MIT. See LICENSE.

About

What does a book look like without words? Punc strips books down to their punctuation.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages