wikian 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/wikian.rb +19 -17
- data/lib/wikian/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dac3dedbc9c20098849e966beda97855a9a133d8b9334ad26d5a2a651ce18fa2
|
4
|
+
data.tar.gz: 347b7ead2d39dee453f122757f1cfb758559eb86e30ec924e55a6aca48101e4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 518a100775e95f60f37925142dafea7614298c654ff5a87f5358966dc7e40c25a3551f06c547dac971d81bf3589100967815104ee4fc3d6e239788a87553b8b0
|
7
|
+
data.tar.gz: a0230996611e118bb272dfdc83c8ef424bf180fb7b5fd51057f6ceee8a24e3ffe931493ce1b11ee77668d38c131346020d7e8342cd544c64147782d8e41d1c9d
|
data/Gemfile.lock
CHANGED
data/lib/wikian.rb
CHANGED
@@ -66,46 +66,48 @@ class Wikian
|
|
66
66
|
Options:
|
67
67
|
-a, --append append the input file
|
68
68
|
-c, --captcha ID:MESSAGE captcha info
|
69
|
-
-d, --debug
|
69
|
+
-d, --debug print debugging messages
|
70
|
+
-h, --help print this help message
|
70
71
|
-m, --message MESSAGE add a commit message (HIGHLY recommended)
|
71
72
|
-p, --prepend prepend the input file
|
72
73
|
-r, --remove-cookie remove API cookie
|
73
74
|
-s, --section NUMBER section to edit
|
74
75
|
-t, --template create template configuration file
|
75
|
-
-v, --version
|
76
|
+
-v, --version print version number
|
76
77
|
|
77
78
|
Subcommands:
|
78
79
|
c, contributions [N] get user last N contributions. N defaults to 20
|
79
|
-
g, get get wikitext
|
80
|
-
p, post post wikitext
|
81
|
-
s, search search wikitext
|
80
|
+
g, get get wikitext from a Wikipedia article
|
81
|
+
p, post post wikitext to a Wikipedia article
|
82
|
+
s, search search wikitext in Wikipedia
|
82
83
|
|
83
84
|
Examples:
|
84
85
|
# create wiki.yml template
|
85
|
-
|
86
|
+
wi g -t
|
86
87
|
|
87
|
-
# download article
|
88
|
-
|
88
|
+
# download article
|
89
|
+
wi get -t
|
90
|
+
wi get https://en.wikipedia.org/wiki/Wikipedia:Sandbox
|
89
91
|
|
90
|
-
# upload file
|
91
|
-
|
92
|
+
# upload file
|
93
|
+
wi post Wikipedia:Sandbox.en.wikipedia.org.wiki
|
92
94
|
|
93
95
|
# upload file to Spanish Wikipedia
|
94
|
-
|
96
|
+
wi post Wikipedia:Sandbox.es.wikipedia.org.wiki
|
95
97
|
|
96
98
|
# upload file to English Wiktionary
|
97
|
-
|
99
|
+
wi post Wikipedia:Sandbox.en.wiktionary.org.wiki
|
98
100
|
|
99
|
-
# append
|
100
|
-
|
101
|
+
# append wikitext to section 2 of the article
|
102
|
+
wi post -a -s 2 Wikipedia:Sandbox.en.wikipedia.org.wiki
|
101
103
|
|
102
104
|
# heavy use of the API may require cache validation
|
103
|
-
|
105
|
+
wi post -c 1234:someMessage spider-Man.wiki
|
104
106
|
|
105
107
|
Comments:
|
106
108
|
Posted files must follow the convention:
|
107
|
-
<article_name>.<
|
108
|
-
where <
|
109
|
+
<article_name>.<site>.wiki
|
110
|
+
where <site> is a wikimedia site.
|
109
111
|
More info at: https://meta.wikimedia.org/wiki/Our_projects
|
110
112
|
eos
|
111
113
|
exit
|
data/lib/wikian/version.rb
CHANGED