[Mediawiki-l] Include HTML page

Matt Hucke hucke at cynico.net
Sun Oct 1 13:28:53 UTC 2006

You can modify a Wiki article programmaticly with Perl and 
CMS::MediaWiki.  The latest release of this module includes a getPage() 
function (which I contributed), and it has always had editPage().

my $lines = $wiki->getPage(title => '/foo');
foreach my $line (@$lines)
    ...edit stuff here...
$wiki->editPage (title => '/foo', text => join("\n", @$lines) );

On www.novaroma.org I use it to do a random daily image on the main 
page.  The data file (a table of image locations and captions) is a wiki 
page that any of our editors can modify as usual.  It is fetched and 
parsed, with a random record selected, and from this the template that 
provides random images for the main page is parsed.  Script is available 
on request.

>Isn't it better idea to create an article (statical wiki page) with the table
>you need, find the apropriate record in the mysql database and modify this
>record from bash script?
>>-----Original Message-----
>>From: mediawiki-l-bounces at Wikimedia.org
>>[mailto:mediawiki-l-bounces at Wikimedia.org]On Behalf Of Eagleone
>>Sent: Friday, September 29, 2006 1:36 AM
>>To: mediawiki-l at wikimedia.org
>>Subject: [Mediawiki-l] Include HTML page
>>Is there anyway to include (dinamically) an HTML page inside 
>>a MediaWiki page?
>>What I'd like to do is update a table with a cron bash script. I don't
>>have an idea of how edit from a bash script a wiki page, but I can
>>edit an html file on my web server and make mediawiki include it.
>>Is it there any other way of doing it?

hucke at cynico.net - http://www.graveyards.com

"A cactolith is a quasihorizontal chonolith composed of anastomosing
ductoliths whose distal ends curl like a harpolith, thin like a 
sphenolith, or bulge discordantly like an akmolith or ethmolith."
    (from _Geology and Geography of the Henry Mountains Region, Utah_)

More information about the MediaWiki-l mailing list