Limnoria/plugins/Google
2021-12-04 03:19:12 +01:00
..
locales Remove Spanish translations as requested by the author 2021-06-24 22:36:04 -07:00
__init__.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
config.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
messages.pot Squashed commit of the following: 2014-12-20 14:37:27 +01:00
parser.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
plugin.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
README.rst supybot-plugin-doc: Remove extra space + regenerate all READMEs. 2021-12-04 03:19:12 +01:00
test.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00

Documentation for the Google plugin for Supybot

Purpose

Accesses Google for various things.

Usage

This is a simple plugin to provide access to the Google services we all know and love from our favorite IRC bot.

  1. google

    Searches for a string and gives you 3 results from Google search !google something

  2. lucky

    Return the first result (Google's "I'm Feeling Lucky" search) !lucky something

  3. calc

    Does mathematic calculations !calc 5+4

  4. translate

    Translates a string !translate en ar test

Check: Supported language codes

Commands

cache <url>

Returns a link to the cached version of <url> if it is available.

calc <expression>

Uses Google's calculator to calculate the value of <expression>.

fight <search string> <search string> [<search string> ...]

Returns the results of each search, in order, from greatest number of results to least.

google <search> [--{filter,language} <value>]

Searches google.com for the given string. As many results as can fit are included. --language accepts a language abbreviation; --filter accepts a filtering level ('active', 'moderate', 'off').

lucky [--snippet] <search>

Does a google search, but only returns the first result. If option --snippet is given, returns also the page text snippet.

phonebook <phone number>

Looks <phone number> up on Google.

translate <source language> [to] <target language> <text>

Returns <text> translated from <source language> into <target language>. <source language> and <target language> take language codes (not language names), which are listed here: https://cloud.google.com/translate/docs/languages

Configuration

supybot.plugins.Google.baseUrl

This config variable defaults to "google.com", is network-specific, and is channel-specific.

Determines the base URL used for requests.

supybot.plugins.Google.bold

This config variable defaults to "True", is network-specific, and is channel-specific.

Determines whether results are bolded.

supybot.plugins.Google.colorfulFilter

This config variable defaults to "False", is network-specific, and is channel-specific.

Determines whether the word 'google' in the bot's output will be made colorful (like Google's logo).

supybot.plugins.Google.defaultLanguage

This config variable defaults to "lang_en", is network-specific, and is channel-specific.

Determines what default language is used in searches. If left empty, no specific language will be requested. Valid strings: lang_af, lang_sq, lang_am, lang_ar, lang_hy, lang_az, lang_eu, lang_be, lang_bn, lang_bg, lang_my, lang_ca, lang_zh, lang_zh-CN, lang_zh-TW, lang_hr, lang_cs, lang_da, lang_dv, lang_nl, lang_en, lang_eo, lang_et, lang_tl, lang_fi, lang_fr, lang_gl, lang_ka, lang_de, lang_el, lang_gu, lang_iw, lang_hi, lang_hu, lang_is, lang_id, lang_iu, lang_it, lang_ja, lang_kn, lang_kk, lang_km, lang_ko, lang_ku, lang_ky, lang_lo, lang_lv, lang_lt, lang_mk, lang_ms, lang_ml, lang_mt, lang_mr, lang_mn, lang_ne, lang_no, lang_or, lang_ps, lang_fa, lang_pl, lang_pt-PT, lang_pa, lang_ro, lang_ru, lang_sa, lang_sr, lang_sd, lang_si, lang_sk, lang_sl, lang_es, lang_sv, lang_tg, lang_ta, lang_tl, lang_te, lang_th, lang_bo, lang_tr, lang_uk, lang_ur, lang_uz, lang_ug, lang_vi, and lang_auto.

supybot.plugins.Google.maximumResults

This config variable defaults to "3", is network-specific, and is channel-specific.

Determines the maximum number of results returned from the google command.

supybot.plugins.Google.oneToOne

This config variable defaults to "False", is network-specific, and is channel-specific.

Determines whether results are sent in different lines or all in the same one.

supybot.plugins.Google.public

This config variable defaults to "True", is not network-specific, and is not channel-specific.

Determines whether this plugin is publicly visible.

supybot.plugins.Google.referer

This config variable defaults to "", is not network-specific, and is not channel-specific.

Determines the URL that will be sent to Google for the Referer field of the search requests. If this value is empty, a Referer will be generated in the following format: http://$server/$botName

supybot.plugins.Google.searchFilter

This config variable defaults to "moderate", is network-specific, and is channel-specific.

Determines what level of search filtering to use by default. 'active' - most filtering, 'moderate' - default filtering, 'off' - no filtering Valid strings: active, moderate, and off.

supybot.plugins.Google.searchSnarfer

This config variable defaults to "False", is network-specific, and is channel-specific.

Determines whether the search snarfer is enabled. If so, messages (even unaddressed ones) beginning with the word 'google' will result in the first URL Google returns being sent to the channel.