polyrex-feed-reader 0.5.11 → 0.5.14
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 +4 -4
- checksums.yaml.gz.sig +1 -2
- data.tar.gz.sig +0 -0
- data/lib/polyrex-feed-reader.rb +37 -7
- metadata +23 -21
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fce7d191fe326ccdad9e5ab8c0eb1e7c2d5b1e88
|
4
|
+
data.tar.gz: 190ec92ee16c04fc026b2c8b7ce6d9162dcb81a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51b09dd9bdaeb9410b2f1fbe507985d1272509c95e60c3682ed614e2e74c073d5355a8c9d3cd6ce47717d5a3fd557f17b02d099ff002db14ad11426ff5158754
|
7
|
+
data.tar.gz: bf69bee4b6742f471b8b135162650d58c4e0a1bbee102a838000e84501f30c96dd43fbbadcde19abd00a86d935b11a7f37c659ea101336ed7f3037d4faaaf8bb
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
b����Cx1��w6��p�~H���n�%��@�|_�f�t��g�C���rQ�Xۺ`jԂ8Q��x�s`%��Y�����?���X��v/����a���l��_�(�۴�{JH�w��A?�(�;9���������0ڑ�
|
1
|
+
����C!�%�!idj`]2����`�d5�^�#��.���,S9��0)a��ŏ[g3�c����r7��D��=��x�;�?�V�+�ݻ�����a�X�J1ڄ
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/polyrex-feed-reader.rb
CHANGED
@@ -80,6 +80,7 @@ class PolyrexFeedReader
|
|
80
80
|
feed.last_accessed = @datetimestamp
|
81
81
|
feed.last_modified = @datetimestamp if feed.last_modified.empty?
|
82
82
|
feed.xhtml = filename
|
83
|
+
feed.url = d.summary[:link]
|
83
84
|
|
84
85
|
items = d.to_h[0..2]
|
85
86
|
|
@@ -133,8 +134,6 @@ class PolyrexFeedReader
|
|
133
134
|
|
134
135
|
def save_latestnews(filename='latest.html')
|
135
136
|
|
136
|
-
|
137
|
-
|
138
137
|
last_modified = @polyrex.summary.last_modified
|
139
138
|
e = @polyrex.xpath 'records/column/records/section/records/'\
|
140
139
|
+ 'feed[summary/last_modified="' + last_modified + '"]'
|
@@ -147,6 +146,7 @@ class PolyrexFeedReader
|
|
147
146
|
|
148
147
|
record = {
|
149
148
|
source: feed.text('summary/title'),
|
149
|
+
source_link: feed.text('summary/url'),
|
150
150
|
title: summary.text('title'),
|
151
151
|
link: summary.text('link'),
|
152
152
|
description: summary.text('description')
|
@@ -154,8 +154,8 @@ class PolyrexFeedReader
|
|
154
154
|
dynarex.create record
|
155
155
|
end
|
156
156
|
|
157
|
-
|
158
|
-
|
157
|
+
filename = 'latest.xml'
|
158
|
+
#=begin
|
159
159
|
dynarex.save(filename) do |xml|
|
160
160
|
a = xml.lines.to_a
|
161
161
|
line1 = a.shift
|
@@ -164,7 +164,7 @@ class PolyrexFeedReader
|
|
164
164
|
a.unshift line1
|
165
165
|
a.join
|
166
166
|
end
|
167
|
-
|
167
|
+
#=end
|
168
168
|
|
169
169
|
xsltproc 'latest.xsl', dynarex.to_xml, filename
|
170
170
|
end
|
@@ -173,6 +173,33 @@ class PolyrexFeedReader
|
|
173
173
|
xsltproc 'opml-feeds.xsl', @polyrex.to_xml, filepath
|
174
174
|
end
|
175
175
|
|
176
|
+
def save_sections()
|
177
|
+
|
178
|
+
@polyrex.records.each do |column|
|
179
|
+
|
180
|
+
column.records.each do |section|
|
181
|
+
|
182
|
+
d = Dynarex.new 'section[title]/feed(source, title, link, description)'
|
183
|
+
d.summary[:title] = section.title
|
184
|
+
|
185
|
+
section.records.each.with_index do |feed, i|
|
186
|
+
|
187
|
+
next if feed.item.length < 1
|
188
|
+
filename = "%s.html#%s" % \
|
189
|
+
[feed.title.to_s.downcase.gsub(/\s/,'').gsub(/\W/,'_'), i]
|
190
|
+
|
191
|
+
h = {source: feed.title, title: feed.item[0].title, link: filename, \
|
192
|
+
description: feed.item[0].description}
|
193
|
+
d.create h
|
194
|
+
puts h.inspect
|
195
|
+
end
|
196
|
+
|
197
|
+
filename = section.title.to_s.downcase.gsub(/\W/,'') + '.xml'
|
198
|
+
d.save filename
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
176
203
|
def save_xml(filepath='feeds.xml')
|
177
204
|
@polyrex.summary.last_modified = @datetimestamp
|
178
205
|
@polyrex.summary.feed_count = @polyrex.xpath \
|
@@ -198,7 +225,7 @@ class PolyrexFeedReader
|
|
198
225
|
|
199
226
|
section.records.each do |feed|
|
200
227
|
|
201
|
-
filename = "%s.xml" % feed.title.downcase.gsub(/\s/,'').gsub(/\W/,'_')
|
228
|
+
filename = "%s.xml" % feed.title.to_s.downcase.gsub(/\s/,'').gsub(/\W/,'_')
|
202
229
|
|
203
230
|
begin
|
204
231
|
yield(feed, filename)
|
@@ -237,7 +264,6 @@ class PolyrexFeedReader
|
|
237
264
|
end
|
238
265
|
end
|
239
266
|
|
240
|
-
|
241
267
|
def xsltproc(xslfilename, xml, filepath='feeds.html')
|
242
268
|
|
243
269
|
lib = File.dirname(__FILE__)
|
@@ -268,5 +294,9 @@ if __FILE__ == $0 then
|
|
268
294
|
pfr.save_xml 'feeds.xml'
|
269
295
|
pfr.save_html 'feeds.html'
|
270
296
|
pfr.save_css 'feeds.css'
|
297
|
+
pfr.save_latestnews 'latest.html'
|
298
|
+
pfr.save_opml 'feeds.opml'
|
299
|
+
pfr.save_sections
|
300
|
+
#pfr.save_latestnews_css 'latest.css'
|
271
301
|
|
272
302
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyrex-feed-reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,26 +10,28 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTE0MDYwNDEzMzMxN1oXDTE1MDYwNDEzMzMxN1owSDESMBAG
|
16
16
|
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
17
|
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
18
|
+
ggEBAMNn/7acCMAxjbr67eSYQ2O72rqm6v5jF8FnA3F1A4qdr2oRkSQD2f0Qm9up
|
19
|
+
/Mp3Ur8mbiFsCMmf6dnq5tw5Xu2wlReauwC0Fog7VnYUi9WUqVZOArOT4XmSowKd
|
20
|
+
L9ErpAT4jfG4yUtADTwI6JoBegkdmdnnKppDJUTE60zr0052y40gNK5LsWVVOC9P
|
21
|
+
Rdlim1UN0n0DKeZfeGQsZQG7GV43VF4v+HQv1+QwuPEqgJysQh3zTZP9RsCcAajL
|
22
|
+
IIhX0o0d1QFjMSRuSsat6aadkoCM3IcJhqD3iERNAHSpWk9TcRXtTlnX1MjndoR4
|
23
|
+
xsYBy04RUfd+lMKHoCP6NWHJxy8CAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
|
24
|
+
DwQEAwIEsDAdBgNVHQ4EFgQUYPyCeuClSJM17tUH1obwBO67rXMwJgYDVR0RBB8w
|
25
|
+
HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
|
26
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEARmx2xp/3
|
27
|
+
9+XTRrX1fRdLsLCM9JPWhUxOrS4Njo/GNGaSaJECIerl5eVCXizFeB/hgODYhoj8
|
28
|
+
NY5Si7ufc9KJ2ikC5EeIKDZyJGNS0BkiKddWsoms0NuDdAuzvCzx7Emkn4zeWcXa
|
29
|
+
1Voya72aSKXcm6wwwq5H28yCWpV6Rw6VtdNcvc1LKcx0dY4HZZFNlSwAuQfifQcy
|
30
|
+
nM6Tmyfp97CKhM72eTw7RMlqtCxpr0gRTJeHRottQwOSijvQZHo/tN6e1THI7doV
|
31
|
+
+A+YtVbKrjUIG+xPXckwZoYIG8tKbiiZKh6zMI0YR593o/yAbeXJ66lh+AAmvTlg
|
32
|
+
vrcPCS9ohES0Qg==
|
31
33
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
34
|
+
date: 2014-06-04 00:00:00.000000000 Z
|
33
35
|
dependencies:
|
34
36
|
- !ruby/object:Gem::Dependency
|
35
37
|
name: polyrex
|
@@ -79,12 +81,12 @@ executables: []
|
|
79
81
|
extensions: []
|
80
82
|
extra_rdoc_files: []
|
81
83
|
files:
|
82
|
-
- lib/polyrex-feed-reader.rb
|
83
|
-
- lib/feeds.xsl
|
84
|
-
- lib/feeds.css
|
85
84
|
- lib/dynarex-feed.xsl
|
85
|
+
- lib/feeds.css
|
86
|
+
- lib/feeds.xsl
|
86
87
|
- lib/latest.xsl
|
87
88
|
- lib/opml-feeds.xsl
|
89
|
+
- lib/polyrex-feed-reader.rb
|
88
90
|
homepage: https://github.com/jrobertson/polyrex-feed-reader
|
89
91
|
licenses:
|
90
92
|
- MIT
|
@@ -105,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
107
|
version: '0'
|
106
108
|
requirements: []
|
107
109
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.2.2
|
109
111
|
signing_key:
|
110
112
|
specification_version: 4
|
111
113
|
summary: Fetches RSS feeds from a Polyrex file and displays each feed summary on an
|
metadata.gz.sig
CHANGED
Binary file
|