I need to access to history of each wiki page. I found http://dumps.wikimedia.org/fawiki/latest/fawiki-latest-pages-meta-history.xml.7z contains such data for Persian wiki in XML format. But I want prossess the data using MySQL. Is that file available in sql format too? Where can I find it?
Could you clarify what do you mean by “visited a page during two consecutive edits”? As far as I know, Mediawiki doesn't store which pages a user visited.– svickMay 22, 2013 at 11:26
@svick I mean visit log. I want to know how many visitor have visited one article in a specific time. Or know visitor name + time of visit for an article.– Handsome NerdMay 22, 2013 at 15:23
1In that case, the best you can do is to get the page view statistics.– svickMay 22, 2013 at 17:00
No, there are no SQL versions of the XML dump files.
The page Data dumps/Tools for importing on meta.wikimedia.org describes how to work around that: You can either use
ImportDump.php to import the XML file directly (apparently suitable only for small wikis), or you can use a tool like mwdumper to convert the XML into SQL and then import that.
Thanks a lot. I tried to use
mwdumperto convert xml file to sql. I executed
java -jar mwdumper-1.16.jar --format=sql:1.5 --output=file:xx.sql mzn\mznwiki-20130507-pages-meta-history.xmlbut I regenerate a XML file instead of sql. Is there any thing wrong with the command? May 24, 2013 at 2:39
@PHPst Sorry, I never used it myself, so I can't help you with that. May 24, 2013 at 2:42
There is already an answer to this question, by @RSFalcon7.
You will find the whole explanation on this Wikipedia page about dumps available in XML or SQL format.
The data about revisions in SQL seems private though (no link provided for direct download), but I couldn't figure what this implies.
It does not seem available in Persian unfortunately either.
Another possibility is to parse your XML and add it to your database. You can then define your own Database schema. Python language can probably help you do that.
Thanks, Please consider converting your note to a comment. May 22, 2013 at 8:30
mmh it's an answer. I quoted the answer I used to build it and detailed it (in the answer I quote, only the link is given but I think it is not enough to help you). Did you find what you wanted?– VinceMay 22, 2013 at 8:32
The revision data in SQL is not “private”, it simply doesn't exist. May 22, 2013 at 11:28
@svick Are you sure? I can read the description of XML dumps: "All pages with complete edit history"– VinceMay 22, 2013 at 11:31
@Vince Sorry, that was a typo, I meant SQL, fixed now. May 22, 2013 at 11:31