#!/usr/bin/env ruby require 'mediawiki' page = Mediawiki::Page.new("mypage"," this is an example of a mediawiki page complete with [[wikilinks]] and the like. [[Category:foo]] [[Category:bar]] the last line.".split("\n")) puts "parsed page:" puts page.str.join("\n") puts "categories:" puts page.categories.join(",") puts "page.to_s:" puts page.to_s