User:Pseudomonas/AWBPerlWrapperPlugin

As far as I can tell, this is now obsoleted by the External Processing settings in AWB - these should be used instead.

Note: This plugin would require modification to work with AWB Version 4.0+ because of changes to the IAWBPlugin interface.

This is a plugin for AWB designed to allow all the processing to be done in the wonderfully friendly and terse language of perl. It's not actually perl-specific, though - it'll run any external program, write the page to its standard input, and read in anything emitted by the standard output or standard error. It ought to be easy enough to produce an equivalent template in any other language.

The first line of the standard output is the status - if it's "CHANGE" the page will be edited, otherwise it'll be skipped. The second line is the edit summary. All the rest is the page contents.

The script must exit with an exit code of 0 otherwise it is deemed to have failed and its standard error will be displayed in a message box.

An alteration in the perl does not require AWB to be restarted.

The C bit:

The perl script: