Skip to content

Github mirror of "wikimedia/fundraising/slander" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing

Notifications You must be signed in to change notification settings

wikimedia/wikimedia-fundraising-slander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Relay feed and vcs activities to an IRC channel.

Installation

git clone https://gerrit.wikimedia.org/r/wikimedia/fundraising/slander

pip install -e slander

OR

apt-get install python-twisted python-feedparser python-yaml python-irclib python-openssl python-service-identity

Configuration

Config files are written in YAML, and are usually kept in the user's ".slander" or in /etc/slander

Here's an example configuration file--note that YAML is whitespace-sensitive, requires spaces, not tabs, and alignment must be preserved...

# List all jobs, keyed by type (FIXME: we should allow more than one per type)
jobs:
    tail:
        path: /var/log/meltdown

        # Trim some extraneous stuff from the loglines.
        massage_regexes:
            - "(?xi) ^ [A-Za-z]{3} \s+ \d+": ""
            - "log_to_irc\[\d+\]": ""

irc:
    host: irc.libera.chat
    port: 6667
    #ssl: True
    nick: civi-activity
    # Optional unless your bot is registered
    pass: FOO
    realname: CiviCRM svn and jira notification bot
    # Note that quotes are necessary around #channames
    channel: "#civicrm-test"
    #channel_key: "channel-password"
    # Truncate messages longer than this many characters
    maxlen: 200

# Measured in seconds
poll_interval: 60

# Override the builtin URL if you've forked this project, so people know
# how to contribute.
source_url: https://gerrit.wikimedia.org/g/wikimedia/fundraising/slander/+/refs/heads/master

Running

To start the bot, call

slander

If you want to specify a config file, pass it as an argument:

slander /etc/slander/PROJ.yaml

Alternatively, you can give just the project name, and slander will look in /etc/slander/PROJ.yaml:

slander PROJ

Credits

IRC code adapted from Miki Tebeka's http://pythonwise.blogspot.com/2009/05/subversion-irc-bot.html

Markup stripper from Eloff's http://stackoverflow.com/a/925630

Forked from https://github.com/adamwight/slander

The project homepage is https://gerrit.wikimedia.org/g/wikimedia/fundraising/slander/+/refs/heads/master

About

Github mirror of "wikimedia/fundraising/slander" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages