User:Dam-io/wiki2git
Appearance
![]() | This is not a Wikipedia article: It is an individual user's work-in-progress page, and may be incomplete and/or unreliable. |
Converts a Wikipedia article revision history into a git repository
With a web interface
You can use the experimental service at http://wiki2git.dam.io
- Enter you Article URL into the input field, ex:
https://en.wikipedia.org/wiki/The_Little_Prince
- Press "Convert to git"
- You now see the script executing but to see the script progress, you must refresh the page (Ctrl-R in most browsers)
- the script should take less than 10 seconds for an article with less than 1000 revisions
- You get the link to a
.tar.gz
archive of the repository - Extract the repository on your computer, go to the folder named like "XXXX-XXXX-XXXX-XXXX"
- You should be able to do
git log
and see all the revisions
As a local script
Installation
> git clone https://framagit.org/mdamien/wiki2git.git
> cd wiki2git
> virtualenv -p python3 env
> . ./env/bin/activate
> pip install -r requirements.txt
Usage
> ./wiki2git https://en.wikipedia.org/wiki/The_Little_Prince prince # output is in prince folder