update macos binary; update readme

This commit is contained in:
Isaac Lewis 2026-01-15 10:31:54 -08:00
parent e69cbe9044
commit 72e4103e5c
2 changed files with 42 additions and 0 deletions

View File

@ -5,3 +5,45 @@ 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](https://tilde.town/~ike/rot.html)
## Usage
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
```
To use this program in development, you can run it with `go run`:
```
$ go run main.go poem.txt test.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](https://crontab.guru/) 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](https://golang.org/dl/) installed.
These instructions assume you have Go 1.24 or later, and are running on macOS.
Then, clone this repository and 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 .
```

BIN
dist/rot-darwin vendored

Binary file not shown.