Perlwikipedia::Plugin::ImageTester - a plugin for Perlwikipedia which contains image copyright checking and analysis for the english wikipedia
use Perlwikipedia;
my $editor = Perlwikipedia->new('Account'); $editor->login('Account', 'password'); $editor->checkimage('File:Test.jpg');
Perlwikipedia is a framework that can be used to write Wikipedia bots. Perlwikipedia::Plugin::ImageTester can be used to check and tag images for common copyright issues. It should not be assumed to be perfect, caveat emptor.
Dan Collins (ST47) and others
Calling import from any module will, quite simply, transfer these subroutines into that module's namespace. This is possible from any module which is compatible with Perlwikipedia.pm.
This sub performs the actual analysis. All paramaters after $image are optional. Returns: -1 if the image is free 0 if the image is non-free but appears to be OK 1 if the bot is not able to locate any licensing or a rationale 2 if the bot can confirm that the image is non-free but does not have a rationale 3 if the bot cannot locate any source. This is experimental. 5 if the image appears to lack a link to the article it is used it, failing nfcc#10c 6 if the image does appear to have a rationale, but lacks a license tag
The bot may also return a decimal value. If you do not want to handle these separately, then calling int() on the return value will work. For example, 5.1 indicates an album cover that fails nfcc#10c. If you do not want to handle such things separately, then int() will return 5, which is a generic image that fails nfcc#10c.
Tags $image for deletion, warns $user. $imagetext is optional but recommended to save you a page load. Not passing $user will result in the user not being warned. $more is a string which will be pasted on the end of the warning, if one is sent.
Tags $image for shrinking. $imagetext is optional but recommended to save you a page load.
Tags $image as a duplicate of $oldimage, unless it is already tagged.
Don't use this. This shouldn't even be in this module.
A simple unified opt out list. Pass a user, returns 1 if they're on the list, returns 0 otherwise. Not really useful since noone actually knows it exists.
Gets a list of pages $image is used on in the mainspace and leaves a generic message on each talk page. Include $operator for the username to be displayed in the message.
Attempts to add a link to the article that $image is used on. If it fails, tags $image for deletion, warns $user. $imagetext is optional but recommended to save you a page load. Not passing $user will result in the user not being warned. $more is a string which will be pasted on the end of the warning, if one is sent. If an autoresolution is attempted, returns the autores code (true so you can retest the image). Otherwise, calls the traditional tagging routine and returns 0.
1 POD Error
The following errors were encountered while parsing the POD:
=over without closing =back
To install Perlwikipedia::Plugin::ImageTester, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perlwikipedia::Plugin::ImageTester
CPAN shell
perl -MCPAN -e shell install Perlwikipedia::Plugin::ImageTester
For more information on module installation, please visit the detailed CPAN module installation guide.