Bus Stop Knowledgebase System/Page Import

=Data Transfer Extension= This is a mock-up of using Data Transfer extension to create pages & properties in bulk. This extension is made available through the [www.mediawiki.org/wiki/Semantic_Bundle Semantic Bundle extension package]. This extension allows for page creation through CSV or XML import. This is the method of choice for an initial mass import of acquired & existing data into a wiki.

Like the the other approach, pre-processing will most likely have to be done to the CSV data. Templates (& template properties) are handled by the field name in CSV files. For example, the value/cell in the field/column name "Bus stop[Position]" would be associated with the Position parameter in the Bus stop template. Also, n-ary properties will most likely have to be handled by External Data extension.

The advantage of this approach over the other approach is that it is available under the GPL license and is thus free to use. However, changes are not immediate and may take a while for larger sets of data. Changes to MediaWiki settings can be adjusted to accommodate a higher load.

The data import is run as a job after each web page request. The number of jobs can be set by defining $wgJobRunRate in LocalSettings.php. If there is a very large number of pages that require import, set $wgJobRunRate to 0 and then, with root access to the server, run the PHP file: $IP/maintenance/runJobs.php.

=MediaWiki Bulk Page Creator= NB: THIS METHOD IS NOT RECOMMENDED OVER DATA TRANSFER EXTENSION.

This is a mockup of using MediaWiki CSV Import tool to create pages & properties in bulk.

Step 3 of instructions: Next, you will need to define your page template. This is where you can add wiki markup to format your data. Each column of data can be used with the variables presented at the bottom of the page. For example: ${statename} Each row of your CSV file will become one page so you will need to make sure the Title: fields is unique for each page.

In most cases, there will need to be additional processing. Pre-processing can be done from an Excel sheet, for example; post-processing can be done through a wiki template. For example, it is necessary for bus stops in GTFS format to split the stop name in order to get the 'on street' and 'at street'.