!!! Mediawiki has been upgraded !!!
Slack integration has been disabled for now due to an incompatibility.
If you want to testdrive the new skin (Tweeki), make sure your language settings are set to 'en - English' in your preferences!

WikiEventBot

From Brixel - Hackerspace Hasselt
Jump to: navigation, search


Project: MediaWiki Event Bot
350x350px
Description: Mediawiki bot to automatically create Wiki events with Meetup as source.
Status: In progress
Participants: Johan
Expertise: PHP, Mediawiki, Meetup
Edit tags: WikiEventBot


Introduction

Brixel would like to display all its events on the wiki page to have these independently published and to be able to make use of the semantic data available.
Although templates for events are available on the wiki, this is unfortunately a lot of work for the weekly meetups and regular events.

In the past it has been decided Meetup.com will be the main source of Brixel events and all other calendars need to sync from Meetup.

This project aims to create a small PHP Mediawiki bot to retrieve events from the Meetup API and to publish them on the wiki through the MediaWiki API.

Manually updating/changing events

The following fields available in events will never be overridden after initially set by the WikiEventBot:

  • Logo
  • What
  • Organiser
  • Cost

So feel free to change them directly on the wiki if necessary.

If these fields are present in an existing event, they will not be updated (overridden) automatically. The consequence is also that if an event was already published earlier in Meetup and processed by the WikiEventBot, changing any of these fields in Meetup will not automatically change these anymore in MediaWiki.

Operation

  1. Events are received from Meetup with all of their attributes.
  2. For each event that has the property "public", the following is done:
    1. Based on the eventname and starttime a deterministic wiki pagename is generated.
    2. If the page exists already, a check is done if the Meetup event was modified and if so the MediaWiki page is updated as well.
      1. During such an update, some MediaWiki fields will stay the same as they can be locally overridden.
    3. If the page doesn't exist, the mediawiki page is created with some default values from the configuration file.

Config file

The config file is a PHP file and looks like this:

####################################################################################
#Config Area General
date_default_timezone_set('Europe/Brussels');

#Config Area Wiki:
$conf['WikiEventDefaultCost']           = "€ 0";
$conf['WikiEventDefaultWhat']           = "See page contents for more information.";
$conf['WikiEventDefaultLogo']           = "Open.jpg";
$conf['WikiEventDefaultOrganiser']      = "Brixel";
$conf['WikiEventDefaultVenueName']      = "Brixel HQ";


#Config Area Meetup:
$MeetupAPIKey   = "ThisShouldBeAnAPIKey";
$MeetupGroup    = "TheMeetupGroup";

# Config Area Wiki:
$conf['WikiBotUser']            = "WikiEventBot";
$conf['WikiBotPass']            = "AVerySecurePassword";
$conf['WikiBotURL']             = "http://wiki.brixel.be/api.php";
$conf['WikiEventBotUserAgent']  = "User-Agent: WikiEventBot (http://wiki.brixel.be/w/WikiEventBot)";
####################################################################################

Bugs?

Yes, many.