Difference between revisions of "Begiak"

From Apertium
Jump to navigation Jump to search
Line 10: Line 10:
Begiak recognises the following commands.
Begiak recognises the following commands.


* .awikstats – "awikstats update LANG" should update the wikipage apertium-LANG/stats (note: will dump a bunch of info in private chat
=== Apertium features ===
* .follow ''nick'' ''lg1-lg2'' ''(follower)'' — Follow someone and translate as they speak. (Translations are sent as notices to the follower (follower feature is admin only!))
These are special apertium-related or #apertium-specific commands, or were designed with apertium in mind.
* .awik — Search for something on Apertium wiki or point a user to a Apertium wiki page.
* .awikstats – "awikstats update LANG" should update the wikipage apertium-LANG/stats
* .follow ''nick'' ''lg1-lg2'' ''(follower)'' — Follow someone and translate as they speak. (Translations are sent as notices to the follower (admin only!))
* .following — List people currently being followed.
* .following — List people currently being followed.
* .gitserver [status|start|stop] — get the githook-server's status/start it/stop it. See [[Begiak's git plugin]] for more info.
* .gitserver [status|start|stop] — get the githook-server's status/start it/stop it. See [[Begiak's git plugin]] for more info. start and stop are admin-only.
* .iso639 ''lg'' — look up [http://en.wikipedia.org/wiki/ISO_639 ISO 639]-1, -2 and -3 language codes either by code or by language name. Codes sourced from Ethnologue.com (639-3) and Wikipedia (-1 and -2)
* .iso639 ''lg'' — look up [http://en.wikipedia.org/wiki/ISO_639 ISO 639]-1, -2 and -3 language codes either by code or by language name. Codes sourced from Ethnologue.com (639-3) and Wikipedia (-1 and -2)
* .isodb update — update the local database of ISO 639 codes (admin only!)
* .isodb update — update the local database of ISO 639 codes (admin only!)
Line 27: Line 24:
* .t ... ''lg1-lg2 ( | lg2-lg3 ...)'' — Apertium translate
* .t ... ''lg1-lg2 ( | lg2-lg3 ...)'' — Apertium translate
* .unfollow ''nick'' — Stop following a user.
* .unfollow ''nick'' — Stop following a user.
* .wikicount ''lg'' — Get the number of articles an official or incubated Wikipedia for the specified language has, given a Wikipedia code or partial language name. (currently seems to be broken)
<!--* begiak: esan! — Poll for svn updates ("esan!" means "say!" in Basque)
<!--* begiak: esan! — Poll for svn updates ("esan!" means "say!" in Basque)
* begiak: recent — Get most recent svn/git updates ([[Begiak's git plugin]] describes the git part)
* begiak: recent — Get most recent svn/git updates ([[Begiak's git plugin]] describes the git part)
* begiak: info <repo> <rev> — Get information on a given revision of a given SVN or git repository ([http://wiki.apertium.org/wiki/Begiak%27s_git_plugin Begiak's git plugin] describes the git part)-->
* begiak: info <repo> <rev> — Get information on a given revision of a given SVN or git repository ([http://wiki.apertium.org/wiki/Begiak%27s_git_plugin Begiak's git plugin] describes the git part)-->

=== General features ===
These are more general-use commands; while many are useful to us in #apertium, they weren't designed specifically for #apertium (though some were hacked to make them more appropriate for #apertium).

* .8ball — magic 8 ball
* .8ball — magic 8 ball
* .beats — Shows the internet time in Swatch beats
* .beats — Shows the internet time in Swatch beats
Line 52: Line 44:
* .npl — Shows the time from NPL's SNTP server
* .npl — Shows the time from NPL's SNTP server
* .nsfw ''link'' - for when a link isn't safe for work
* .nsfw ''link'' - for when a link isn't safe for work
* .py — Evaluate an expression in python (This runs as a sandboxed web service, not on your computer) (currently broken)
<!---->
* .pesters
* .pesters
** begiak: pester ''nick'' ''message'' — Sends a message to nick every hour they're around (or something. settable in config)
** begiak: pester ''nick'' ''message'' — Sends a message to nick every hour they're around (or something. settable in config)
Line 71: Line 61:
*** <code>nick, .wik India</code>
*** <code>nick, .wik India</code>
*** <code>.awik point nick India</code>
*** <code>.awik point nick India</code>
<!---->
* .queue — Manage lists. (seems to be broken)
** .queue new ''name'' [''item1'', ''item2'' ...] — Make a new queue
** .queue ''name'' — Display a queue
** .queue delete ''name'' — Delete a queue
** .queue ''name'' add ''item'' — Add an item
** .queue ''name'' remove ''item'' — Remove an item
** .queue ''name'' pop — Pop an item off the queue
** .queue ''name'' swap ''item1'', ''item2'' — Swap two items
* .seen — When was the last time a user was seen?
* .seen — When was the last time a user was seen?
* .time (''TZ'') — Returns current time in ''TimeZone'' (can be a city or a time zone e.g UTC). If ''TimeZone'' is empty, returns current time in GMT time zone.
* .time (''TZ'') — Returns current time in ''TimeZone'' (can be a city or a time zone e.g UTC). If ''TimeZone'' is empty, returns current time in GMT time zone.
Line 95: Line 76:
* .u — Search for a unicode character
* .u — Search for a unicode character
* .weather — Get the weather for a city
* .weather — Get the weather for a city
* .whereis ''nick'' — Tells you nick's current status. (seems to be broken).
* .yi — Shows whether it is currently yi or not
* .yi — Shows whether it is currently yi or not


Line 101: Line 81:
These functions/plugins either don't seem to work or need some figuring out:
These functions/plugins either don't seem to work or need some figuring out:
* .tfw
* .tfw
* <s>rule34</s> disabled
* lastfm
* lastfm
* mylife (.fml .mlia)
* mylife (.fml .mlia)
* oblique
* oblique
* .whereis ''nick'' — Tells you nick's current status.
* .queue — Manage lists.
** .queue new ''name'' [''item1'', ''item2'' ...] — Make a new queue
** .queue ''name'' — Display a queue
** .queue delete ''name'' — Delete a queue
** .queue ''name'' add ''item'' — Add an item
** .queue ''name'' remove ''item'' — Remove an item
** .queue ''name'' pop — Pop an item off the queue
** .queue ''name'' swap ''item1'', ''item2'' — Swap two items
* .py — Evaluate an expression in python (This runs as a sandboxed web service, not on your computer)
* .wikicount ''lg'' — Get the number of articles an official or incubated Wikipedia for the specified language has, given a Wikipedia code or partial language name.


== Wishlist ==
== Wishlist ==

Revision as of 18:05, 21 January 2020

begiak is the IRC bot in the #apertium IRC channel. It serves several purposes, including to showcase some applications of the apertium translation API and to facilitate communication when users are offline.

Background

Begiak was set up by conor_f for GCI 2012, and several modules were written and fixed by sushain, Qasim, and a number of other GCI students since then. The core code base is the mutantmonkey port to Python3 of the phenny bot. Our codebase is currently hosted at [1].

Begiak means "the eyes" in Basque.

Features

Begiak recognises the following commands.

  • .awikstats – "awikstats update LANG" should update the wikipage apertium-LANG/stats (note: will dump a bunch of info in private chat
  • .follow nick lg1-lg2 (follower) — Follow someone and translate as they speak. (Translations are sent as notices to the follower (follower feature is admin only!))
  • .following — List people currently being followed.
  • .gitserver [status|start|stop] — get the githook-server's status/start it/stop it. See Begiak's git plugin for more info. start and stop are admin-only.
  • .iso639 lg — look up ISO 639-1, -2 and -3 language codes either by code or by language name. Codes sourced from Ethnologue.com (639-3) and Wikipedia (-1 and -2)
  • .isodb update — update the local database of ISO 639 codes (admin only!)
  • .isodb status — see if the database updater (.isodb update) is running
  • .issue — create a new GitHub issue.
  • .listpairs (lg) — List language pairs available for apertium translation
  • .listlangs — List languages available for apertium translation
  • .(ml|mailinglist) poll — Poll for new messages in apertium mailing lists (this is automatically done every five minutes).
  • .(ml|mailinglist) last list — Get the last message in a specified list.
  • .t ... lg1-lg2 ( | lg2-lg3 ...) — Apertium translate
  • .unfollow nick — Stop following a user.
  • .8ball — magic 8 ball
  • .beats — Shows the internet time in Swatch beats
  • .botsnack — Give begiak a snack for being good
  • .c — Calculator using SymPy.
  • .chill — Measure the current channel chillness level.
  • .choose choice1 choice2 — begiak will choose one of the two options (randomly).
  • .ety — Look up the etymology of a word
  • .fcc callsign — Look up a callsign issued by the FCC
  • .fight nick — have begiak fight someone for you.
  • .greeting — Manage Greetings (admin only)
    • .greeting add name message — Add a greeting
    • .greeting del name - Delete a greeting
  • .hug nick — have begiak hug someone for you.
  • .in — Set a reminder
  • .linx url — Upload url to linx.li
  • .npl — Shows the time from NPL's SNTP server
  • .nsfw link - for when a link isn't safe for work
  • .pesters
    • begiak: pester nick message — Sends a message to nick every hour they're around (or something. settable in config)
    • .pesters snooze nick - 'snooze' a pester from nick
    • .pesters dismiss|rm|remove to|from nick - to stop pestering/being pestered by nick
  • Point commands:
    • The point commands are used to point other users to the output of several supported commands which are as follows:
      • Apertium Wiki (.awik)
      • Wikipedia (.wik)
      • Urban Dictionary (.urb)
      • Wikitionary (.w)
      • DuckDuckGo Search ( .search )
    • Replace .wik or .awik with any of the above commands for appropriate output like 'svineet, "India, officially the Republic of India (Bhārat Gaṇarājya),[18][19][c] is a country in South Asia" - https://en.wikipedia.org/wiki/India' for .wik India -> svineet
      • .awik Begiak -> svineet
      • .awik Begiak → svineet
      • nick: .wik India
      • nick, .wik India
      • .awik point nick India
  • .seen — When was the last time a user was seen?
  • .time (TZ) — Returns current time in TimeZone (can be a city or a time zone e.g UTC). If TimeZone is empty, returns current time in GMT time zone.
  • .tz — Timezone converter Converts a time from one timezone to another. (e.g., .tz 335EST in CET, or .tz 335EST in London)
  • .tzdb — Manage database
    • .tzdb update — Updates a timezones database (admin only)
    • .tzdb status — Returns a status of updating a timezones database
  • .tells — See a summary of outstanding reminders you've sent to others using "begiak: tell"
    • begiak: tell nick message (**pm**) — Tells someone something the next time they say something in a channel begiak is monitoring. The **pm** option has the message sent privately.
    • .tells nick — List your reminders currently queued to that nick
    • .tells rm num — Delete a queued reminder using its number from .tells nick
    • .alias add nick — adds an alias for your nick of nick
    • .alias rm nick — removes an alias for nick nick
    • .alias list nick — lists existing aliases for nick
  • .u — Search for a unicode character
  • .weather — Get the weather for a city
  • .yi — Shows whether it is currently yi or not

??

These functions/plugins either don't seem to work or need some figuring out:

  • .tfw
  • lastfm
  • mylife (.fml .mlia)
  • oblique
  • .whereis nick — Tells you nick's current status.
  • .queue — Manage lists.
    • .queue new name [item1, item2 ...] — Make a new queue
    • .queue name — Display a queue
    • .queue delete name — Delete a queue
    • .queue name add item — Add an item
    • .queue name remove item — Remove an item
    • .queue name pop — Pop an item off the queue
    • .queue name swap item1, item2 — Swap two items
  • .py — Evaluate an expression in python (This runs as a sandboxed web service, not on your computer)
  • .wikicount lg — Get the number of articles an official or incubated Wikipedia for the specified language has, given a Wikipedia code or partial language name.

Wishlist

You can see the old wishlist here

  • mediawiki plugins
    • have better logic for text that's displayed for a page/section (need examples where it fails!)
      • where the first thing is [[…|En français]] (though really, we should have a real template on the wiki for translations)
      • where there's immediately a subsection? (cf. Talk:Begiak)
    • generalise mediawiki plugin?
  • Pollers (svn, git, etc.)
    • show short links to new apertium-stuff posts (poll like with commits?) ☭
      • alternatively: begiak lacks a filter or two, sometimes fills up channels making S/N high. begiak should detect quiet channels and not output there.
    • svnpoller and gitpoller's lookup functions (i.e., repeat information on specific revision)
  • timezones
    • better mapping of city names to timezones

Help!

Begiak is controlled by an init script (/etc/init.d/begiak.sh) on bytemark, and can be started, stopped, and restarted by anyone with sudo access.