klipbook 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c23d7ac916e9878b64bdc8b0fdca59d0185cfe35
4
+ data.tar.gz: 3e78a7b8f33b4b6f85c1f39470bd960b0293169a
5
+ SHA512:
6
+ metadata.gz: 8c6a73d2e9e8c8f730a381edd767520a2341a4fbd28612a8ccee03b0d31fb36f5e72290adbcc2912e814a895c44bd443fec1a0d56c4b759b257c30bcb97946d0
7
+ data.tar.gz: ed4cd0809d555814d5f4c83dfa8e3cafa19dbc9f9e3bcff6ab94841d7398d7831d1e37d734a8a98af72f6be9647a4ef140993c9ed7daa74990a1908686b1b9db
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.0.0
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'gli'
3
+ gem 'slop'
4
4
  gem 'mechanize'
5
5
  gem 'rainbow'
6
6
 
@@ -8,8 +8,7 @@ group :development do
8
8
  gem 'rspec'
9
9
  gem 'rr'
10
10
  gem 'bundler'
11
- gem 'jeweler', '~> 1.6.4'
12
- gem 'rcov', '>= 0'
11
+ gem 'jeweler', '~> 1.8.8'
13
12
  gem 'pry-debugger'
14
13
  gem 'cucumber'
15
14
  gem 'aruba'
data/Gemfile.lock CHANGED
@@ -1,98 +1,138 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- aruba (0.4.11)
5
- childprocess (>= 0.2.3)
4
+ addressable (2.3.5)
5
+ aruba (0.5.3)
6
+ childprocess (>= 0.3.6)
6
7
  cucumber (>= 1.1.1)
7
- ffi (>= 1.0.11)
8
- rspec (>= 2.7.0)
9
- builder (3.0.0)
10
- childprocess (0.3.5)
11
- ffi (~> 1.0, >= 1.0.6)
12
- coderay (1.0.8)
8
+ rspec-expectations (>= 2.7.0)
9
+ builder (3.2.2)
10
+ celluloid (0.15.2)
11
+ timers (~> 1.1.0)
12
+ childprocess (0.3.9)
13
+ ffi (~> 1.0, >= 1.0.11)
14
+ coderay (1.1.0)
13
15
  columnize (0.3.6)
14
- cucumber (1.2.1)
16
+ cucumber (1.3.10)
15
17
  builder (>= 2.1.2)
16
18
  diff-lcs (>= 1.1.3)
17
- gherkin (~> 2.11.0)
18
- json (>= 1.4.6)
19
- debugger (1.2.4)
19
+ gherkin (~> 2.12)
20
+ multi_json (>= 1.7.5, < 2.0)
21
+ multi_test (>= 0.0.2)
22
+ debugger (1.6.3)
20
23
  columnize (>= 0.3.1)
21
- debugger-linecache (~> 1.1.1)
22
- debugger-ruby_core_source (~> 1.1.7)
23
- debugger-linecache (1.1.2)
24
- debugger-ruby_core_source (>= 1.1.1)
25
- debugger-ruby_core_source (1.1.8)
26
- diff-lcs (1.1.3)
27
- domain_name (0.5.6)
28
- unf (~> 0.0.3)
29
- ffi (1.1.5)
30
- gherkin (2.11.2)
31
- json (>= 1.4.6)
32
- git (1.2.5)
33
- gli (2.0.0)
34
- guard (1.3.2)
35
- listen (>= 0.4.2)
36
- thor (>= 0.14.6)
37
- guard-cucumber (1.2.0)
24
+ debugger-linecache (~> 1.2.0)
25
+ debugger-ruby_core_source (~> 1.2.4)
26
+ debugger-linecache (1.2.0)
27
+ debugger-ruby_core_source (1.2.4)
28
+ diff-lcs (1.2.5)
29
+ domain_name (0.5.15)
30
+ unf (>= 0.0.5, < 1.0.0)
31
+ faraday (0.8.8)
32
+ multipart-post (~> 1.2.0)
33
+ ffi (1.9.3)
34
+ formatador (0.2.4)
35
+ gherkin (2.12.2)
36
+ multi_json (~> 1.3)
37
+ git (1.2.6)
38
+ github_api (0.10.1)
39
+ addressable
40
+ faraday (~> 0.8.1)
41
+ hashie (>= 1.2)
42
+ multi_json (~> 1.4)
43
+ nokogiri (~> 1.5.2)
44
+ oauth2
45
+ guard (2.2.4)
46
+ formatador (>= 0.2.4)
47
+ listen (~> 2.1)
48
+ lumberjack (~> 1.0)
49
+ pry (>= 0.9.12)
50
+ thor (>= 0.18.1)
51
+ guard-cucumber (1.4.0)
38
52
  cucumber (>= 1.2.0)
39
53
  guard (>= 1.1.0)
40
- guard-rspec (1.2.1)
41
- guard (>= 1.1)
42
- jeweler (1.6.4)
54
+ guard-rspec (4.2.0)
55
+ guard (>= 2.1.1)
56
+ rspec (>= 2.14, < 4.0)
57
+ hashie (2.0.5)
58
+ highline (1.6.20)
59
+ http-cookie (1.0.2)
60
+ domain_name (~> 0.5)
61
+ httpauth (0.2.0)
62
+ jeweler (1.8.8)
63
+ builder
43
64
  bundler (~> 1.0)
44
65
  git (>= 1.2.5)
66
+ github_api (= 0.10.1)
67
+ highline (>= 1.6.15)
68
+ nokogiri (= 1.5.10)
45
69
  rake
46
- json (1.7.5)
47
- listen (0.4.7)
48
- rb-fchange (~> 0.0.5)
49
- rb-fsevent (~> 0.9.1)
50
- rb-inotify (~> 0.8.8)
51
- mechanize (2.5.1)
70
+ rdoc
71
+ json (1.8.1)
72
+ jwt (0.1.8)
73
+ multi_json (>= 1.5)
74
+ listen (2.4.0)
75
+ celluloid (>= 0.15.2)
76
+ rb-fsevent (>= 0.9.3)
77
+ rb-inotify (>= 0.9)
78
+ lumberjack (1.0.4)
79
+ mechanize (2.7.3)
52
80
  domain_name (~> 0.5, >= 0.5.1)
53
- mime-types (~> 1.17, >= 1.17.2)
81
+ http-cookie (~> 1.0)
82
+ mime-types (~> 2.0)
54
83
  net-http-digest_auth (~> 1.1, >= 1.1.1)
55
84
  net-http-persistent (~> 2.5, >= 2.5.2)
56
85
  nokogiri (~> 1.4)
57
86
  ntlm-http (~> 0.1, >= 0.1.1)
58
- webrobots (~> 0.0, >= 0.0.9)
59
- method_source (0.8.1)
60
- mime-types (1.19)
61
- net-http-digest_auth (1.2.1)
62
- net-http-persistent (2.8)
63
- nokogiri (1.5.5)
87
+ webrobots (>= 0.0.9, < 0.2)
88
+ method_source (0.8.2)
89
+ mime-types (2.0)
90
+ multi_json (1.8.2)
91
+ multi_test (0.0.2)
92
+ multi_xml (0.5.5)
93
+ multipart-post (1.2.0)
94
+ net-http-digest_auth (1.4)
95
+ net-http-persistent (2.9)
96
+ nokogiri (1.5.10)
64
97
  ntlm-http (0.1.1)
65
- pry (0.9.11.4)
66
- coderay (~> 1.0.5)
98
+ oauth2 (0.9.2)
99
+ faraday (~> 0.8)
100
+ httpauth (~> 0.2)
101
+ jwt (~> 0.1.4)
102
+ multi_json (~> 1.0)
103
+ multi_xml (~> 0.5)
104
+ rack (~> 1.2)
105
+ pry (0.9.12.4)
106
+ coderay (~> 1.0)
67
107
  method_source (~> 0.8)
68
108
  slop (~> 3.4)
69
- pry-debugger (0.2.1)
70
- debugger (~> 1.2.0)
109
+ pry-debugger (0.2.2)
110
+ debugger (~> 1.3)
71
111
  pry (~> 0.9.10)
112
+ rack (1.5.2)
72
113
  rainbow (1.1.4)
73
- rake (0.9.2.2)
74
- rb-fchange (0.0.5)
75
- ffi
76
- rb-fsevent (0.9.1)
77
- rb-inotify (0.8.8)
114
+ rake (10.1.0)
115
+ rb-fsevent (0.9.3)
116
+ rb-inotify (0.9.2)
78
117
  ffi (>= 0.5.0)
79
- rcov (0.9.11)
80
- rr (1.0.4)
81
- rspec (2.7.0)
82
- rspec-core (~> 2.7.0)
83
- rspec-expectations (~> 2.7.0)
84
- rspec-mocks (~> 2.7.0)
85
- rspec-core (2.7.1)
86
- rspec-expectations (2.7.0)
87
- diff-lcs (~> 1.1.2)
88
- rspec-mocks (2.7.0)
89
- slop (3.4.3)
90
- terminal-notifier-guard (1.5.3)
91
- thor (0.16.0)
92
- unf (0.0.5)
118
+ rdoc (4.0.1)
119
+ json (~> 1.4)
120
+ rr (1.1.2)
121
+ rspec (2.14.1)
122
+ rspec-core (~> 2.14.0)
123
+ rspec-expectations (~> 2.14.0)
124
+ rspec-mocks (~> 2.14.0)
125
+ rspec-core (2.14.7)
126
+ rspec-expectations (2.14.4)
127
+ diff-lcs (>= 1.1.3, < 2.0)
128
+ rspec-mocks (2.14.4)
129
+ slop (3.4.7)
130
+ thor (0.18.1)
131
+ timers (1.1.0)
132
+ unf (0.1.3)
93
133
  unf_ext
94
- unf_ext (0.0.5)
95
- webrobots (0.0.13)
134
+ unf_ext (0.0.6)
135
+ webrobots (0.1.1)
96
136
 
97
137
  PLATFORMS
98
138
  ruby
@@ -101,15 +141,13 @@ DEPENDENCIES
101
141
  aruba
102
142
  bundler
103
143
  cucumber
104
- gli
105
144
  guard
106
145
  guard-cucumber
107
146
  guard-rspec
108
- jeweler (~> 1.6.4)
147
+ jeweler (~> 1.8.8)
109
148
  mechanize
110
149
  pry-debugger
111
150
  rainbow
112
- rcov
113
151
  rr
114
152
  rspec
115
- terminal-notifier-guard
153
+ slop
data/README.md CHANGED
@@ -27,11 +27,11 @@ device only keeps clippings that you made directly on it.
27
27
 
28
28
  ## How does it work?
29
29
 
30
- Klipbook supports three commands: `list`, `pprint`, and `collate`.
30
+ Klipbook supports three commands: `list`, `tohtml`, and `tojson`.
31
31
 
32
- ### Pretty print
32
+ ### To HTML
33
33
 
34
- `pprint` retrieves the clippings from your latest annotated books and writes them
34
+ `tohtml` retrieves the clippings from your latest annotated books and writes them
35
35
  out into a pretty html file for each book.
36
36
 
37
37
  #### From a file
@@ -42,26 +42,26 @@ your Kindle device to your local drive via USB.
42
42
  Then write out a list of your clippings via:
43
43
 
44
44
  ```sh
45
- $ klipbook pprint "file:My Clippings.txt"
45
+ $ klipbook tohtml -i "My Clippings.txt"
46
46
  ```
47
47
 
48
48
  This command will write the collected clippings for the latest annotated book to a
49
49
  file in the current directory. You can override the output directory with the
50
- `--output-dir` switch.
50
+ `--outdir` switch.
51
51
 
52
52
  You can also specify a maximum count of books you'd like collated with the
53
- `--num-books` switch.
53
+ `--number` switch.
54
54
 
55
55
  Klipbook will not overwrite an exiting file by default. You can change this with the
56
56
  `--force` flag.
57
57
 
58
58
  #### From the site
59
59
 
60
- Specify your Amazon username and password to klipbook and it will scrape the site and
60
+ Specify your Amazon credentials to klipbook and it will scrape the site and
61
61
  output a clippings file.
62
62
 
63
63
  ```sh
64
- $ klipbook pprint site:my-username@blah.com:my-password
64
+ $ klipbook tohtml -c my-username@blah.com:my-password
65
65
  ```
66
66
 
67
67
  The same flags above apply.
@@ -80,8 +80,8 @@ output directory, e.g.
80
80
  ```sh
81
81
  $ cat ~/.klipbookrc
82
82
 
83
- :source: site:my-username@blah.com:my-password
84
- :output: /path/to/my/default/output/directory
83
+ :credentials: my-username@blah.com:my-password
84
+ :outdir: /path/to/my/default/output/directory
85
85
  ```
86
86
 
87
87
  Command line options override the defaults stored in the rc file.
@@ -91,7 +91,7 @@ Command line options override the defaults stored in the rc file.
91
91
  The `list` command lists the books available in the specified source.
92
92
 
93
93
  ```sh
94
- $ klipbook list file:"My Clippings.txt"
94
+ $ klipbook list -i "My Clippings.txt"
95
95
 
96
96
  Book list:
97
97
  [1] The Big Sleep by Raymond Chandler
@@ -99,19 +99,19 @@ Book list:
99
99
  ```
100
100
 
101
101
  By default it will only list the latest book. This can be overrided with the
102
- `--num-books` switch.
102
+ `--number` switch.
103
103
 
104
- ### Collate
104
+ ### To JSON
105
105
 
106
- `collate` pulls together the clippings from your latest annotated books and combines
106
+ `tojson` pulls together the clippings from your latest annotated books and combines
107
107
  them into a single JSON file.
108
108
 
109
109
  ```sh
110
- $ klipbook collate -c books.json "file:My Clippings.txt"
110
+ $ klipbook tojson -i "My Clippings.txt" -o books.json
111
111
  ```
112
112
 
113
113
  You can rerun collate on an existing JSON file to add new books. By default existing
114
- books in the JSON file will not be overwritten. This can be changed with the `force`
114
+ books in the JSON file will not be overwritten. This can be changed with the `--force`
115
115
  flag.
116
116
 
117
117
  ## Installation
@@ -129,12 +129,12 @@ Kindle Touch.
129
129
 
130
130
  ## Tested platforms
131
131
 
132
- Klipbook has been tested on Mac OSX Mountain Lion using MRI 1.9.3.
132
+ Klipbook has been tested on Mac OSX Mavericks using MRI 2.0.0
133
133
 
134
134
  ## Contributing to Klipbook
135
135
 
136
136
  Fork the project on [Github](https://github.com/grassdog/klipbook), add tests for
137
- your changes, and submit a well described pull request.
137
+ your changes, and submit a well described pull request.
138
138
 
139
139
  ## Copyright
140
140
 
data/Rakefile CHANGED
@@ -30,12 +30,6 @@ Rake::RDocTask.new do |rdoc|
30
30
  end
31
31
 
32
32
  require 'rspec/core/rake_task'
33
- desc 'Generate code coverage'
34
- RSpec::Core::RakeTask.new(:coverage) do |t|
35
- t.pattern = './spec/**/*_spec.rb' # don't need this, it's default.
36
- t.rcov = true
37
- t.rcov_opts = ['--exclude', 'spec']
38
- end
39
33
 
40
34
  desc 'Run specs'
41
35
  RSpec::Core::RakeTask.new(:spec)