Log in

No account? Create an account

Mon, Jan. 10th, 2005, 12:30 pm

dipsy is #london.pm's infobot. She's, err, unique.

Yesterday I got fed up with dipsy saying

    14:09 <@muttley> change 140 USD into GPB
    14:09 <+dipsy> exchange.pl: site scraping removed by request

and fixed the exchange.pl to use Finance::Currency::Convert::XE. I also added a convert.pl which co-opts the convert keyword, previously a synonym for (ex?)change, and uses Math::Units to convert between various formats. You can now do

    18:14 <muttley> convert 1 m into miles
    18:14 <dipsy> 1 m is 0.000621371192237334 miles
    18:14 <muttley> convert 1 min to seconds
    18:14 <dipsy> 1 min is 60 seconds


    18:14 <muttley> convert 1 gallon into cm^3
    18:14 <dipsy> 1 gallon is 3785.411784 cm^3

and even

    18:13 <muttley> convert 100 hz into rpm
    18:13 <dipsy> 100 hz is 6000 rpm

Which is cool. (The diff to Extras.pl is here).

This morning I also stole a feature from Tom Insam's mind bot based on his Bot::BasicBot::Pluggable and URI::Title modules and hacked in URI titling :

    10:32 <muttley> http://thegestalt.org/simon
    10:32 <dipsy>  [ L a u n c h p a d ] 
    10:33 <muttley> http://london.pm.org
    10:33 <dipsy>  [ London.pm - London Perl Mongers ] 

I still harbour plans to convert dipsy over to Bot::BasicBot::Pluggable.

But that's for another day.