Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

IRC bot you can use to display RSS feeds.

Project description

README

RSSBOT is a IRC bot you can use to display RSS feeds. RSSBOT makes it possible to program your own module enabling your own commands. RSSBOT is in the Public Domain and contains no copyright or LICENSE.

download

clone the source.

> hg clone https://bitbucket.org/bthate/rssbot
> cd rssbot
> sudo python3 setup.py install

another option is to download with pip3 and install globally.

> sudo pip3 install rssbot --upgrade

you can also use the install –user option of setup.py to do a local install.

> python3 setup.py install rssbot --user

add url.

> rssbot rss https://news.ycombinator.com/rss
ok 1

you can use the find command to see what urls are registered:

> rssbot find rss rss
0 https://news.ycombinator.com/rss

irc

the default bot starts the IRC bot, you can disable this with the -x bot.irc option. use server (-s), channel (-c) and nick (-n) options to connect to an IRC network

> rssbot -s localhost -c \#rssbot -n rssbot

you can use the -b option to start the bot in the background and logfiles can be found in ~/.rssbot/logs.

users

if the bot joined the channel, it won’t listen to you on default, you need to add the irc user to the bot. the bot caches the userhosts needed to use in the meet command, so you can use the nickname instead of the full userhost.

> meet bart
~bart@localhost added.

you can also use the full userhost as a argument to meet.

> meet user@server
user user@server created

to give the user a permission you can use the perm command.

> perm user@server oper
ok user@server

the default shell user is root@shell and gives access to all the commands that are available. you can use the –owner option to set the owner of the bot to your own userhost.

cli

rssbot can be used as a command line shell program.

bart@okdan:~$ rssbot v
RSSBOT 12

shell

starting RSSBOT without arguments starts a shell.

bart@okdan:~$ rssbot
> ps
1    1s       Task(CLI.select)
> log first entry to log
ok 1
> find log
0 first entry to log

commands

available commands as of may 2019 are:

announce                 # announce text to all bots in the fleet.
cmds                     # show list of commands.
cfg                      # show configuraton files.
ed                       # show running threads.
find                     # present a list of objects based on prompt input.
fleet                    # show bots in the fleet.
kill                     # kill a task.
load                     # load a module
log                      # log some text.
meet                     # introduce a user.
perm                     # assign permissions to an user.
ps                       # show running tasks.
rm                       # remove an object from the store.
todo                     # enter something todo.
undel                    # undelete an object.
v                        # show version.

programming

if you want to add your own modules to the bot, you can put you .py files in a “mods” directory and use the -m option to point to that directory.

basic code is a function that gets an event as a argument.

def command(event):
    << your code here >>

to give feedback to the user use the event.reply(txt) method.

def command(event):
    event.reply("yooo %s" % event.origin)

to be able to handle the event it needs orig, origin and txt attributes set. the orig attribute is a string of the bot’s repr, it is used to identify the bot to give the reply to. one can use the bot’s event method to create a basic event to use.

contact

you can contact me on IRC/freenode/#dunkbots.

| Bart Thate (bthate@dds.nl, thatebart@gmail.com)
| botfather on #dunkbots irc.freenode.net

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
rssbot-13.tar.gz (85.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page