wikian 0.1.1 → 0.1.2
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/README.md +23 -19
- 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: 1c71c17137f4f13b8c1ac7da558e1219fd50a4fc425fc22fa2d7d2060c10af91
|
4
|
+
data.tar.gz: 579e18baa7d5c2a3fd3c0639561401212eac11ed6e623de3de7f8f200d0f2d3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89a90e0003596d229cc1cf3dfffb3f6313cd76e475c943bcfbb0c7b3b9755d0a0eec32e4857ebca2cd90fc81254ac46212358ad975590516c132eeeda7c7aa22
|
7
|
+
data.tar.gz: 73090be30a37ed6a8319e2bde35ec3301a6196bd747fbc95089125f01cc0a8ebed731c2675f08d4df3d602a937b233693020109b29abacadc4168b6db757f34c
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,28 +1,35 @@
|
|
1
1
|
# Wikian
|
2
2
|
|
3
3
|
Want to be happier while editing wiki files?
|
4
|
-
|
4
|
+
Me too, that's why I use [Wikian](https://rubygems.org/gems/wikian):
|
5
5
|
|
6
6
|
```
|
7
7
|
$ gem install wikian
|
8
8
|
```
|
9
9
|
|
10
|
-
To use it
|
11
|
-
Then define and export the `WIKI_USER` and `SECRET_WIKI_PASS` variables in your `.bashrc`:
|
10
|
+
To use it create a Wikipedia account, then define and export the `WIKI_USER` and `SECRET_WIKI_PASS` variables in your `.bashrc`:
|
12
11
|
|
13
12
|
```bash
|
14
|
-
export WIKI_USER='
|
15
|
-
export SECRET_WIKI_PASS='
|
13
|
+
export WIKI_USER='Example_wiki_user_name'
|
14
|
+
export SECRET_WIKI_PASS='example_wiki_password'
|
16
15
|
```
|
17
16
|
|
18
|
-
Wikian works across [Wikimedia sites](https://meta.wikimedia.org/wiki/Our_projects)
|
19
|
-
Create a file following the convention:
|
17
|
+
Wikian works across [Wikimedia sites](https://meta.wikimedia.org/wiki/Our_projects) and follows the file naming convention:
|
20
18
|
|
21
19
|
```
|
22
20
|
<article_name>.<site>.wiki
|
23
21
|
```
|
24
22
|
|
25
|
-
|
23
|
+
Some valid file names:
|
24
|
+
|
25
|
+
```
|
26
|
+
Spider_Man.en.wikipedia.org.wiki
|
27
|
+
Spider_Man.es.wikipedia.org.wiki
|
28
|
+
excelsior.es.wiktionary.org.wiki
|
29
|
+
User:Example_User.www.mediawiki.org.wiki
|
30
|
+
```
|
31
|
+
|
32
|
+
#### Examples
|
26
33
|
|
27
34
|
To append some text to your Wiktionary user profile:
|
28
35
|
|
@@ -36,27 +43,24 @@ $ wi post -p User:$WIKI_USER.en.wikitionary.org.wiki
|
|
36
43
|
Article uploaded
|
37
44
|
```
|
38
45
|
|
39
|
-
To
|
40
|
-
Generate a template `wiki.yml` config:
|
46
|
+
To get an article's wikitext:
|
41
47
|
|
42
|
-
```
|
43
|
-
wi g -t
|
44
|
-
```
|
45
48
|
|
46
|
-
|
49
|
+
```
|
50
|
+
$ wi get -t
|
51
|
+
Creating template wiki.yml
|
47
52
|
|
48
|
-
|
49
|
-
$ wi get https://en.wikipedia.org/wiki/Wikipedia:Sandbox
|
53
|
+
$ wi g https://en.wikipedia.org/wiki/Wikipedia:Sandbox
|
50
54
|
Writing to Wikipedia:Sandbox.en.wikipedia.org.json
|
51
55
|
Writing to Wikipedia:Sandbox.en.wikipedia.org.wiki
|
52
56
|
```
|
53
57
|
|
54
|
-
|
55
|
-
When ready, uploaded it:
|
58
|
+
You can then edit the the article in your favorite text editor and uploaded:
|
56
59
|
|
57
60
|
```bash
|
58
61
|
$ wi post Wikipedia:Sandbox.en.wikipedia.org.wiki
|
59
62
|
Article uploaded
|
60
63
|
```
|
61
64
|
|
62
|
-
Vim users should try out [mediawiki.vim](https://en.wikipedia.org/wiki/Help:Text_editor_support#Vim)
|
65
|
+
Vim users should try out [mediawiki.vim](https://en.wikipedia.org/wiki/Help:Text_editor_support#Vim) which defines syntax highlighting and abbreviations for wikitext files.
|
66
|
+
|
data/lib/wikian/version.rb
CHANGED