6

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. – svick May 22 '13 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. – PHPst May 22 '13 at 15:23
  • 1
    In that case, the best you can do is to get the page view statistics. – svick May 22 '13 at 17:00
8

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 mwdumper to 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.xml but I regenerate a XML file instead of sql. Is there any thing wrong with the command? – PHPst May 24 '13 at 2:39
  • @PHPst Sorry, I never used it myself, so I can't help you with that. – svick May 24 '13 at 2:42
2

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. – PHPst May 22 '13 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? – Vince May 22 '13 at 8:32
  • The revision data in SQL is not “private”, it simply doesn't exist. – svick May 22 '13 at 11:28
  • @svick Are you sure? I can read the description of XML dumps: "All pages with complete edit history" – Vince May 22 '13 at 11:31
  • @Vince Sorry, that was a typo, I meant SQL, fixed now. – svick May 22 '13 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.