2026-01-15 10:42:26 -08:00
2026-01-15 10:31:54 -08:00
2025-11-11 14:24:19 -08:00
2025-11-11 14:24:19 -08:00
2025-11-11 14:24:19 -08:00
2025-11-11 14:24:19 -08:00
2026-01-15 10:42:26 -08:00

poem, rotting

This is a small program that slowly rots a given text file. It replaces random characters with other unicode characters, and sometimes deletes characters and sends them off into the internet over UDP ECHO packets.

This program is used in a poetry project that lives here: tilde.town/~ike/rot.html

Usage

Download binary: macOS, linux_amd64

Before using this program, you need to have a poem file ready. This is a plain text file.

To use this program in production, run the binary with the the first parameter as the poem file, and the second parameter as the html file to update. For example:

$ rot ~/poem.txt /var/www/rot.html

Every time this program runs, it will take the contents of the poem file, "rot" it using its algorithm, write the contents to the html file, and then update the poem file with the new rotted contents.

One way to automate this is to use a cron job that runs on a regular interval, for example, every hour:

0 * * * * /path/to/rot /path/to/poem.txt /path/to/rot.html

Development

To build the program, make sure you have Go installed. These instructions assume you have Go 1.24 or later, and are running on macOS.

Clone the repository:

$ git clone https://git.tilde.town/ike/rot.git
$ cd rot

To use this program in development, you can run it with go run:

$ go run main.go poem.txt test.html

To build a binary for macOS, run:

$ go build -o dist/rot-darwin .

To build for linux, run:

$ CC=x86_64-unknown-linux-gnu-gcc CGO_ENABLED=1 GOARCH=amd64 GOOS=linux go build  -ldflags '-linkmode external -w -extldflags "-static"' -o dist/rot-linux_amd64 .
Description
No description provided
Readme 6.3 MiB
2026-01-15 18:37:27 +00:00
Languages
Go 78.9%
HTML 15.8%
CSS 5.3%