Compare commits

..

No commits in common. "main" and "0.1" have entirely different histories.
main ... 0.1

View File

@ -8,8 +8,6 @@ This program is used in a poetry project that lives here: [tilde.town/~ike/rot.h
## Usage ## Usage
Download binary: [macOS](https://git.tilde.town/ike/rot/releases/download/0.1/rot-darwin), [linux_amd64](https://git.tilde.town/ike/rot/releases/download/0.1/rot-linux_amd64)
Before using this program, you need to have a poem file ready. This is a plain text file. 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: 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:
@ -18,6 +16,12 @@ To use this program in production, run the binary with the the first parameter a
$ rot ~/poem.txt /var/www/rot.html $ 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" 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 it using its algorithm, write the contents to the html file, and then update the
poem file with the new rotted contents. poem file with the new rotted contents.
@ -34,18 +38,7 @@ on a regular interval, for example, every hour:
To build the program, make sure you have [Go](https://golang.org/dl/) installed. 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. These instructions assume you have Go 1.24 or later, and are running on macOS.
Clone the repository: Then, clone this repository and run:
```
$ 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 . $ go build -o dist/rot-darwin .
``` ```