nlink/README.md

48 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2023-05-06 07:14:37 +00:00
# nomadlink
nomadlink is a tool for syncing a Nomad RSS feed to pnut.
[Nomad](https://nomad.wntrmute.net/)
[Pnut](https://beta.pnut.io/)
The original version was running as a cronjob on a Raspberry Pi. I've
modified it to run on a gokrazy instance.
## Previous version instruction
### Raspberry Pi setup
1. [Install go](https://www.e-tinkers.com/2019/06/better-way-to-install-golang-go-on-raspberry-pi/).
2. Install mercurial: `sudo apt install mercurial`
3. Fetch the repository and `cd` to the directory: `hg clone https://hg.sr.ht/~kisom/nlink && cd nlink`
4. Make the config directory: `mkdir -p ~/.config/nomadlink`
5. Create a new Pnut dev app from the [Pnut developer page](https://pnut.io/dev).
6. Copy the `creds.json` file to `~/.config/nomadlink/creds.json` and fill it out with the correct details from the Pnut dev page.
7. Run `go build`.
8. Verify the build works by running `./nlink -i -m`. This will create the database and mark all the posts you currently have on nomad as already posted.
9. Copy `nlink` to `/usr/local/bin`: `sudo cp nlink /usr/local/bin/`
10. Edit your crontab (`crontab -e`) and add the following line:
```
*/15 * * * * /usr/local/bin/nlink -c /home/$USER/.config/nomadlink/creds.json -d /home/$USER/.config/nomadlink/nomadlink.db
```
11. Eventually, posts should start showing up.
### Optional
12. Install postfix and set it up as a local site.
```
sudo apt install postfix bsd-mailx
```