Skip to content

A Nostr quote bot for Linux. Picks a random line from a text file and sends it to Nostr. Script written in both Python and Go.

Notifications You must be signed in to change notification settings

xannythepleb/nostr-quote-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nostr quote bot

Python and Go options with install script for a cronjob

Best run on a VPS or a machine that's always on with reliable internet (Raspberry Pi is more than enough)

Update 26/05/23: Quotes.py script totally rewritten to avoid duplicates. For details see the comments in the script.

Update 27/05/23: Added a Go version!

Update 10/06/23: Added an install script to automate adding your choice of Python or Go script as a cronjob!

A Nostr quote bot for Linux. Picks a random line from a text file and sends it to Nostr using Noscl.

Simply clone the repo to your home folder and give the shell scripts execute permissions by running this command inside the nostr-quote-bot directory:

chmod +x install_nostr_bot.sh && chmod +x nostrquotes.sh && chmod +x gonostrquotes.sh

Now make sure you put your quotes.txt inside the nostr-quote-bot directory with one quote per line and no blank lines.

Then run the install script:

./install_nostr_bot.sh

Done!

Here is an example of this in action!

Direct link to open in Nostr client:

nostr://npub1ms4z8e2fsgjh75vtk8c9pym50gjvp3uxl7uru8v7c7pnd9empadq2ulevr

Full guide here.

Comes in three parts:

  • Python script
  • Shell script
  • Cronjob install script

You simply provide:

  • A quotes.txt file with a new quote (or whatever you want to post) on each line

Dependencies:

  • Python 3 (for the Python script)
  • Go (for Noscl and the Go script)
  • Noscl
  • Linux (tested on Ubuntu)

About

A Nostr quote bot for Linux. Picks a random line from a text file and sends it to Nostr. Script written in both Python and Go.

Topics

Resources

Stars

Watchers

Forks