StatMediaWiki: Difference between revisions
m (using an external editor) |
m (using an external editor) |
||
Line 43: | Line 43: | ||
host = localhost | host = localhost | ||
If you don't want to run analysis scripts on the MediaWiki server, you should add priviledges for remote MySQL Access (not tested). Our small ''Sun Fire X4150 2CPU'' MediaWiki server | ; Running on another machine ? | ||
If you don't want to run analysis scripts on the MediaWiki server, you should add priviledges for remote MySQL Access (not tested). Our small ''Sun Fire X4150 2CPU'' MediaWiki server managed fine using a typical load average of 1.2 | |||
== Usage of classic == | == Usage of classic == | ||
Line 53: | Line 55: | ||
* Data per category | * Data per category | ||
* A tags cloud | * A tags cloud | ||
All pages will be analysed (i.e. wiki pages, talk pages, user pages, user talk pages and so forth). I don't know if this is configurable. | |||
Depending on the size of your wiki you will have to wait a few minutes (very small wiki), hours (small/medium wiki) or days. | Depending on the size of your wiki you will have to wait a few minutes (very small wiki), hours (small/medium wiki) or days. |
Revision as of 19:32, 26 January 2012
<pageby nominor="false" comments="false"/>
Introduction
StatMediaWiki is a project that creates tools to collect and aggregate information available in a MediaWiki installation. StatMediaWiki is free software under the GPL v3 or higher license. There are currently two versions of this software: Classic (stable software) and Interactive (currently Beta).
Classic StatMediaWiki
Results are static HTML pages including tables and graphics that can help to analyze the wiki status and development.
Installation
(under Ubuntu/Debian)
Get the software
This will retrieve the whole archive
svn checkout https://forja.rediris.es/svn/statmediawiki
Other software needed
(for now, we assume that you already have python installed)
You may have to install some or all of the following:
apt-get install python-gnuplot apt-get install python-MySQLdb apt-get install python-NumPy apt-get install python-SciPy apt-get install python-Matplotlib
In addition (optional) you may need Graphviz
Create a database user with read-only access to the wiki database
- Add a user to the MySQL server
- E.g. user="analysis" password="xxx" with a SELECT priviledge for database "MyWiki"
- Add a .my.cnf configuration file to your home directory
[client] user = analysis password = xxx host = localhost
- Running on another machine ?
If you don't want to run analysis scripts on the MediaWiki server, you should add priviledges for remote MySQL Access (not tested). Our small Sun Fire X4150 2CPU MediaWiki server managed fine using a typical load average of 1.2
Usage of classic
Basically, you can launch a global analysis with the smw.py command line script. This will generate a website that includes the following statistics:
- Global usage
- Data per user (content evolution, activity, top pages, uploads, words cloud)
- Data per page (content evolution, activity, work distribution, top users, words cloud)
- Data per category
- A tags cloud
All pages will be analysed (i.e. wiki pages, talk pages, user pages, user talk pages and so forth). I don't know if this is configurable.
Depending on the size of your wiki you will have to wait a few minutes (very small wiki), hours (small/medium wiki) or days.
wmw.py command line parameters
- --outputdir: absolute path to the directory where the HTML report site will be generated.
- --index: name of the main (initial) file of the report (by default, index.php)
- --sitename: name of the wiki that will be shown on the title of the report
- --siteurl: URL of the wiki
- --subdir: path that has to be added to the URL to get to the wiki (by default /index.php)
- --dbname: name of the database of the wiki
- --tableprefix: prefix of the tables in the database (only required if you indicated one when installing MediaWiki)
- --anonymous: it replaces usernames by hashes (salty md5). Use this if you plan to publish results.
- --startdate: start analysis. Example: --startdate=2010-01-01
- --enddate: end of analysis
smw.py command line example
- python statmediawiki/trunk/smw.py --outputdir="/web/analysis/dewiki" --sitename=DeWiki --siteurl=http://edutechwiki.unige.ch --subdir="/dewiki/" --dbname=dewiki
You should then see something like:
/export/home/schneide/statmediawiki/trunk/smwget.py:19: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 --------------------------------------------------------------------------- Welcome to StatMediaWiki 1.1. Web: http://statmediawiki.forja.rediris.es --------------------------------------------------------------------------- Loaded 14 categories .....
And remember, the process can take quite a long time even for a small wiki.
Links
- Official
- Official home site
- Source code repository
- manual (English)
- Other
- StatMediaWiki at Meta.Wikimedia.org