kindlemail 0.2.4 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +3 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/README.md +35 -1
- data/Rakefile +1 -2
- data/VERSION +1 -1
- data/bin/kindlemail +5 -1
- data/kindlemail.gemspec +9 -11
- data/lib/KindleMail.rb +1 -1
- data/lib/constants.rb +7 -2
- metadata +44 -37
data/Changelog.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,7 +3,7 @@ GEM
|
|
3
3
|
specs:
|
4
4
|
activesupport (3.0.3)
|
5
5
|
git (1.2.5)
|
6
|
-
gmail-mailer (0.4.
|
6
|
+
gmail-mailer (0.4.5)
|
7
7
|
gmail_xoauth (~> 0.3.0)
|
8
8
|
mail (~> 2.2.14)
|
9
9
|
gmail_xoauth (0.3.0)
|
@@ -31,6 +31,6 @@ PLATFORMS
|
|
31
31
|
|
32
32
|
DEPENDENCIES
|
33
33
|
bundler (~> 1.0.0)
|
34
|
-
gmail-mailer (= 0.4.
|
34
|
+
gmail-mailer (= 0.4.5)
|
35
35
|
jeweler (~> 1.5.2)
|
36
36
|
trollop (~> 1.16.2)
|
data/README.md
CHANGED
@@ -2,10 +2,41 @@ kindlemail is a simple way of sending personal documents to your kindle, I made
|
|
2
2
|
simple application because I'm too lazy to faff about attaching items to emails and
|
3
3
|
I prefer to use the CLI.
|
4
4
|
|
5
|
+
## Information
|
6
|
+
This will only work with Ruby 1.9 or greater (it has been tested on 1.9.2 specifically)
|
7
|
+
|
5
8
|
## Notice
|
6
|
-
Users of the 3G Kindle will get charged fees for using the personal-document service so please
|
9
|
+
**DISCLAIMER** Users of the 3G Kindle will get charged fees for using the personal-document service so please
|
7
10
|
be aware of this, otherwise just use the Kindle in a Wifi area for free transfers.
|
8
11
|
|
12
|
+
## Pre-requisites
|
13
|
+
|
14
|
+
For kindlemail to work you will need three things
|
15
|
+
|
16
|
+
* A gmail account
|
17
|
+
* Anonymous OAUTH access to your gmail account
|
18
|
+
* Your gmail address will need to be added to the "Your Kindle Approved E-mail List" on Amazon's "Manage Your Kindle" page
|
19
|
+
|
20
|
+
### How to run
|
21
|
+
If you want to run kindlemail, do the following
|
22
|
+
|
23
|
+
If you want the bleeding edge, clone this repository and...
|
24
|
+
rake install
|
25
|
+
or if you want a released gem...
|
26
|
+
gem install kindlemail
|
27
|
+
|
28
|
+
Run kindlemail to see if it's installed correctly
|
29
|
+
kindlemail -i
|
30
|
+
|
31
|
+
Modify the file and follow the instructions in the comments to add your gmail credentials
|
32
|
+
vim ~/.kindlemail/.email_conf
|
33
|
+
|
34
|
+
Modify the file and follow the instructions to add your kindle address
|
35
|
+
vim ~/.kindlemail/.kindlemail
|
36
|
+
|
37
|
+
Send a file to your Kindle!
|
38
|
+
kindlemail ~/books/my_book.mobi
|
39
|
+
|
9
40
|
## Your code is rubbish
|
10
41
|
I'm new to this ruby game so I'm a bit rusty on how applications are packaged up, how things are done.
|
11
42
|
I wrote this application purely for my own benefit, so if it doesn't work or you don't agree with my
|
@@ -17,6 +48,8 @@ This is rough code and probably won't work.
|
|
17
48
|
|
18
49
|
## Options
|
19
50
|
|
51
|
+
kindlemail 0.2.5. Written by djhworld. https://github.com/djhworld/kindlemail
|
52
|
+
|
20
53
|
kindlemail will send items to your kindle in the simplest possible manner
|
21
54
|
|
22
55
|
Valid filetypes: -
|
@@ -45,6 +78,7 @@ This is rough code and probably won't work.
|
|
45
78
|
--force, -f: Send the file regardless of whether you have sent it before
|
46
79
|
--show-history, -s: Show the history of files that have been sent using kindlemail
|
47
80
|
--clear-history, -d: Clear the history of files that have been sent using kindlemail
|
81
|
+
--show-info, -i: Show information about the way kindlemail is setup
|
48
82
|
--version, -v: Print version and exit
|
49
83
|
--help, -h: Show this message
|
50
84
|
|
data/Rakefile
CHANGED
@@ -19,8 +19,7 @@ Jeweler::Tasks.new do |gem|
|
|
19
19
|
gem.description = %Q{Sends documents to a designated kindle address painlessly and via the CLI. No need to fumble around with clumsy attachment boxes so forth, just whack in the documents you want to send and hit enter}
|
20
20
|
gem.email = "djharperuk@gmail.com"
|
21
21
|
gem.authors = ["Daniel Harper"]
|
22
|
-
gem.
|
23
|
-
gem.add_dependency "gmail-mailer", "= 0.4.2"
|
22
|
+
gem.add_dependency "gmail-mailer", "= 0.4.5"
|
24
23
|
gem.add_dependency "trollop", "~> 1.16.2"
|
25
24
|
end
|
26
25
|
Jeweler::RubygemsDotOrgTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.6
|
data/bin/kindlemail
CHANGED
data/kindlemail.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{kindlemail}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Daniel Harper"]
|
12
|
-
s.date = %q{2011-01-
|
12
|
+
s.date = %q{2011-01-17}
|
13
13
|
s.default_executable = %q{kindlemail}
|
14
14
|
s.description = %q{Sends documents to a designated kindle address painlessly and via the CLI. No need to fumble around with clumsy attachment boxes so forth, just whack in the documents you want to send and hit enter}
|
15
15
|
s.email = %q{djharperuk@gmail.com}
|
@@ -41,38 +41,36 @@ Gem::Specification.new do |s|
|
|
41
41
|
s.homepage = %q{http://github.com/djhworld/kindlemail}
|
42
42
|
s.licenses = ["MIT"]
|
43
43
|
s.require_paths = ["lib"]
|
44
|
-
s.
|
45
|
-
s.rubygems_version = %q{1.3.7}
|
44
|
+
s.rubygems_version = %q{1.4.2}
|
46
45
|
s.summary = %q{Push documents to your kindle via the personal document service}
|
47
46
|
s.test_files = [
|
48
47
|
"test/test_kindle_mailer.rb"
|
49
48
|
]
|
50
49
|
|
51
50
|
if s.respond_to? :specification_version then
|
52
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
53
51
|
s.specification_version = 3
|
54
52
|
|
55
53
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
56
54
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
57
55
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
58
|
-
s.add_development_dependency(%q<gmail-mailer>, ["= 0.4.
|
56
|
+
s.add_development_dependency(%q<gmail-mailer>, ["= 0.4.5"])
|
59
57
|
s.add_development_dependency(%q<trollop>, ["~> 1.16.2"])
|
60
|
-
s.add_runtime_dependency(%q<gmail-mailer>, ["= 0.4.
|
58
|
+
s.add_runtime_dependency(%q<gmail-mailer>, ["= 0.4.5"])
|
61
59
|
s.add_runtime_dependency(%q<trollop>, ["~> 1.16.2"])
|
62
60
|
else
|
63
61
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
64
62
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
65
|
-
s.add_dependency(%q<gmail-mailer>, ["= 0.4.
|
63
|
+
s.add_dependency(%q<gmail-mailer>, ["= 0.4.5"])
|
66
64
|
s.add_dependency(%q<trollop>, ["~> 1.16.2"])
|
67
|
-
s.add_dependency(%q<gmail-mailer>, ["= 0.4.
|
65
|
+
s.add_dependency(%q<gmail-mailer>, ["= 0.4.5"])
|
68
66
|
s.add_dependency(%q<trollop>, ["~> 1.16.2"])
|
69
67
|
end
|
70
68
|
else
|
71
69
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
72
70
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
73
|
-
s.add_dependency(%q<gmail-mailer>, ["= 0.4.
|
71
|
+
s.add_dependency(%q<gmail-mailer>, ["= 0.4.5"])
|
74
72
|
s.add_dependency(%q<trollop>, ["~> 1.16.2"])
|
75
|
-
s.add_dependency(%q<gmail-mailer>, ["= 0.4.
|
73
|
+
s.add_dependency(%q<gmail-mailer>, ["= 0.4.5"])
|
76
74
|
s.add_dependency(%q<trollop>, ["~> 1.16.2"])
|
77
75
|
end
|
78
76
|
end
|
data/lib/KindleMail.rb
CHANGED
@@ -193,7 +193,7 @@ module KindleMail
|
|
193
193
|
puts "If you hate this application, supress your hatred and tell me what"
|
194
194
|
puts "you hate about it so I can change it"
|
195
195
|
puts
|
196
|
-
puts "Version: #{
|
196
|
+
puts "Version: #{APP_VERSION}"
|
197
197
|
puts "Homepage: #{HOMEPAGE}"
|
198
198
|
puts "Author: #{AUTHOR}"
|
199
199
|
puts
|
data/lib/constants.rb
CHANGED
@@ -17,9 +17,14 @@ USER_DIR = "~/.kindlemail"
|
|
17
17
|
STORAGE_DIR = USER_DIR + "/.storage"
|
18
18
|
EMAIL_CONF_FILE = File.expand_path(USER_DIR + "/.email_conf")
|
19
19
|
USER_CONF_FILE = File.expand_path(USER_DIR + "/.kindlemail")
|
20
|
-
|
20
|
+
|
21
|
+
version_file = File.expand_path(File.join(File.dirname(__FILE__), "../", "VERSION"))
|
22
|
+
File.open(version_file, 'r') do |file|
|
23
|
+
APP_VERSION = file.gets
|
24
|
+
end
|
25
|
+
|
21
26
|
HOMEPAGE = "https://github.com/djhworld/kindlemail"
|
22
27
|
AUTHOR = "djhworld"
|
23
|
-
VERSION_STRING = "kindlemail #{
|
28
|
+
VERSION_STRING = "kindlemail #{APP_VERSION}. Written by #{AUTHOR}. #{HOMEPAGE}"
|
24
29
|
FILE_STORE = File.expand_path(STORAGE_DIR + "/sent_files.history")
|
25
30
|
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kindlemail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 27
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
9
|
+
- 6
|
10
|
+
version: 0.2.6
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Daniel Harper
|
@@ -14,99 +15,105 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-17 00:00:00 +00:00
|
18
19
|
default_executable: kindlemail
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
prerelease: false
|
21
23
|
name: bundler
|
22
|
-
|
24
|
+
type: :development
|
25
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
26
|
none: false
|
24
27
|
requirements:
|
25
28
|
- - ~>
|
26
29
|
- !ruby/object:Gem::Version
|
30
|
+
hash: 23
|
27
31
|
segments:
|
28
32
|
- 1
|
29
33
|
- 0
|
30
34
|
- 0
|
31
35
|
version: 1.0.0
|
32
|
-
|
33
|
-
prerelease: false
|
34
|
-
version_requirements: *id001
|
36
|
+
requirement: *id001
|
35
37
|
- !ruby/object:Gem::Dependency
|
38
|
+
prerelease: false
|
36
39
|
name: jeweler
|
37
|
-
|
40
|
+
type: :development
|
41
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
42
|
none: false
|
39
43
|
requirements:
|
40
44
|
- - ~>
|
41
45
|
- !ruby/object:Gem::Version
|
46
|
+
hash: 7
|
42
47
|
segments:
|
43
48
|
- 1
|
44
49
|
- 5
|
45
50
|
- 2
|
46
51
|
version: 1.5.2
|
47
|
-
|
48
|
-
prerelease: false
|
49
|
-
version_requirements: *id002
|
52
|
+
requirement: *id002
|
50
53
|
- !ruby/object:Gem::Dependency
|
54
|
+
prerelease: false
|
51
55
|
name: gmail-mailer
|
52
|
-
|
56
|
+
type: :development
|
57
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
53
58
|
none: false
|
54
59
|
requirements:
|
55
60
|
- - "="
|
56
61
|
- !ruby/object:Gem::Version
|
62
|
+
hash: 5
|
57
63
|
segments:
|
58
64
|
- 0
|
59
65
|
- 4
|
60
|
-
-
|
61
|
-
version: 0.4.
|
62
|
-
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: *id003
|
66
|
+
- 5
|
67
|
+
version: 0.4.5
|
68
|
+
requirement: *id003
|
65
69
|
- !ruby/object:Gem::Dependency
|
70
|
+
prerelease: false
|
66
71
|
name: trollop
|
67
|
-
|
72
|
+
type: :development
|
73
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
68
74
|
none: false
|
69
75
|
requirements:
|
70
76
|
- - ~>
|
71
77
|
- !ruby/object:Gem::Version
|
78
|
+
hash: 83
|
72
79
|
segments:
|
73
80
|
- 1
|
74
81
|
- 16
|
75
82
|
- 2
|
76
83
|
version: 1.16.2
|
77
|
-
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: *id004
|
84
|
+
requirement: *id004
|
80
85
|
- !ruby/object:Gem::Dependency
|
86
|
+
prerelease: false
|
81
87
|
name: gmail-mailer
|
82
|
-
|
88
|
+
type: :runtime
|
89
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
83
90
|
none: false
|
84
91
|
requirements:
|
85
92
|
- - "="
|
86
93
|
- !ruby/object:Gem::Version
|
94
|
+
hash: 5
|
87
95
|
segments:
|
88
96
|
- 0
|
89
97
|
- 4
|
90
|
-
-
|
91
|
-
version: 0.4.
|
92
|
-
|
93
|
-
prerelease: false
|
94
|
-
version_requirements: *id005
|
98
|
+
- 5
|
99
|
+
version: 0.4.5
|
100
|
+
requirement: *id005
|
95
101
|
- !ruby/object:Gem::Dependency
|
102
|
+
prerelease: false
|
96
103
|
name: trollop
|
97
|
-
|
104
|
+
type: :runtime
|
105
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
98
106
|
none: false
|
99
107
|
requirements:
|
100
108
|
- - ~>
|
101
109
|
- !ruby/object:Gem::Version
|
110
|
+
hash: 83
|
102
111
|
segments:
|
103
112
|
- 1
|
104
113
|
- 16
|
105
114
|
- 2
|
106
115
|
version: 1.16.2
|
107
|
-
|
108
|
-
prerelease: false
|
109
|
-
version_requirements: *id006
|
116
|
+
requirement: *id006
|
110
117
|
description: Sends documents to a designated kindle address painlessly and via the CLI. No need to fumble around with clumsy attachment boxes so forth, just whack in the documents you want to send and hit enter
|
111
118
|
email: djharperuk@gmail.com
|
112
119
|
executables:
|
@@ -149,23 +156,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
149
156
|
requirements:
|
150
157
|
- - ">="
|
151
158
|
- !ruby/object:Gem::Version
|
159
|
+
hash: 3
|
152
160
|
segments:
|
153
|
-
-
|
154
|
-
|
155
|
-
- 2
|
156
|
-
version: 1.9.2
|
161
|
+
- 0
|
162
|
+
version: "0"
|
157
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
164
|
none: false
|
159
165
|
requirements:
|
160
166
|
- - ">="
|
161
167
|
- !ruby/object:Gem::Version
|
168
|
+
hash: 3
|
162
169
|
segments:
|
163
170
|
- 0
|
164
171
|
version: "0"
|
165
172
|
requirements: []
|
166
173
|
|
167
174
|
rubyforge_project:
|
168
|
-
rubygems_version: 1.
|
175
|
+
rubygems_version: 1.4.2
|
169
176
|
signing_key:
|
170
177
|
specification_version: 3
|
171
178
|
summary: Push documents to your kindle via the personal document service
|