kindle-feeds 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +0 -1
- data/README.txt +14 -9
- data/lib/kindle-feeds.rb +24 -2
- metadata +1 -1
data/Manifest.txt
CHANGED
data/README.txt
CHANGED
@@ -1,32 +1,37 @@
|
|
1
1
|
= kindle-feeds
|
2
2
|
|
3
|
-
*
|
3
|
+
* http://danielchoi.com/software/kindle-feeds.html
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
7
|
-
|
7
|
+
kindle-feeds reads a feed list from kindle_feeds.conf, downloads the feeds, and
|
8
|
+
generates a Kindle-compatiable and optimized HTML file that can be sent to
|
9
|
+
YOUR_KINDLE_USERNAME@kindle.com or YOUR_KINDLE_USERNAME@free.kindle.com for conversion
|
10
|
+
into an .azw file for reading on the Kindle.
|
8
11
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
+
The first time kindle-feeds is run, it will generate a stub kindle_feeds.conf file
|
13
|
+
in the same directory. Please edit this file to specify the feeds you want to
|
14
|
+
download and convert for Kindle reading. Further instructions can be found at the
|
15
|
+
top of kindle-feeds.conf once it is generated.
|
12
16
|
|
13
17
|
== SYNOPSIS:
|
14
18
|
|
15
|
-
|
19
|
+
kindle-feeds
|
16
20
|
|
17
21
|
== REQUIREMENTS:
|
18
22
|
|
19
|
-
*
|
23
|
+
* hpricot
|
24
|
+
* feed-normalizer
|
20
25
|
|
21
26
|
== INSTALL:
|
22
27
|
|
23
|
-
*
|
28
|
+
* sudo gem install kindle-feeds
|
24
29
|
|
25
30
|
== LICENSE:
|
26
31
|
|
27
32
|
(The MIT License)
|
28
33
|
|
29
|
-
Copyright (c) 2008
|
34
|
+
Copyright (c) 2008 Daniel Choi
|
30
35
|
|
31
36
|
Permission is hereby granted, free of charge, to any person obtaining
|
32
37
|
a copy of this software and associated documentation files (the
|
data/lib/kindle-feeds.rb
CHANGED
@@ -3,6 +3,28 @@
|
|
3
3
|
# copyright 2008 Daniel Choi
|
4
4
|
# dhchoi@gmail.com
|
5
5
|
# License: MIT
|
6
|
+
# (The MIT License)
|
7
|
+
#
|
8
|
+
# Copyright (c) 2008 Daniel Choi
|
9
|
+
#
|
10
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
11
|
+
# a copy of this software and associated documentation files (the
|
12
|
+
# 'Software'), to deal in the Software without restriction, including
|
13
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
14
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
15
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
16
|
+
# the following conditions:
|
17
|
+
#
|
18
|
+
# The above copyright notice and this permission notice shall be
|
19
|
+
# included in all copies or substantial portions of the Software.
|
20
|
+
#
|
21
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
22
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
23
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
24
|
+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
25
|
+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
26
|
+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
27
|
+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
6
28
|
|
7
29
|
require 'rubygems'
|
8
30
|
require 'optparse'
|
@@ -173,7 +195,7 @@ class Section
|
|
173
195
|
end
|
174
196
|
|
175
197
|
class KindleFeeds
|
176
|
-
VERSION = "1.0.
|
198
|
+
VERSION = "1.0.1"
|
177
199
|
attr_accessor :sections
|
178
200
|
# config is a text file with a certain format
|
179
201
|
def initialize(config)
|
@@ -208,7 +230,7 @@ class KindleFeeds
|
|
208
230
|
erb = ERB.new(File.read(ERB_TEMPLATE))
|
209
231
|
out = erb.result(binding())
|
210
232
|
# TODO put timestamp in filename
|
211
|
-
date = Time.now.strftime('%m-%
|
233
|
+
date = Time.now.strftime('%m-%d-%Y')
|
212
234
|
outfile = "Kindle Feeds #{date}.html"
|
213
235
|
File.open(outfile, "w") do |f|
|
214
236
|
f.write out
|