this repo has no description
TypeScript 100.0%
17 2 0

Clone this repository

https://tangled.org/modamo.xyz/biook
git@tangled.org:modamo.xyz/biook

For self-hosted knots, clone URLs may differ based on your setup.

README.md

Biook#

Automatically update your Bluesky bio with your currently reading books from Hardcover.

What it does#

  • Fetches your 3 most recently updated books from Hardcover
  • Updates a "Currently Reading" section in your Bluesky bio
  • Runs hourly via cron (only updates when your reading list changes)

Setup#

Prerequisites#

  • Node.js 18+
  • A Hardcover account with API token
  • A Bluesky account

Installation#

  1. Clone the repo:
git clone https://tangled.org/modamo.xyz/biook
cd biook
npm install
  1. Create a .env file:
HARDCOVER_TOKEN="your_hardcover_token_here"
IDENTIFIER="did:plc:yourDID"
PASSWORD="your-app-password"
PDS_URL="https://blacksky.app"
  1. Get your Hardcover API token:

    • Go to Hardcover API
    • Copy the value in the first text field box, the string after "Bearer"
    • Replace "your_hardcover_token_here" with that value
  2. Get your Bluesky Identifier:

    • Clicking on the Profile tab in Bluesky will direct you to your profile
    • In the URL bar, copy the part after profile/
    • Replace "did:plc:yourDID"
  3. Get your Bluesky App Password:

    • On Bluesky, click Settings in the sidebar
    • Click Privacy and Security
    • Click App passwords
    • Click "+ Add App Password"
    • (Optional) Name it biook
    • Click Next
    • Copy the value
    • Replace "your-app-password"
  4. Get your PDS URL

  5. Build and test:

npx tsc
node script.js
pm2 start script.js --name biook --cron "0 * * * *"
pm2 save
pm2 startup

Bio Format#

The script looks for and updates a section like:

Currently Reading
📚
Book Title by Author Name
Another Book by Another Author
📚

If this section doesn't exist, it will be added to the end of your bio.

License#

MIT