Skip to content
Snippets Groups Projects
Victor Fors's avatar
whiteline authored
4170c330
Forked from flisk / theobot
159 commits behind the upstream repository.

theobot

An IRC bot written in Rust.

Features

  • Link annotations
    Page title for web pages, size and resolution for JPG, GIF, PNG and WebP images.

  • Random quote dispenser
    .? shows all lists, .<list> prints a quote.

  • Full-width text conversion
    .ae aesthetic becomes AESTHETIC.

  • sed-style substitutions
    s/hello/goodbye/

  • IPC client
    Each instance of theobot can open a Unix socket at a path specified with the socket_path config option. You can then send messages through this interface using the theobot msg command, e.g.: theobot msg /etc/theobot/freenode.toml '#channelname' 'Hello there!'

  • .tell
    .tell JohnDoe The shipment is ready. sends the specified message to JohnDoe when they send their next message.

  • **.seen <nick>**
    Displays when a certain nick was last seen.
    Must be explicitly enabled with enable_seen = true in the config file.

  • .weather [location]/**.weather_set [location]**
    .weather Bielefeld displays the current weather in Bielefeld. .weather_set Bielefeld sets the location of your current nick to Bielefeld, so you can do .weather without specifying your location each time.

  • theobot-youtube-alert
    Scan YouTube channels for new videos and announce them to IRC through theobot.

Requirements

theobot

  • Rust 1.22.1 or newer
  • OpenSSL
  • libcurl
  • libmagic

To install the required libraries on Debian stretch: apt install libssl-dev libcurl3 libmagic-dev

theobot-youtube-alert

  • Python 3.4 or newer
  • feedparser
  • theobotmsg on $PATH

Resources

src/resources/html_entities.json contains a JSON object mapping HTML character names to their unicode values. This file was produced by transforming the official named character table (provided as a JSON file after the reference table) with jq like so:

jq -a 'with_entries({key: .key[1:-1], value: .value.characters})' entities.json \
   > html_entities.json

Licensing