Giter Club home page Giter Club logo

bible-bot's Introduction

Bible Bot

Provides links to different translations of a random verse from the bible. Can post on Mastodon and Signal.

Run

  1. Clone the project with Git or download it as a ZIP.
  2. Copy the file config-template.ini to config.ini and edit the copy so that the data in it is correct. Also see below for explanations of the settings.
  3. Python 3.9 or higher and the necessary libraries must be installed (e.g. with the command pip3 install -r requirements.txt). Recommendation: Use a venv and install the libraries in it.
  4. Run either bot_console.py, bot_mastodon.py or bot_signal.py periodically, e.g. once a day.

Console

Simply outputs the message as text. Useful for shell scripts.

Mastodon

Posts the message as a status in Mastodon. The Mastodon account used must be configured with the following settings:

  • api_base_url: the address of the Mastodon instance
  • access_token: the access token of the Mastodon "application" (see below)

In the Mastodon settings there is the "Development" section and there the "New Application" button. There must be an application that has at least the permission write:statuses - the token from this must be configured in the bot.

Signal

Posts the message as a Signal message in as many direct chats and/or groups as you like. This is implemented via signal-cli which has to be set up separately - see Installation and Einrichtung). Access to signal-cli is via DBus. Required settings for the bot:

  • sender: the number that should send the messages (must be configured in signal-cli) in the format 49123456789
  • recipients (optional): |-separated list of numbers in the format +49123456789, to which the messages should be sent directly
  • groups (optional): |-separated list of group names of which sender is a member - the message will be posted in these groups

Global settings

  • language: use book names and abbreviations in this language - the file books_XY.csv has to exist in subdirectory data if language is set to XY
  • translations: used to generate the links to the bible verse, example:
    NIV=New International Version|ELB=Elberfelder Bibel
    • the part after the = is the displayed name and can be omitted
    • the first entry is used to read the bible text, if configured - see below
  • text_directory: (optional) the "raw" output directory of a run of bibleserver-scraper (expected are files named "[translation]-[booknumber]-[bookabbreviation][chapternumber].txt", example: "LUT-09-1.Samuel24.txt")

bible-bot's People

Contributors

mathisdt avatar

Watchers

 avatar

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.