5

I am using supybot. Can anyone say me the procedure for adding ubottu factoids database to my IRC bot? I found the ubottu factoids database here http://www.ubottu.com/factoids.cgi

I want to add this database to my IRC bot. Can anyone tell me the procedure?

1
  • I think we have to create a table using sqlite2 and after that we have to place the database file in appropriate location.But i am not sure about it.
    – karthick87
    Nov 14, 2010 at 21:40

3 Answers 3

3

ubottu uses the Encyclopedia plugin to manage its factoids, not the 'Factoid' plugin that comes with supybot itself. You can download the current bot code by running bzr branch lp:ubuntu-bots, more information about the bot code can be found on its launchpad page.

Either drop all the subfolders that you get after branching the bzr repo into your bot plugin directory or create a new one and add that path into supybot.directories.plugins

After loading Encyclopedia inside supybot, you'll need to modify your settings so that it knows where your factoid database is. The important config values for that are plugins.encyclopedia.datadir and plugins.encyclopedia.database . If you don't set these, it will use your bot's data directory and ubuntu as the database name. (note: the database name should be entered without the .db extension)

1
  • Thankyou also say me how to delete the factoid keys.A single factoid has many keys how delete a particular key.
    – karthick87
    Nov 20, 2010 at 5:05
2

Ubuntu Factoids uses the Encyclopedia plugin. Get it from bzr branch lp:ubuntu-bots and then download Ubuntu factoids database from here. Place your database in the data directory (i.e /supybot/data/). You should point to the location of the database in your bot configuration. Be sure that you enable Encyclopedia plugin by typing load Encyclopedia. Also you should have sqlite installed in your system.

sqlite Install sqlite

You can also create your own database. Open a terminal and type sqlite and copy / paste the following in terminal.

CREATE TABLE factoids ( 
        id INTEGER PRIMARY KEY,
        author VARCHAR(100) NOT NULL,
        name VARCHAR(20) NOT NULL,
        added DATETIME,
        value VARCHAR(200) NOT NULL,
        popularity INTEGER NOT NULL DEFAULT 0
); 
1

The factois db (sqlite2 format as used by the factoids plugin) is available at http://www.ubottu.com/ubuntu.db . I never used supybot, but basically you will need to enable the Factoids plugin and place the db renaming it to the channel name you want it to work on.

2
  • Already tried this it din work.
    – karthick87
    Nov 13, 2010 at 7:25
  • Also say me how to customize error reports..?
    – karthick87
    Nov 13, 2010 at 19:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .