GHSWiki

Gothenburg Hackerspace Wiki

User Tools

Site Tools


projects:members:raccoon:gliderbot

Gliderbot

This page is about gliderbot, a robot in the GHS IRC channel.

It uses the ibid bot framework and is built in Python.

Source code and documentation: http://ibid.omnia.za.net/

If you want access to administer it, ask raccoon. Feel free to suggest plugins and additional configuration as well.

Features

  • Offline message relaying: tell <user> <message>
  • Reminding about stuff:
    • Specific time: remind me on <HH:MM> to <thing to remember>
    • Interval: remind me in <N> <hours|minutes|seconds> to <thing to remember>
    • Date: remind me on <month/day> to <thing to remember> (supply both month and day)
  • Factoid/knowledge base
    • Saving new topics: <topic> is <answer>
    • Getting an answer: <topic>?
    • Remove entry: forget <topic>
  • URL title fetching (1 hour cache)
  • Public transport/commuting info (most data is from from vasttrafik.se)
  • News updates:

Keymasters

To find out who have keys to the hackerspace, ask gliderbot on IRC:

<user> gliderbot: keys
<gliderbot> user: keys should be with Bob or Alice

Gliderbot will reply with the users that it were last told to have keys.

To update who has the keys right now, tell gliderbot on IRC:

<user> gliderbot: forget keys
<gliderbot> user: roger that
<user> gliderbot: keys are with Charlie
<gliderbot> user: okay

Public transport searching

Query and plan your Västtrafik (local gothenburg public) travel information through simple commands.

Most commuting data is cached at five minutes maximum, usually less.

Route planning

Get a travel itinerary from origin to destination, as soon as possible (~ten minutes).

   query: get me from <origin> to <destination>
response: <line #>: <departure> <origin (<direction>) > [<stop> <departure> > ... ] <destination> <arrival> [<minutes spent>[/<stops>]]

EXAMPLE

  <raccoon> get me from brunnsparken to oskar fredriks kyrka
<gliderbot> Buss 60: 06:16 Brunnsparken (Masthugget) > Oscar Fredriks Kyrka 06:25 [9m]

  <raccoon> get me from prinsgatan to lana 
<gliderbot> Spårvagn 6: 06:50 Prinsgatan (Länsmansgården) > 07:06 Domkyrkan (Spårvagn 2 to Mölndal) > Lana 07:19 [29m/1ch]

Timetable lookup

Get the timetable/departure board listing of a given stop, optionally for specific mode of transport and line number. If the result list is too long, you will be told to be more specific.

   query: next [ tram|bus [ #line ] ] from <location> [ to <direction> ]
response: <origin>: <line #> [ <features> ] (<direction>) <departure> (<track>)
  
EXAMPLE

  <raccoon> next from brunnsparken
<gliderbot> too many results. which line? [tram] 1, 3, 5, 9, 11 [bus] 16, 19, 52, 96

FILTERING BY LINE

Location strings are matched from the beginning.

  <raccoon> next tram #6 from brunnsparken
<gliderbot> Brunnsparken: Tram 6 ♿     (Kortedala via Sahlgrenska)  06:26 (E)
<gliderbot> Brunnsparken: Tram 6 ♿     (Länsmansgården)             06:28 (D)

  <raccoon> next bus #60 from oskar fredriks kyrka
<gliderbot> Oscar Fredriks Kyrka: Bus 60 ♿     (Masthugget)       06:25 (B)
<gliderbot> Oscar Fredriks Kyrka: Bus 60 ♿     (Redbergsplatsen)  06:41 (A)

  <raccoon> next bus #16 from marklandsgatan
<gliderbot> Marklandsgatan: Bus 16 ♿     (Högsbohöjd)   06:19 (E)
<gliderbot> Marklandsgatan: Bus 16 ♿     (Eketrägatan)  06:33 (G)

FILTERING BY DIRECTION

Direction string is matched from the beginning.

  <raccoon> next bus #16 from marklandsgatan to eke
<gliderbot> Marklandsgatan: Bus 16 ♿  (Eketrägatan) 06:33 (G)

Line changes and incident reports

See planned route changes and reported incidents for specified areas.

Location will default to göteborg if not specified.

NOTE: Currently not purging old records properly, which can cause bugs in results for busy areas.

   query: tram status [<location>]
response: <when>: <type of change or incident description>

EXAMPLE

<user> gliderbot: tram status
<gliderbot> user: no location specified. showing for göteborg
<gliderbot> user: got 25 result(s), showing next 3:
<gliderbot> user: 2014-01-31 03:59:00 - Linje 58, bussarna kör med kortare busstyp.
<gliderbot> user: 2014-01-31 04:00:00 - Linje 4, 8 och 9, ingen spårvagnstrafik   Gamlestadstorget - Angered centrum och omvänt.
<gliderbot> user: 2014-01-31 04:00:00 - Linje 4, 8 och 9, Gamlestadstorget i riktning Centralstationen samt Redbergsplatsen avgår från hållplatsläge A.

<user> gliderbot: tram status mölndal
<gliderbot> user: 2014-01-31 23:59:00 - TM14-010 Spårarbete vid Krokslättsparkgata påverkar linje 758 och 761 mellan den 29 och 31 januari
<gliderbot> user: 2014-06-25 04:00:00 - Hållplats Enerbacksgatan läge A och Lövgatan läge A dras in permanent från 25 november

Guard warnings

To check if Västtrafik has issued any warnings about organized ticket razzias:

   query: tram goons
response: <when and what kind of action>

EXAMPLE

<user> gliderbot: tram goons
<gliderbot> user: Under vecka 5 har vi skärpta stickprovskontroller i området runt Eketrägatan, Göteborg.
<gliderbot> user: Under torsdag förmiddag gör vi även en hållplatskontroll på Hisingen.

All features should be available in both public and private chats.

TODO

Feature requests

  • You want a feature? Put it here.

Bug reports

  • Fix the XMPP bridge
  • Change date parsing to <day/month> instead of <month/day>
  • Make tram guard updates ignore the extra info — just include actual locations
  • Translate swedish information from Västtrafik before displaying
You could leave a comment if you were logged in.
projects/members/raccoon/gliderbot.txt · Last modified: 2014/10/03 17:29 by raccoon