Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bordalix/pinlink
Fetch from Pinboard and publish to Nostr
https://github.com/bordalix/pinlink
Last synced: about 2 months ago
JSON representation
Fetch from Pinboard and publish to Nostr
- Host: GitHub
- URL: https://github.com/bordalix/pinlink
- Owner: bordalix
- Created: 2024-02-18T16:56:54.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-03-29T10:32:48.000Z (10 months ago)
- Last Synced: 2024-03-29T11:39:10.564Z (10 months ago)
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pinlink
Shell script to fetch new posts from pinboard.in and publish to Nostr
It gets posts from https://pinboard.in marked as public with less than 24 hours, configurable in [fetch.sh](./fetch.sh)
The list of relays is configurable in [publish.sh](./publish.sh)
## Requirements
- [nak](https://github.com/fiatjaf/nak), the nostr army knife
- [jq](https://jqlang.github.io/jq/), a command-line JSON processor## How to use it
Clone this repo:
```bash
$ git clone https://github.com/bordalix/pinlink
$ cd pinlink
```Add your credentials to file `.env.local`:
```bash
# get it from pinboard.in > settings > password
$ echo "authtoken=username:1234567890ABCDEF" > .env.local
# your nostr private key in hexadecimal format
$ echo "seckey=<64 hex chars>" >> .env.local
```There are 4 executable scripts:
- [fetch.sh](./fetch.sh) fetches new posts from pinboard.in and saves to `posts.json`
- [create.sh](./create.sh) from `posts.json` creates `event.txt` with full text for the event to be published
- [publish.sh](./publish.sh) gets event content from `event.txt`, signs and publishes it to list of relays
- [run.sh](./run.sh) run all 3 previous scripts in sequence