Difference between revisions of "Begiak"
Firespeaker (talk | contribs) |
Firespeaker (talk | contribs) |
||
Line 127: | Line 127: | ||
** generalise mediawiki plugin? |
** generalise mediawiki plugin? |
||
* find out why the "posted" command isn't working as expected |
* find out why the "posted" command isn't working as expected |
||
* document any command that does not have information |
* document any command that does not have information ☭ |
||
* Pollers (svn, git, etc.) |
* Pollers (svn, git, etc.) |
||
** show short links to new apertium-stuff posts (poll like with commits?) |
** show short links to new apertium-stuff posts (poll like with commits?) |
Revision as of 03:17, 27 October 2014
begiak is the irc bot in the #apertium irc channel. Its primary function is to report svn updates to various relevant repositories. However, it serves some other purposes, including to showcase some applications of the apertium translation API.
Background
Begiak was set up by conor_f for GCI 2012, and several modules were written and fixed by sushain and Qasim. It runs on apertium.vm.bytemark.co.uk. The code base is the mutantmonkey port to python3 of the phenny bot. Our codebase is currently hosted by Jonathan in his github.
Begiak means "the eyes" in Basque.
Repositories monitored
The following svn repositories are monitored by begiak. Begiak polls for updates when it receives a ping from the server. Also see below for some ways to manually update
- apertium.svn.sourceforge.net
- HFST
- vislcg3
- phenny
- omorfi
- etc.
AI Features
Begiak recognises the following commands.
Apertium features
These are special apertium-related or #apertium-specific commands, or were designed with apertium in mind.
- .awik — Search for something on Apertium wiki.
- .(eth|lg|ethno|logue|ethnologue) lg — Search Ethnologue.com for information on a desired language (given ISO 639 code or language name)
- .fight nick — have begiak fight someone for you.
- .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.
- .hug nick — have begiak hug someone for you.
- .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
- .listpairs (lg) — List language pairs available for apertium translation
- .listlangs — List languages available for apertium translation
- .noexceptions (nick) — Tells someone there aren't ever any exceptions
- .t ... lg1-lg2 ( | lg2-lg3 ...) — Apertium translate
- .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.
- begiak: esan! — Poll for svn updates ("esan!" means "say!" in Basque)
- begiak: recent — Get most recent svn updates
- begiak: info <repo> <rev> — Get information on a given revision of a given SVN or git repository
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
- .away (status) — Sets your status to away
- .back (status) — Sets your status to being available.
- .beats — Shows the internet time in Swatch beats
- .botsnack — Give begiak a snack for being good
- .c — Query Google calculator
- .catfacts — Random facts about cats
- .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
- .g — Search on Google
- .gc — Get the number of results on Google
- .in — Set a reminder
- .imdb — Search imdb
- .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
- .py — Evaluate an expression in python (This runs as a sandboxed web service, not on your computer)
- .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
- .seen — When was the last time a user was seen?
- .slogan word — Sloganize a word
- .stache url — Moustachify an image
- .time — Return the current time
- .title — Get the title of a link
- .tock — Shows the time from the USNO's atomic clock
- .u — Search for a unicode character
- .urb — Query urban dictionary
- .val url — Check a webpage using the W3C Markup Validator.
- .w — look up a word on wiktionary
- .wa — Query Wolfram Alpha
- .weather — Get the weather for a city
- .whereis nick — Tells you nick's current status.
- .wik — Search for something on Wikipedia
- .wuvt — Find out what radio station WUVT is currently playing
- .yi — Shows whether it is currently yi or not
- begiak: tell nick something — Send a message to nick
- 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.
- begiak: "parlez-vous français"? — Translate a phrase (google translate)
- begiak: reload module — reload a module (admin only!)
??
These functions/plugins either don't seem to work or need some figuring out:
- .tfw
rule34disabled- lastfm
- mylife (.fml .mlia)
- oblique
Wishlist
- awikstats:
- count .rlx sizes
- count number of transfer rules
add a Category:Datastats so there's an easy way to get to all the stats- ignore post-* (used to work?)
- use each file's rev for pairs with their own monodices, e.g. Apertium-en-es/stats
- tell/ask
- alises for nicks, so that spectre/spectie/spectei can get tell messages regardless of which nick they were sent to
- delete things from tell/ask queue
- make
tell
split overly long messages into multiple ones for display as to not exceed the max IRC message length
- URL interceptor
- blacklist patterns for the URL interceptor so it doesn't report titles for e.g. ^http(s?)://svn.code.sf.net/
- have the url interceptor check whether a url is a link to a known mediawiki site (wikipedia, wiktionary, apertium wiki) and redirect to the appropriate module
- redirect apertium wiki and wikipedia urls to the appropriate plugin
- some issues with unicode still need solving:
- mediawiki plugins
- have awik plugin search the apertium wiki and return top hit if a page isn't found (like wikipedia plugin)
- have wikipedia plugin support subsections like awik plugin
- have a function that tells someone else the results of .awik or .wik, e.g. for mentors to point students to resources
- have better logic for text that's displayed for a page/section (need examples where it fails!)
- where there's immediately a subsection?
- where the first thing is a table or infobox?
- where the first . doesn't end the sentence?
- generalise mediawiki plugin?
- find out why the "posted" command isn't working as expected
- document any command that does not have information ☭
- Pollers (svn, git, etc.)
- show short links to new apertium-stuff posts (poll like with commits?)
- allow channel-specific filtering of commit (etc.?) poller reporting
- 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)
- make it work
- make it give a url to online commit viewer (maybe url template provided as a config option?), e.g. https://sourceforge.net/p/apertium/svn/57171/
fix.bot-slap
to only be triggered when begiak is mentioned- user tracking
- greet new users (never seen) with a hello message telling them to idle (able to enable/disable)
- fix
.seen
forgetting everything after a restart
- timezones
- have better timezone support
- find some way to get standard abbreviations, e.g. scraping it from somewhere?
- better mapping of city names to timezones
- timezone translation plugin (e.g., .tz 335EST in CET)
- have better timezone support
- queues
- .queue display seems to be broken
- allow displaying (/listing?) queues for other users too
- figure out how to deal with queues longer than irc message length
- return a better error message when a queue doesn't exist (i.e., not "that's not a command" for ".queue hargle add bargle")
- .pester - pesters pesteree once per day (or other period of time) until pesterer says problem is solved; i.e., pesteree can postpone or dismiss
fix support for branches of a svn repo. Example being the vislcg3 repository which is merely a branch of an otherwise closed source repository. Begiak currently only reports on a revision if the previous revision was also for that branch. E.g., Begiak reported about revision 9647 and 9646, but not 9645 because 9644 did not modify anything in the vislcg3 branch. This is a consistently seen pattern.fix begiak.help
to display stuff about Apertiumis the githook server automatically loading yet?wiktionary in other languages if there's some way to do it that makes sense (.ety and .w)find an easier way (or clean up the current method) to poll for SVN updatesfind out why the "fml" command isn't working as expectedsvn/git: logic of multiple files (display up to 3 filenames; if more than 3 files, display 2 filenames and the message "and X other files" (it should always be plural))svn/git: when updates are received (either by polling or a hook), don't display the time of the update. Maybe have a default dispalyTime=True (or False) in the display function, and adjust the appropriate functions to send the non-default.svn: when multiple updates occur since last poll, display both.botslap
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.