Hi,
do you know the pywikipedia project on SF? Maybe you should have a look at it to avoid reinventing the wheel...
Ciao, Michael.
Yes, I know it, but I've developed the bot before I had heard about it. However I do not intend a further development :-).
how do i use this project?!?
Here a very simple php script:
<?php require 'bgbot.php';
$wiki = 'XX'; $user = 'USERNAME'; $pass = 'xxxxxxxx'; $sleep_time = 60; // sleep 60 secs between edits $bot = new Bgbot($wiki, $user, $pass);
$pages = array('page_1', 'page_2', 'page_3');
foreach ($pages as $page) { if ( $bot->edit($page, $wiki, false) ) { $content = $bot->page_content; // do something to $content $summary = 'my summary for this edit'; $bot->submit($content, $summary, $wiki); sleep($sleep_time); } } ?>
Log in to post a comment.
Hi,
do you know the pywikipedia project on SF? Maybe you should have a look at it to avoid reinventing the wheel...
Ciao, Michael.
Yes, I know it, but I've developed the bot before I had heard about it. However I do not intend a further development :-).
how do i use this project?!?
Here a very simple php script:
<?php
require 'bgbot.php';
$wiki = 'XX';
$user = 'USERNAME';
$pass = 'xxxxxxxx';
$sleep_time = 60; // sleep 60 secs between edits
$bot = new Bgbot($wiki, $user, $pass);
$pages = array('page_1', 'page_2', 'page_3');
foreach ($pages as $page) {
if ( $bot->edit($page, $wiki, false) ) {
$content = $bot->page_content;
// do something to $content
$summary = 'my summary for this edit';
$bot->submit($content, $summary, $wiki);
sleep($sleep_time);
}
}
?>