Skip to content

Commit 39e58e4

Browse files
committed
add Pipfile
1 parent ffb39af commit 39e58e4

File tree

1 file changed

+41
-17
lines changed

1 file changed

+41
-17
lines changed

README.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ This is a very quick guide for the most used features of WikiTeam tools. For fur
2727

2828
### Requirements
2929

30-
Confirm you satisfy the requirements:
30+
If you have both [pipenv](https://github.com/pypa/pipenv) and [pyenv](https://github.com/pyenv/pyenv), you can install all the project dependencies isolated from your system with the following command:
31+
32+
`pipenv install`
33+
34+
Otherwise you can use the traditional way(using pip), first, confirm you satisfy the requirements:
3135

3236
`pip install --upgrade -r requirements.txt`
3337

@@ -41,32 +45,49 @@ To download any wiki, use one of the following options:
4145

4246
`python dumpgenerator.py http://wiki.domain.org --xml --images` (complete XML histories and images)
4347

48+
`pipenv run dump http://wiki.domain.org --xml --images` <sup>**pipenv version**</sup>
49+
4450
If the script can't find itself the API and/or index.php paths, then you can provide them:
4551

4652
`python dumpgenerator.py --api=http://wiki.domain.org/w/api.php --xml --images`
4753

54+
`pipenv run dump --api=http://wiki.domain.org/w/api.php --xml --images` <sup>**pipenv version**</sup>
55+
56+
4857
`python dumpgenerator.py --api=http://wiki.domain.org/w/api.php --index=http://wiki.domain.org/w/index.php --xml --images`
4958

59+
`pipenv run dump --api=http://wiki.domain.org/w/api.php --index=http://wiki.domain.org/w/index.php --xml --images` <sup>**pipenv version**</sup>
60+
61+
5062
If you only want the XML histories, just use `--xml`. For only the images, just `--images`. For only the current version of every page, `--xml --curonly`.
5163

5264
You can resume an aborted download:
5365

5466
`python dumpgenerator.py --api=http://wiki.domain.org/w/api.php --xml --images --resume --path=/path/to/incomplete-dump`
5567

68+
`pipenv run dump --api=http://wiki.domain.org/w/api.php --xml --images --resume --path=/path/to/incomplete-dump` <sup>**pipenv version**</sup>
69+
5670
See more options:
5771

5872
`python dumpgenerator.py --help`
5973

74+
`pipenv run dump --help` <sup>**pipenv version**</sup>
75+
6076
### Download Wikimedia dumps
6177

6278
To download [Wikimedia XML dumps](http://dumps.wikimedia.org/backup-index.html) (Wikipedia, Wikibooks, Wikinews, etc) you can run:
6379

6480
`python wikipediadownloader.py` (download all projects)
6581

82+
`pipenv run wikipediadownloader` <sup>**pipenv version**</sup>
83+
84+
6685
See more options:
6786

6887
`python wikipediadownloader.py --help`
6988

89+
`pipenv run wikipediadownloader --help` <sup>**pipenv version**</sup>
90+
7091
### Download Wikimedia Commons images
7192

7293
There is a script for this, but we have [uploaded the tarballs](https://archive.org/details/wikimediacommons) to Internet Archive, so it's more useful to reseed their torrents than to re-generate old ones with the script.
@@ -75,22 +96,25 @@ There is a script for this, but we have [uploaded the tarballs](https://archive.
7596

7697
[![Build Status](https://travis-ci.org/WikiTeam/wikiteam.svg)](https://travis-ci.org/WikiTeam/wikiteam)
7798

78-
You can run tests easily by using the [tox](https://pypi.python.org/pypi/tox) command. It is probably already present in your operating system, you would need version 1.6. If it is not, you can download it from pypi with: `pip install tox`.
99+
You can run tests easily by using the [tox](https://pypi.python.org/pypi/tox) command. It is probably already present in your operating system, you would need version 1.6. If it is not, you can download it from pypi with: `pip install tox` (if you aren't using pipenv already).
79100

80101
Example usage:
81102

82-
$ tox
83-
py27 runtests: commands[0] | nosetests --nocapture --nologcapture
84-
Checking http://wiki.annotation.jp/api.php
85-
Trying to parse かずさアノテーション - ソーシャル・ゲノム・アノテーション.jpg from API
86-
Retrieving image filenames
87-
. Found 266 images
88-
.
89-
-------------------------------------------
90-
Ran 1 test in 2.253s
91-
92-
OK
93-
_________________ summary _________________
94-
py27: commands succeeded
95-
congratulations :)
96-
$
103+
```
104+
$ tox # or pipenv run tox
105+
py27 runtests: commands[0] | nosetests --nocapture --nologcapture
106+
Checking http://wiki.annotation.jp/api.php
107+
Trying to parse かずさアノテーション - ソーシャル・ゲノム・アノテーション.jpg from API
108+
Retrieving image filenames
109+
. Found 266 images
110+
.
111+
-------------------------------------------
112+
Ran 1 test in 2.253s
113+
114+
OK
115+
_________________ summary _________________
116+
py27: commands succeeded
117+
congratulations :)
118+
$
119+
120+
```

0 commit comments

Comments
 (0)