html2rss 0.4.1 → 0.5.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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -0
  3. data/CHANGELOG.md +10 -1
  4. data/Gemfile.lock +3 -1
  5. data/README.md +35 -2
  6. data/html2rss.gemspec +1 -0
  7. data/lib/html2rss/attribute_post_processors/sanitize_html.rb +1 -3
  8. data/lib/html2rss/config.rb +4 -0
  9. data/lib/html2rss/item.rb +7 -4
  10. data/lib/html2rss/utils.rb +8 -0
  11. data/lib/html2rss/version.rb +1 -1
  12. metadata +15 -35
  13. data/docs/Html2rss.html +0 -353
  14. data/docs/Html2rss/AttributePostProcessors.html +0 -203
  15. data/docs/Html2rss/AttributePostProcessors/HtmlToMarkdown.html +0 -325
  16. data/docs/Html2rss/AttributePostProcessors/ParseTime.html +0 -326
  17. data/docs/Html2rss/AttributePostProcessors/ParseUri.html +0 -314
  18. data/docs/Html2rss/AttributePostProcessors/SanitizeHtml.html +0 -367
  19. data/docs/Html2rss/AttributePostProcessors/Substring.html +0 -321
  20. data/docs/Html2rss/AttributePostProcessors/Template.html +0 -336
  21. data/docs/Html2rss/Config.html +0 -847
  22. data/docs/Html2rss/FeedBuilder.html +0 -295
  23. data/docs/Html2rss/Item.html +0 -660
  24. data/docs/Html2rss/ItemExtractors.html +0 -297
  25. data/docs/Html2rss/ItemExtractors/Attribute.html +0 -317
  26. data/docs/Html2rss/ItemExtractors/CurrentTime.html +0 -297
  27. data/docs/Html2rss/ItemExtractors/Href.html +0 -319
  28. data/docs/Html2rss/ItemExtractors/Html.html +0 -314
  29. data/docs/Html2rss/ItemExtractors/Static.html +0 -301
  30. data/docs/Html2rss/ItemExtractors/Text.html +0 -312
  31. data/docs/Html2rss/Utils.html +0 -200
  32. data/docs/Html2rss/Utils/IndifferentAccessHash.html +0 -142
  33. data/docs/_index.html +0 -307
  34. data/docs/class_list.html +0 -51
  35. data/docs/css/common.css +0 -1
  36. data/docs/css/full_list.css +0 -58
  37. data/docs/css/style.css +0 -496
  38. data/docs/file.README.html +0 -135
  39. data/docs/file_list.html +0 -56
  40. data/docs/frames.html +0 -17
  41. data/docs/index.html +0 -135
  42. data/docs/js/app.js +0 -303
  43. data/docs/js/full_list.js +0 -216
  44. data/docs/js/jquery.js +0 -4
  45. data/docs/method_list.html +0 -467
  46. data/docs/top-level-namespace.html +0 -110
@@ -1,326 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: Html2rss::AttributePostProcessors::ParseTime
8
-
9
- &mdash; Documentation by YARD 0.9.20
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "Html2rss::AttributePostProcessors::ParseTime";
19
- relpath = '../../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../../_index.html">Index (P)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../../Html2rss.html" title="Html2rss (module)">Html2rss</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../AttributePostProcessors.html" title="Html2rss::AttributePostProcessors (module)">AttributePostProcessors</a></span></span>
41
- &raquo;
42
- <span class="title">ParseTime</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Class: Html2rss::AttributePostProcessors::ParseTime
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">Object</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">Html2rss::AttributePostProcessors::ParseTime</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- <dl>
96
- <dt>Defined in:</dt>
97
- <dd>lib/html2rss/attribute_post_processors/parse_time.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>Returns the <a href="https://www.w3.org/Protocols/rfc822" target="_parent" title="/ RFC822">/ RFC822</a> representation of a time.</p>
106
-
107
- <p>Imagine this HTML structure:</p>
108
-
109
- <pre class="code ruby"><code class="ruby">&lt;p&gt;Published on &lt;span&gt;2019-07-02&lt;/span&gt;&lt;/p&gt;
110
- </code></pre>
111
-
112
- <p>YAML usage example:</p>
113
-
114
- <pre class="code ruby"><code class="ruby">selectors:
115
- description:
116
- selector: span
117
- post_process:
118
- name: &#39;parse_time&#39;
119
- </code></pre>
120
-
121
- <p>Would return:</p>
122
-
123
- <pre class="code ruby"><code class="ruby"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Tue, 02 Jul 2019 00:00:00 +0200</span><span class='tstring_end'>&quot;</span></span>
124
- </code></pre>
125
-
126
- <p>It uses <a href="https://ruby-doc.org/stdlib-2.5.3/libdoc/time/rdoc/Time.html#method-c-parse" target="_parent" title="Time.parse">Time.parse</a>. As of now it ignores time zones and always falls back to the UTC time zone.</p>
127
-
128
-
129
- </div>
130
- </div>
131
- <div class="tags">
132
-
133
-
134
- </div>
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
- <h2>
143
- Instance Method Summary
144
- <small><a href="#" class="summary_toggle">collapse</a></small>
145
- </h2>
146
-
147
- <ul class="summary">
148
-
149
- <li class="public ">
150
- <span class="summary_signature">
151
-
152
- <a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong> &#x21d2; String </a>
153
-
154
-
155
-
156
- </span>
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
- <span class="summary_desc"><div class='inline'>
167
- <p>Rfc822 formatted time.</p>
168
- </div></span>
169
-
170
- </li>
171
-
172
-
173
- <li class="public ">
174
- <span class="summary_signature">
175
-
176
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(value, env) &#x21d2; ParseTime </a>
177
-
178
-
179
-
180
- </span>
181
-
182
-
183
- <span class="note title constructor">constructor</span>
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
- <span class="summary_desc"><div class='inline'>
193
- <p>A new instance of ParseTime.</p>
194
- </div></span>
195
-
196
- </li>
197
-
198
-
199
- </ul>
200
-
201
-
202
- <div id="constructor_details" class="method_details_list">
203
- <h2>Constructor Details</h2>
204
-
205
- <div class="method_details first">
206
- <h3 class="signature first" id="initialize-instance_method">
207
-
208
- #<strong>initialize</strong>(value, env) &#x21d2; <tt><span class='object_link'><a href="" title="Html2rss::AttributePostProcessors::ParseTime (class)">ParseTime</a></span></tt>
209
-
210
-
211
-
212
-
213
-
214
- </h3><div class="docstring">
215
- <div class="discussion">
216
-
217
- <p>Returns a new instance of ParseTime</p>
218
-
219
-
220
- </div>
221
- </div>
222
- <div class="tags">
223
-
224
-
225
- </div><table class="source_code">
226
- <tr>
227
- <td>
228
- <pre class="lines">
229
-
230
-
231
- 27
232
- 28
233
- 29
234
- 30</pre>
235
- </td>
236
- <td>
237
- <pre class="code"><span class="info file"># File 'lib/html2rss/attribute_post_processors/parse_time.rb', line 27</span>
238
-
239
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
240
- <span class='ivar'>@value</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
241
- <span class='ivar'>@time_zone</span> <span class='op'>=</span> <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='symbol'>:config</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_time_zone'>time_zone</span>
242
- <span class='kw'>end</span></pre>
243
- </td>
244
- </tr>
245
- </table>
246
- </div>
247
-
248
- </div>
249
-
250
-
251
- <div id="instance_method_details" class="method_details_list">
252
- <h2>Instance Method Details</h2>
253
-
254
-
255
- <div class="method_details first">
256
- <h3 class="signature first" id="get-instance_method">
257
-
258
- #<strong>get</strong> &#x21d2; <tt>String</tt>
259
-
260
-
261
-
262
-
263
-
264
- </h3><div class="docstring">
265
- <div class="discussion">
266
-
267
- <p>Returns rfc822 formatted time</p>
268
-
269
-
270
- </div>
271
- </div>
272
- <div class="tags">
273
-
274
- <p class="tag_title">Returns:</p>
275
- <ul class="return">
276
-
277
- <li>
278
-
279
-
280
- <span class='type'>(<tt>String</tt>)</span>
281
-
282
-
283
-
284
- &mdash;
285
- <div class='inline'>
286
- <p>rfc822 formatted time</p>
287
- </div>
288
-
289
- </li>
290
-
291
- </ul>
292
-
293
- </div><table class="source_code">
294
- <tr>
295
- <td>
296
- <pre class="lines">
297
-
298
-
299
- 34
300
- 35
301
- 36</pre>
302
- </td>
303
- <td>
304
- <pre class="code"><span class="info file"># File 'lib/html2rss/attribute_post_processors/parse_time.rb', line 34</span>
305
-
306
- <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span>
307
- <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_use_zone'>use_zone</span><span class='lparen'>(</span><span class='ivar'>@time_zone</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='ivar'>@value</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_rfc822'>rfc822</span> <span class='rbrace'>}</span>
308
- <span class='kw'>end</span></pre>
309
- </td>
310
- </tr>
311
- </table>
312
- </div>
313
-
314
- </div>
315
-
316
- </div>
317
-
318
- <div id="footer">
319
- Generated on Wed Sep 18 12:52:16 2019 by
320
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
321
- 0.9.20 (ruby-2.6.3).
322
- </div>
323
-
324
- </div>
325
- </body>
326
- </html>
@@ -1,314 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: Html2rss::AttributePostProcessors::ParseUri
8
-
9
- &mdash; Documentation by YARD 0.9.20
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "Html2rss::AttributePostProcessors::ParseUri";
19
- relpath = '../../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../../_index.html">Index (P)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../../Html2rss.html" title="Html2rss (module)">Html2rss</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../AttributePostProcessors.html" title="Html2rss::AttributePostProcessors (module)">AttributePostProcessors</a></span></span>
41
- &raquo;
42
- <span class="title">ParseUri</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Class: Html2rss::AttributePostProcessors::ParseUri
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">Object</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">Html2rss::AttributePostProcessors::ParseUri</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- <dl>
96
- <dt>Defined in:</dt>
97
- <dd>lib/html2rss/attribute_post_processors/parse_uri.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>Returns the URI as String.</p>
106
-
107
- <p>Imagine this HTML structure:</p>
108
-
109
- <pre class="code ruby"><code class="ruby">&lt;span&gt;http://why-not-use-a-link.uh&lt;/span&gt;
110
- </code></pre>
111
-
112
- <p>YAML usage example:</p>
113
-
114
- <pre class="code ruby"><code class="ruby">selectors:
115
- link:
116
- selector: span
117
- extractor: text
118
- post_process:
119
- name: parse_uri
120
- </code></pre>
121
-
122
- <p>Would return:</p>
123
-
124
- <pre class="code ruby"><code class="ruby"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>http://why-not-use-a-link.uh</span><span class='tstring_end'>&#39;</span></span>
125
- </code></pre>
126
-
127
-
128
- </div>
129
- </div>
130
- <div class="tags">
131
-
132
-
133
- </div>
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
- <h2>
142
- Instance Method Summary
143
- <small><a href="#" class="summary_toggle">collapse</a></small>
144
- </h2>
145
-
146
- <ul class="summary">
147
-
148
- <li class="public ">
149
- <span class="summary_signature">
150
-
151
- <a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong> &#x21d2; String </a>
152
-
153
-
154
-
155
- </span>
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
- <span class="summary_desc"><div class='inline'></div></span>
166
-
167
- </li>
168
-
169
-
170
- <li class="public ">
171
- <span class="summary_signature">
172
-
173
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(value, _env) &#x21d2; ParseUri </a>
174
-
175
-
176
-
177
- </span>
178
-
179
-
180
- <span class="note title constructor">constructor</span>
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
- <span class="summary_desc"><div class='inline'>
190
- <p>A new instance of ParseUri.</p>
191
- </div></span>
192
-
193
- </li>
194
-
195
-
196
- </ul>
197
-
198
-
199
- <div id="constructor_details" class="method_details_list">
200
- <h2>Constructor Details</h2>
201
-
202
- <div class="method_details first">
203
- <h3 class="signature first" id="initialize-instance_method">
204
-
205
- #<strong>initialize</strong>(value, _env) &#x21d2; <tt><span class='object_link'><a href="" title="Html2rss::AttributePostProcessors::ParseUri (class)">ParseUri</a></span></tt>
206
-
207
-
208
-
209
-
210
-
211
- </h3><div class="docstring">
212
- <div class="discussion">
213
-
214
- <p>Returns a new instance of ParseUri</p>
215
-
216
-
217
- </div>
218
- </div>
219
- <div class="tags">
220
-
221
-
222
- </div><table class="source_code">
223
- <tr>
224
- <td>
225
- <pre class="lines">
226
-
227
-
228
- 21
229
- 22
230
- 23</pre>
231
- </td>
232
- <td>
233
- <pre class="code"><span class="info file"># File 'lib/html2rss/attribute_post_processors/parse_uri.rb', line 21</span>
234
-
235
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid__env'>_env</span><span class='rparen'>)</span>
236
- <span class='ivar'>@value</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
237
- <span class='kw'>end</span></pre>
238
- </td>
239
- </tr>
240
- </table>
241
- </div>
242
-
243
- </div>
244
-
245
-
246
- <div id="instance_method_details" class="method_details_list">
247
- <h2>Instance Method Details</h2>
248
-
249
-
250
- <div class="method_details first">
251
- <h3 class="signature first" id="get-instance_method">
252
-
253
- #<strong>get</strong> &#x21d2; <tt>String</tt>
254
-
255
-
256
-
257
-
258
-
259
- </h3><div class="docstring">
260
- <div class="discussion">
261
-
262
-
263
- </div>
264
- </div>
265
- <div class="tags">
266
-
267
- <p class="tag_title">Returns:</p>
268
- <ul class="return">
269
-
270
- <li>
271
-
272
-
273
- <span class='type'>(<tt>String</tt>)</span>
274
-
275
-
276
-
277
- </li>
278
-
279
- </ul>
280
-
281
- </div><table class="source_code">
282
- <tr>
283
- <td>
284
- <pre class="lines">
285
-
286
-
287
- 27
288
- 28
289
- 29</pre>
290
- </td>
291
- <td>
292
- <pre class="code"><span class="info file"># File 'lib/html2rss/attribute_post_processors/parse_uri.rb', line 27</span>
293
-
294
- <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span>
295
- <span class='const'>URI</span><span class='lparen'>(</span><span class='ivar'>@value</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
296
- <span class='kw'>end</span></pre>
297
- </td>
298
- </tr>
299
- </table>
300
- </div>
301
-
302
- </div>
303
-
304
- </div>
305
-
306
- <div id="footer">
307
- Generated on Wed Sep 18 12:52:16 2019 by
308
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
309
- 0.9.20 (ruby-2.6.3).
310
- </div>
311
-
312
- </div>
313
- </body>
314
- </html>