Extension:XMLRC/rc2udp.py

rc2udp.py is a service that polls the web API of some MediaWiki-instance periodically, and emity UDP packets for each recent changes item received from the wiki. This emulates XMLRC bling installed on that wiki. This way, a setup of the udp2xmpp.py brige, and XMPP server and some client can be tested without having XMLRC actually installed on the wiki.

Installation
directory of the XMLRC extension. You can place this directory anywhere on your system.

Configuration
The configuration for rc2udp.py is located in the file  in the same directory as rc2udp.py, which uses the INI file syntax. It contains a single section with the following configuration options:


 * [rc2udp] contains the configuration for rc2udp.py
 * port: the port to send UDP packet to. Default is 4455. May be overwritten on the command line
 * poll-interval: the interval for polling the API, in seconds. Default is 10
 * rclimit: the maximum number of RC items to fetch at once. The default is 500, which is also the maximum number generally allowed by MediaWiki.
 * rcprops: the properties to include in the RC records, as a pipe-separated string, exactly as they would be given for the  parameter when accling the API. default is.

Running rc2udp.py
Once everything is configured, you can start rc2udp.py simply by typing:

python rc2udp.py 

The  is the IP address the UDP packets should be send to. Optionally, the port can also be specified, as the second parameter on the command line. If the port is not specified, the  option from rc2udp.ini will be used. If that is also not defined, the default port 4455 is used.

Since this is a long running process, it's advisable to run rc2udp.py into a screen session on a server.

rc2udp.py supports the following command line options:


 * --help: print a help message an exit.
 * --config: configuration file to use. If not given, rc2udp.ini will be looked for the the directory where rc2udp.py is located.
 * --debug: sets verbosity to debug level
 * --quiet: sets verbosity to quiet, only output warnings and errors.