Code Monkey home page Code Monkey logo

nostr-quote-bot's Introduction

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)

nostr-quote-bot's People

Contributors

xannythepleb avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

zatzby

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.