fastreader 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fastreader might be problematic. Click here for more details.

@@ -4,10 +4,16 @@
4
4
 
5
5
  * Basic feature set I envisioned a week ago is working.
6
6
 
7
- === 1.0.6 / 2008-06-25
7
+ === 1.0.6 / 2008-06-26
8
8
 
9
9
  * 1 minor enhancement
10
10
 
11
11
  * Added PAGE UP and PAGE DOWN keys to the recognized key commands.
12
12
 
13
+ === 1.0.7 / 2008-06-26
14
+
15
+ * 1 minor enhancement
16
+
17
+ * Improved the converstion of HTML entry entry to ASCII text.
18
+
13
19
 
data/README.txt CHANGED
@@ -57,7 +57,18 @@ FastReader will output information as the update progresses.
57
57
 
58
58
  It's a good idea to call "fastreader update" from a cron job so you don't
59
59
  have to keep updating feeds manually. Make sure you redirect the output to
60
- /dev/null.
60
+ /dev/null. E.g.,
61
+
62
+ 21 * * * * /usr/local/bin/fastreader update >/dev/null 2>&1
63
+
64
+ This makes fastreader automatically update the feeds every hour, 21 minutes into
65
+ the hour. It's good to pick a random number of minutes so you don't update your
66
+ feeds when feed reader traffic is at a peak.
67
+
68
+ Adjust the path of the command to the location of your fastreader executable.
69
+ You can find out the path by typing
70
+
71
+ % which fastreader
61
72
 
62
73
 
63
74
  === Console Mode
@@ -89,6 +100,12 @@ please consult the console mode help pages.
89
100
 
90
101
  * sudo gem install fastreader
91
102
 
103
+ == UPDATES:
104
+
105
+ * sudo gem update fastreader
106
+
107
+ Updates will be released as bugs get fixed and features added.
108
+
92
109
  == LICENSE:
93
110
 
94
111
  (The MIT License)
@@ -142,7 +142,11 @@ class Display
142
142
  end
143
143
 
144
144
  doc.search('big, h1,h2,h3,h4') do |p|
145
- p.swap( "\n\n= #{p.inner_text}\n\n" )
145
+ if p.inner_text.strip == ''
146
+ p.swap('')
147
+ else
148
+ p.swap( "\n\n= #{unwrap(p.inner_text)}\n\n" )
149
+ end
146
150
  end
147
151
  doc.search('//img') do |img|
148
152
  img.swap( "(img)" )
@@ -197,18 +201,21 @@ class Display
197
201
  end
198
202
 
199
203
  doc.search('p') do |p|
200
- p.swap( "\n\n" + p.inner_text.gsub("\n", ' ').squeeze(' ').strip + "\n\n" )
204
+ p.swap( "\n\n" + unwrap(p.inner_text) + "\n\n" )
201
205
  end
202
206
 
203
-
204
207
  doc.search('div') do |p|
205
- p.swap( "\n\n" + p.inner_text.gsub("\n", ' ').squeeze(' ').strip + "\n\n" )
208
+ p.swap( "\n\n" + p.inner_text.strip + "\n\n" )
206
209
  end
207
210
 
208
211
  doc.to_s
212
+ end
209
213
 
214
+ def unwrap(text)
215
+ text.gsub("\n", ' ').squeeze(' ').strip
210
216
  end
211
- def links_to_footnotes(html)
217
+
218
+ def links_to_footnotes(html)
212
219
  doc = Hpricot(html)
213
220
  footnotes = []
214
221
  doc.search('//a[@href]') do |link|
@@ -33,7 +33,7 @@ include FileUtils
33
33
  include ActionView::Helpers::DateHelper
34
34
 
35
35
  class Fastreader
36
- VERSION = '1.0.6'
36
+ VERSION = '1.0.7'
37
37
 
38
38
  attr_accessor :database_path
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastreader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Choi