2016-08-05 20:27:10 -05:00
wp2git
======
2020-12-21 17:27:24 -06:00
This program allows you to download and convert any Wikipedia article's history to a `git` repository, for easy browsing, [annotation ](https://git-scm.com/docs/git-annotate ),
and [bisecting ](https://git-scm.com/docs/git-annotate ) (etc.) of older revisions.
### Requirements
Requires Python 3.x and `git` accessible in your `PATH` , and the [`mwclient` package ](https://github.com/mwclient/mwclient )
(which will be auto-installed by `pip` ).
2016-08-05 20:27:10 -05:00
### Quick installation
2020-12-21 17:27:24 -06:00
For the latest release, install with:
2016-08-05 20:27:10 -05:00
```
2020-12-21 17:27:24 -06:00
pip3 install https://github.com/dlenski/wp2git/archive/v2.0.zip
2016-08-05 20:27:10 -05:00
```
2020-12-21 17:27:24 -06:00
For the latest development build, install with
2016-08-05 20:27:10 -05:00
2020-12-21 17:27:24 -06:00
```
pip3 install https://github.com/dlenski/wp2git/archive/master.zip
```
2016-08-05 20:27:10 -05:00
2020-12-21 17:27:24 -06:00
### Usage
2016-08-05 20:27:10 -05:00
2020-12-21 17:27:24 -06:00
```
$ wp2git [--lang XY] article_name
```
2016-08-05 20:27:10 -05:00
2020-12-21 17:27:24 -06:00
`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 the entire edit history
of that article on `XY.wikipedia.org` . (If unspecified, the default language is guessed according to
your locale.)
2016-08-05 20:27:10 -05:00
2020-12-21 17:27:24 -06:00
Use `wp2git --help` to show more options.
2016-08-05 20:27:10 -05:00
### Entirely based on
2016-08-05 20:44:03 -05:00
[CyberShadow's version ](https://github.com/CyberShadow/wp2git ) written in the D language.