Bot::Babelfish - Provides Babelfish translation services via an IRC bot


Bot-Babelfish documentation  | view source Contained in the Bot-Babelfish distribution.

Index


NAME

Top

Bot::Babelfish - Provides Babelfish translation services via an IRC bot

VERSION

Top

Version 0.04

SYNOPSIS

Top

    use Bot::Babelfish;

    my $bot = Bot::Babel->new(
        nick => 'babel',  name => 'Babelfish bot', 
        server => 'irc.perl.org', channels => [ '#mychannel' ]
    )->run

DESCRIPTION

Top

This module provides the backend for an IRC bot which can be used as an interface for translation services using Babelfish.

METHODS

Top

init()

Initializes private data.

said()

Main function for interacting with the bot object. It follows the Bot::BasicBot API and expect an hashref as argument. See "COMMANDS" for more information on recognized commands.

help()

Prints usage.

non_unicode_version()

This function returns a printable version of the given string (with a European value of "printable" :-). More precisely, if the string only contains Latin-1 characters, it is returned decoded from internal Perl format. If the string contains others characters outside Latin-1, it's converted using Text::Unidecode.

COMMANDS

Top

translation
    babel from to: some text to translate

Where from and to are ISO-639 two-letters codes representing the languages. See http://babelfish.altavista.com/ for the list of supported languages.

Examples

    babel: fr en: ceci n'est pas une pipe
    <babel> English for "ceci n'est pas une pipe" => "this is not a pipe"

help
    babel help

Shows how to use this bot.

version
    babel version

Prints the version of this module and its dependencies.

DIAGNOSTICS

Top

Can't create new %s object

(F) Occurs in init(). As the message says, we were unable to create a new object of the given class.

SEE ALSO

Top

Bot::BasicBot, Text::Unidecode

AUTHOR

Top

Sébastien Aperghis-Tramoni, <sebastien@aperghis.net>

BUGS

Top

Please report any bugs or feature requests to bug-bot-babel@rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/Bugs.html?Dist=Bot-Babelfish. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE

Top


Bot-Babelfish documentation  | view source Contained in the Bot-Babelfish distribution.