The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Perlwikipedia::Plugin::ImageTester - a plugin for Perlwikipedia which contains image copyright checking and analysis for the english wikipedia

SYNOPSIS

use Perlwikipedia;

my $editor = Perlwikipedia->new('Account'); $editor->login('Account', 'password'); $editor->checkimage('File:Test.jpg');

DESCRIPTION

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.

AUTHOR

Dan Collins (ST47) and others

METHODS

import()

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.

checkimage($image[, $user[, $tag[, $imagetext[, $imagetextnotemp[, @links]]]]])

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.

notag($image[, $user[, $imagetext[, $more]]])

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.

norat($image[, $user[, $imagetext[, $more]]])

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.

nfcc10c($image[, $user[, $imagetext[, $more]]])

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.

nosrc($image[, $user[, $imagetext[, $more]]])

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.

toobig($image[, $imagetext])

Tags $image for shrinking. $imagetext is optional but recommended to save you a page load.

duplicate($image, $oldimage)

Tags $image as a duplicate of $oldimage, unless it is already tagged.

badusercheck()

Don't use this. This shouldn't even be in this module.

optout($user)

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.

ratnotag($image[, $user[, $imagetext[, $more]]])

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.

send_notify($image[, $operator])

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.

nfcc10calbum($image[, $user[, $imagetext[, $more]]])

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.

nfcc10ctryauto($image[, $user[, $imagetext[, $more]]])

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:

Around line 35:

=over without closing =back