Hi all,
I need some hints about how to go about to create a dump filter and a plugin for dumpBackup.php.
Since I'm a Delphi programmer I'll probably do well the programming of the inner details, if I only knew how the stub for a filter (& a plugin) should look.
I need to do quite extensive examination of the text content of articles before knowing what to keep and what to skip. Sometimes I'd like to even modify the text before dumping it. Hints about how to design a plugin would also be apprechiated.
Options according to the dumpBackup.php file: --plugin=<class>[:<file>] --filter=<type>[:<options>]
If anyone has done a filter or plugin before, or have a link to an example, I'd be very happy to take advice. :)
// Rolf Lampa
On Fri, Jun 19, 2009 at 2:05 PM, Rolf Lampa rolf.lampa@rilnet.com wrote:
I need some hints about how to go about to create a dump filter and a plugin for dumpBackup.php.
If anyone has done a filter or plugin before, or have a link to an example, I'd be very happy to take advice. :)
Here's a supposedly working example:
php dumpBackup.php \ --plugin=AbstractFilter:extensions/ActiveAbstract/AbstractFilter.php \ --current \ --output=gzip:/dumps/abstract.xml.gz \ --filter=namespace:NS_MAIN \ --filter=noredirect \ --filter=abstract
Would be interested to see your working plugin code once it's ready, there doesn't seem to be much documentation on this. Perhaps you could post to mediawiki.org.
Joshua
Joshua C. Lerner skrev:
On Fri, Jun 19, 2009 at 2:05 PM, Rolf Lampa rolf.lampa@rilnet.com wrote:
I need some hints about how to go about to create a dump filter and a plugin for dumpBackup.php.
If anyone has done a filter or plugin before, or have a link to an example, I'd be very happy to take advice. :)
Here's a supposedly working example:
php dumpBackup.php \ --plugin=AbstractFilter:extensions/ActiveAbstract/AbstractFilter.php \ --current \ --output=gzip:/dumps/abstract.xml.gz \ --filter=namespace:NS_MAIN \ --filter=noredirect \ --filter=abstract
Would be interested to see your working plugin code once it's ready, there doesn't seem to be much documentation on this. Perhaps you could post to mediawiki.org.
Ah, that was very helpful, now I have something to start from, thank you very much!
// Rolf Lampa
Rolf Lampa wrote:
Hi all,
I need some hints about how to go about to create a dump filter and a plugin for dumpBackup.php.
Since I'm a Delphi programmer I'll probably do well the programming of the inner details, if I only knew how the stub for a filter (& a plugin) should look.
I need to do quite extensive examination of the text content of articles before knowing what to keep and what to skip. Sometimes I'd like to even modify the text before dumping it. Hints about how to design a plugin would also be apprechiated.
Options according to the dumpBackup.php file: --plugin=<class>[:<file>] --filter=<type>[:<options>]
If anyone has done a filter or plugin before, or have a link to an example, I'd be very happy to take advice. :)
// Rolf Lampa
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Take a look at the ActiveAbstract plugin to see a basic example at work.
http://www.mediawiki.org/wiki/Extension:ActiveAbstract
Were currently using it to filter the Yahoo! Abstracts feed and it should let you know about what's needed.
I have a lot of notes on the backup system that still need to be put online and I'll make sure to note some tidbits about general plugin architecture as well.
--tomasz
Tomasz Finc wrote:
Rolf Lampa wrote:
Options according to the dumpBackup.php file: --plugin=<class>[:<file>] --filter=<type>[:<options>]
If anyone has done a filter or plugin before, or have a link to an example, I'd be very happy to take advice. :)
// Rolf Lampa
Take a look at the ActiveAbstract plugin to see a basic example at work.
http://www.mediawiki.org/wiki/Extension:ActiveAbstract
Were currently using it to filter the Yahoo! Abstracts feed and it should let you know about what's needed.
Perfect, exactly what I needed, thank you very much!
I have a lot of notes on the backup system that still need to be put online and I'll make sure to note some tidbits about general plugin architecture as well.
Very nice, that will be very much appreciated!
// Rolf Lampa
wikitech-l@lists.wikimedia.org