Clone
2
Quotes
Camille Frantz edited this page 2025-07-08 10:46:45 -05:00

The Quotes Bot

The QuotesBot reads from a Comma-Separated list (CSV) of quotes in a specific format and posts a random choice to an AcitivityPub account. It will also post output to a pushover account if configured.

The variables this code expects are:

- QUOTES_SOURCE               # URL to your CSV file; it expects an https endpoint
- BOTS_QUOTESBOT_TOKEN        # Access token to your ActivityPub account
- BOTS_ENDPOINT               # The URL of your ActivityPub instances (e.g. mastodon.social)
- PUSHOVER_USER_TOKEN         # Optional
- PUSHOVER_APP_TOKEN          # Optional

The CSV-formatted file is expected to be in this format:

quote, author
"The quote goes here", "Author Name"
"Another quote goes here", "Author Name"
...

At the moment, it expects that your file is hosted somewhere online. The old code checked to see whether the file was local or not but since this code is executed here in the repository, it makes it difficult to host the file here. At least for the time being - that could change.

You can follow this iteration of the bot at @QuotesBot

Back home