yinx 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/lib/yinx.rb +10 -0
- data/lib/yinx/down_config.rb +1 -1
- data/lib/yinx/helper.rb +5 -0
- data/lib/yinx/user_store.rb +1 -0
- data/lib/yinx/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 417caf5fa64fb6e7657817c11770e910156cc17e
|
4
|
+
data.tar.gz: 48986c30fd7e63c49d5c52faf53763b09639fe88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16c915dd6cc9b9afcdd11a0aed9c5d646b14ee1f3c8580e747b9ba764ee15504e8247f11f9ea1b2173e7e0ff773e6fdb4a7107d24761e0f918524ad9552aadbc
|
7
|
+
data.tar.gz: 7b6f73ab093560673c79320d858bac1ef5f655caa1f6700502de82b0829f649e544521d783635f3c9f91330db3eb79c4bde8d9e6c703a0915fda231ee5a59d08
|
data/README.md
CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
Put your api key in `$HOME/.yinx`, then:
|
23
|
+
Put your api key in `$HOME/.yinx`, or `export YINX=yourkey`, then:
|
24
24
|
|
25
25
|
```ruby
|
26
26
|
notes = Yinx.fetch_all
|
@@ -37,3 +37,9 @@ notes = Yinx.fetch do
|
|
37
37
|
end
|
38
38
|
```
|
39
39
|
|
40
|
+
Or you may just get books or tags info:
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
books = Yinx.fetch_all_books
|
44
|
+
tags = Yinx.fetch_all_tags
|
45
|
+
```
|
data/lib/yinx.rb
CHANGED
@@ -29,6 +29,16 @@ module Yinx
|
|
29
29
|
fetch {book /./}
|
30
30
|
end
|
31
31
|
|
32
|
+
def fetch_all_books real = true
|
33
|
+
@real = real
|
34
|
+
note_store.listNotebooks
|
35
|
+
end
|
36
|
+
|
37
|
+
def fetch_all_tags real = true
|
38
|
+
@real = real
|
39
|
+
note_store.listTags
|
40
|
+
end
|
41
|
+
|
32
42
|
private
|
33
43
|
|
34
44
|
def download
|
data/lib/yinx/down_config.rb
CHANGED
@@ -21,7 +21,7 @@ module Yinx
|
|
21
21
|
|
22
22
|
define_method "want_#{condition}?" do |name|
|
23
23
|
wanted_names = self.send "wanted_#{condition}s"
|
24
|
-
|
24
|
+
wanted_names.empty? ? false : wanted_names.any? do |wanted|
|
25
25
|
wanted === name or wanted.to_s == name
|
26
26
|
end
|
27
27
|
end
|
data/lib/yinx/helper.rb
ADDED
data/lib/yinx/user_store.rb
CHANGED
data/lib/yinx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yinx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ken
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- bin/setup
|
84
84
|
- lib/yinx.rb
|
85
85
|
- lib/yinx/down_config.rb
|
86
|
+
- lib/yinx/helper.rb
|
86
87
|
- lib/yinx/note_meta.rb
|
87
88
|
- lib/yinx/note_store.rb
|
88
89
|
- lib/yinx/user_store.rb
|