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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3fd66ccaa0654d53f1efc187f7b21e140bab2c8a
4
- data.tar.gz: 20a4c800c0adca5b13e9464539187c3f3aa8be50
3
+ metadata.gz: 417caf5fa64fb6e7657817c11770e910156cc17e
4
+ data.tar.gz: 48986c30fd7e63c49d5c52faf53763b09639fe88
5
5
  SHA512:
6
- metadata.gz: 56c323674093cd55c88f093c5b574de48ac7e8a0c2ec0e2d6ecc88e19ba51750b3e1dd67c34aa7b6665321bb2f3d22adabb4c8e7705e5c5b5e78a44dee549fc1
7
- data.tar.gz: c5924b1a5ee4a25d8419822344dc4c7e14f674f8e47689f6c28df6feac8c3d3fe8c69d0102a3d31ce0dcb90b1e3643e3801d8dab9fc60d2010d4da078ba8ebcf
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
+ ```
@@ -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
@@ -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
- wanted_names.empty? ? false : wanted_names.any? do |wanted|
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
@@ -0,0 +1,5 @@
1
+ class Evernote::EDAM::Type::Notebook
2
+ def stack_book
3
+ stack ? "#{stack}/#{name}" : "#{name}"
4
+ end
5
+ end
@@ -1,4 +1,5 @@
1
1
  require 'evernote-thrift'
2
+ require 'yinx/helper'
2
3
  require 'yinx/note_store'
3
4
 
4
5
  module Yinx
@@ -1,3 +1,3 @@
1
1
  module Yinx
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
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.6
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-10 00:00:00.000000000 Z
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