Bots

From WikiEducator
Jump to: navigation, search
Road Works.svg Work in progress, expect frequent changes. Help and feedback is welcome. See discussion page. Road Works.svg

WikiEducator can be customised to deliver a range of reports using "bots" or "scripts".

Here are links to information about creating bots.

Examples

These examples use the mwclient library.

script description sample output
category.py Scan all pages in a category (or all pages starting with a given prefix) and build a table showing edits in the last day, 2 days, 90 days, and total edits as well as page creation date and last edit date. It also displays total views for each page.
Usage: ./category.py [options] what
options:
--user MyBot WikiEducator user name
--password MyBotPass associated password
--output PageName page on WikiEducator for output, output is placed between special comments on the page
<!-- stats_start -->
{stats put here}
<!-- stats_end -->
--verbose show output during processing
Note: Rather than specifying user and password on the command line, you can create a .wikieducator.rc file in your home directory containing:
[login]
user=MyBot
password=MyBotPassword
what: either Category:CategoryName or PagePrefix
example: ./category.py --verbose --output User:JimTittsler/Sandbox/CommunityMediaStats Community_Media
Community Media Stats

Otago Polytechnic Stats
masters.py Look at all user pages for each of the WikiEducator Masters Certifications to find when each person was certified and by whom. WikiEducator Certifications