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,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::ItemExtractors::Html
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::ItemExtractors::Html";
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 (H)</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="../ItemExtractors.html" title="Html2rss::ItemExtractors (module)">ItemExtractors</a></span></span>
41
- &raquo;
42
- <span class="title">Html</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::ItemExtractors::Html
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::ItemExtractors::Html</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/item_extractors/html.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>Return the HTML of the attribute.</p>
106
-
107
- <p>Imagine this HTML structure:</p>
108
-
109
- <pre class="code ruby"><code class="ruby">&lt;p&gt;Lorem &lt;b&gt;ipsum&lt;/b&gt; dolor ...&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: p
117
- extractor: html
118
- </code></pre>
119
-
120
- <p>Would return:</p>
121
-
122
- <pre class="code ruby"><code class="ruby"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>&lt;p&gt;Lorem &lt;b&gt;ipsum&lt;/b&gt; dolor ...&lt;/p&gt;</span><span class='tstring_end'>&#39;</span></span>
123
- </code></pre>
124
-
125
- <p>Always make sure to sanitize the HTML during post processing with <a href="rdoc-ref:Html2rss::AttributePostProcessors::SanitizeHtml">AttributePostProcessors::SanitizeHtml</a>.</p>
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>(xml, options) &#x21d2; Html </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 Html.</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>(xml, options) &#x21d2; <tt><span class='object_link'><a href="" title="Html2rss::ItemExtractors::Html (class)">Html</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 Html</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
- 23
229
- 24
230
- 25</pre>
231
- </td>
232
- <td>
233
- <pre class="code"><span class="info file"># File 'lib/html2rss/item_extractors/html.rb', line 23</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_xml'>xml</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
236
- <span class='ivar'>@element</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../ItemExtractors.html" title="Html2rss::ItemExtractors (module)">ItemExtractors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_element'><span class='object_link'><a href="../ItemExtractors.html#element-class_method" title="Html2rss::ItemExtractors.element (method)">element</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_xml'>xml</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</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
- 29
288
- 30
289
- 31</pre>
290
- </td>
291
- <td>
292
- <pre class="code"><span class="info file"># File 'lib/html2rss/item_extractors/html.rb', line 29</span>
293
-
294
- <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span>
295
- <span class='ivar'>@element</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>
@@ -1,301 +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::ItemExtractors::Static
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::ItemExtractors::Static";
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 (S)</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="../ItemExtractors.html" title="Html2rss::ItemExtractors (module)">ItemExtractors</a></span></span>
41
- &raquo;
42
- <span class="title">Static</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::ItemExtractors::Static
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::ItemExtractors::Static</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/item_extractors/static.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>YAML usage example:</p>
106
-
107
- <pre class="code ruby"><code class="ruby">selectors:
108
- autor:
109
- extractor: static
110
- static: Foobar
111
- </code></pre>
112
-
113
- <p>Would return:</p>
114
-
115
- <pre class="code ruby"><code class="ruby"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Foobar</span><span class='tstring_end'>&#39;</span></span>
116
- </code></pre>
117
-
118
-
119
- </div>
120
- </div>
121
- <div class="tags">
122
-
123
-
124
- </div>
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
- <h2>
133
- Instance Method Summary
134
- <small><a href="#" class="summary_toggle">collapse</a></small>
135
- </h2>
136
-
137
- <ul class="summary">
138
-
139
- <li class="public ">
140
- <span class="summary_signature">
141
-
142
- <a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong> &#x21d2; Object </a>
143
-
144
-
145
-
146
- </span>
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
- <span class="summary_desc"><div class='inline'>
157
- <p>Returns what <a href="'static'">options</a> holds.</p>
158
- </div></span>
159
-
160
- </li>
161
-
162
-
163
- <li class="public ">
164
- <span class="summary_signature">
165
-
166
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(_xml, options) &#x21d2; Static </a>
167
-
168
-
169
-
170
- </span>
171
-
172
-
173
- <span class="note title constructor">constructor</span>
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
- <span class="summary_desc"><div class='inline'>
183
- <p>A new instance of Static.</p>
184
- </div></span>
185
-
186
- </li>
187
-
188
-
189
- </ul>
190
-
191
-
192
- <div id="constructor_details" class="method_details_list">
193
- <h2>Constructor Details</h2>
194
-
195
- <div class="method_details first">
196
- <h3 class="signature first" id="initialize-instance_method">
197
-
198
- #<strong>initialize</strong>(_xml, options) &#x21d2; <tt><span class='object_link'><a href="" title="Html2rss::ItemExtractors::Static (class)">Static</a></span></tt>
199
-
200
-
201
-
202
-
203
-
204
- </h3><div class="docstring">
205
- <div class="discussion">
206
-
207
- <p>Returns a new instance of Static</p>
208
-
209
-
210
- </div>
211
- </div>
212
- <div class="tags">
213
-
214
-
215
- </div><table class="source_code">
216
- <tr>
217
- <td>
218
- <pre class="lines">
219
-
220
-
221
- 14
222
- 15
223
- 16</pre>
224
- </td>
225
- <td>
226
- <pre class="code"><span class="info file"># File 'lib/html2rss/item_extractors/static.rb', line 14</span>
227
-
228
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid__xml'>_xml</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
229
- <span class='ivar'>@options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
230
- <span class='kw'>end</span></pre>
231
- </td>
232
- </tr>
233
- </table>
234
- </div>
235
-
236
- </div>
237
-
238
-
239
- <div id="instance_method_details" class="method_details_list">
240
- <h2>Instance Method Details</h2>
241
-
242
-
243
- <div class="method_details first">
244
- <h3 class="signature first" id="get-instance_method">
245
-
246
- #<strong>get</strong> &#x21d2; <tt>Object</tt>
247
-
248
-
249
-
250
-
251
-
252
- </h3><div class="docstring">
253
- <div class="discussion">
254
-
255
- <p>Returns what <a href="'static'">options</a> holds.</p>
256
-
257
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>static:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Foobar</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span>
258
- <span class='const'><span class='object_link'><a href="" title="Html2rss::ItemExtractors::Static (class)">Static</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Html2rss::ItemExtractors::Static#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_xml'>xml</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
259
- <span class='comment'># =&gt; &#39;Foobar&#39;
260
- </span></code></pre>
261
-
262
-
263
- </div>
264
- </div>
265
- <div class="tags">
266
-
267
-
268
- </div><table class="source_code">
269
- <tr>
270
- <td>
271
- <pre class="lines">
272
-
273
-
274
- 23
275
- 24
276
- 25</pre>
277
- </td>
278
- <td>
279
- <pre class="code"><span class="info file"># File 'lib/html2rss/item_extractors/static.rb', line 23</span>
280
-
281
- <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span>
282
- <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>static</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
283
- <span class='kw'>end</span></pre>
284
- </td>
285
- </tr>
286
- </table>
287
- </div>
288
-
289
- </div>
290
-
291
- </div>
292
-
293
- <div id="footer">
294
- Generated on Wed Sep 18 12:52:16 2019 by
295
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
296
- 0.9.20 (ruby-2.6.3).
297
- </div>
298
-
299
- </div>
300
- </body>
301
- </html>