Downloads and imports Wikipedia page histories to a git repository
Go to file
Jakub Wilk bd45e692c4 Decode article name with locale encoding
Fixes:

    $ wp2git --lang en József_Kürschák
    Connected to https://en.wikipedia.org/w/
    Traceback (most recent call last):
      File ".../bin/wp2git", line 11, in <module>
        load_entry_point('wp2git==1.0.1.dev6+gac1bf31', 'console_scripts', 'wp2git')()
      File ".../lib/python2.7/site-packages/wp2git/wp2git.py", line 69, in main
        page = site.pages[args.article_name]
      File ".../lib/python2.7/site-packages/mwclient/listing.py", line 234, in __getitem__
        return self.get(name, None)
      File ".../lib/python2.7/site-packages/mwclient/listing.py", line 255, in get
        namespace = self.guess_namespace(name)
      File ".../lib/python2.7/site-packages/mwclient/listing.py", line 282, in guess_namespace
        if name.startswith(u'%s:' % self.site.namespaces[ns].replace(' ', '_')):
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
2019-06-04 09:39:40 +02:00
wp2git Decode article name with locale encoding 2019-06-04 09:39:40 +02:00
.gitignore make into a proper distutils package, with wp2git as CLI entry point, and call it version 1.0 2016-08-05 18:31:30 -07:00
AUTHORS replace D version with Python version, based on mwclient 2014-10-14 00:44:56 -07:00
LICENSE replace D version with Python version, based on mwclient 2014-10-14 00:44:56 -07:00
README.md fix dumb mistake due to reuse of 'path' 2016-08-05 18:44:45 -07:00
setup.py fix capitalization of "PyPI" 2017-01-29 15:12:50 +01:00
version.py make into a proper distutils package, with wp2git as CLI entry point, and call it version 1.0 2016-08-05 18:31:30 -07:00

README.md

wp2git

This program allows you to download and convert any Wikipedia article's history to a git repository, for easy browsing and blaming.

Quick installation

pip install https://github.com/dlenski/wp2git/archive/v1.0.1.zip

Usage

$ wp2git [--bare] article_name

wp2git will create a directory, in which a new git repository will be created. The repository will contain a single file named article_name.mw, along with its entire edit history.

Run wp2git --help for more options.

Requirements

git should be accessible from PATH. The mwclient package is required.

Entirely based on

CyberShadow's version written in the D language.