Merge branch 'patch-3' of github.com:nemobis/wikiq
[wikiq] / README
1 wikiq: a simple and fast stream-based MediaWiki XML dump parser
2
3 authors: Erik Garrison <erik@hypervolu.me>
4          Benjamin Mako Hill <mako@atdot.cc>
5
6 overview:
7
8 wikiq is written in C++ using expat.  It is designed to enable
9 researchers to rapidly extract revision histories (minus text and
10 comments) from large XML datasets.
11
12 use:
13
14 To use, first make sure you have libexpat and libpcrecpp installed (e.g.
15 via packages libexpat1 and libpcre3-dev on Debian or Ubuntu), then:
16
17     % make
18     % ./wikiq -h  # prints usage
19     % 7za e -so hugewikidatadump.xml | ./wikiq >hugewikidatadump.tsv
20
21
22 features:
23
24 In addition to parsing WikiMedia XML data dumps into a tab-separated
25 tabular format, wikiq can match Perl-compatible regular expressions
26 against revision content, can extract article diffs, and can match
27 regexes against the additions and deletions between revisions.  Any
28 number of regular expressions may be supplied on the command line, and
29 may be tagged using the '-n' and -N options.
30
31 MD5 checksums of revisions are used at runtime.
32
33 output:
34
35 wikiq generates these fields for each revision:
36
37 title, articleid, revid, timestamp, anon, editor, editorid, minor,
38 text_length, text_md5, reversion, additions_size, deletions_size
39 .... and additional fields for each regex executed against content or
40 added/deleted diffs
41
42 Boolean fields are TRUE/FALSE except in the case of reversion, which is blank
43 unless the article is a revert to a previous revision, in which case, it
44 contains the revision ID of the revision which was reverted to.
45

Benjamin Mako Hill || Want to submit a patch?