Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
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 '10 at 21:40

3 Answers 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)

share|improve this answer
    
Thankyou also say me how to delete the factoid keys.A single factoid has many keys how delete a particular key. –  karthick87 Nov 20 '10 at 5:05
up vote 1 down vote accepted

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

sqlite Install sqlite

You can also create your own database,goto 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

); 
share|improve this answer

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.

share|improve this answer
    
Already tried this it din work. –  karthick87 Nov 13 '10 at 7:25
    
Also say me how to customize error reports..? –  karthick87 Nov 13 '10 at 19:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.