?

Log in

No account? Create an account

Mon, Jan. 17th, 2005, 12:10 pm
Bot::Infobot

Will hit CPAN sometime, err, real soon now. It's done. Apart from the Todo plugin because I really just couldn't be bothered. All I need to do is package various bit seperately and feed some patches back to Tom.

It features a pretty nifty brane slurper that extracts stuff from an infobot db and turns it into the form we expect.

Once the modules are installed (cue bitching about Perl being too library centric) you create a new directory and do something similar to

    % infobot-import dbi:mysql:dipsy  myuser mypasswd
    ************************************************************************
    
       Infobot brain slurper  
       - convert an Infobot brain to Bot::BasicBot::Pluggable
    
    ************************************************************************
    reticulating splines......................injoke successfully propagated
    extracting factoids..............found 115342 factoids with 203899 atoms
    extracting last seen........................................did 0 people
    extracting positive karma......................inserted 26031 real items
    extracting negative karma......................inserted 19892 real items
    fudging non explained karma.......................................fudged
    storing karma.......................................................done
    setting ignore list......................................adding 7 people
         
    Completed - have a nice day!

(For something as large as dipsy this might take up around 5 minutes.)

The drawback is that Bot::BasicBot::Pluggable uses Storable which can bloat up memory usage. I may have a look at pluggable backends for storage based on a tie interface.

Then you just run

    % infobot

and it looks in the current directory for an infobot.config file which should have variables set for

    nick
    server
    channels 

although all 3 have defaults et voila.

The config file is .ini style. Main bot variables are in the root whereas config values for plugins are in their own space

    nick     = dipsy2
    server   = london.irc.perl.org
    channels = #muttbot    
    [ Google ]
    key = mykey
    [ Aviation ] 
    taf_highlight_bold = on