html2rss 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
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,312 +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::Text
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::Text";
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 (T)</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">Text</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::Text
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::Text</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/text.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>Return the text of the attribute. This is the default extractor used, when no extractor is explicitly given.</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: text
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'>Lorem ipsum dolor ...</span><span class='tstring_end'>&#39;</span></span>
123
- </code></pre>
124
-
125
-
126
- </div>
127
- </div>
128
- <div class="tags">
129
-
130
-
131
- </div>
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
- <h2>
140
- Instance Method Summary
141
- <small><a href="#" class="summary_toggle">collapse</a></small>
142
- </h2>
143
-
144
- <ul class="summary">
145
-
146
- <li class="public ">
147
- <span class="summary_signature">
148
-
149
- <a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong> &#x21d2; String </a>
150
-
151
-
152
-
153
- </span>
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
- <span class="summary_desc"><div class='inline'></div></span>
164
-
165
- </li>
166
-
167
-
168
- <li class="public ">
169
- <span class="summary_signature">
170
-
171
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(xml, options) &#x21d2; Text </a>
172
-
173
-
174
-
175
- </span>
176
-
177
-
178
- <span class="note title constructor">constructor</span>
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
- <span class="summary_desc"><div class='inline'>
188
- <p>A new instance of Text.</p>
189
- </div></span>
190
-
191
- </li>
192
-
193
-
194
- </ul>
195
-
196
-
197
- <div id="constructor_details" class="method_details_list">
198
- <h2>Constructor Details</h2>
199
-
200
- <div class="method_details first">
201
- <h3 class="signature first" id="initialize-instance_method">
202
-
203
- #<strong>initialize</strong>(xml, options) &#x21d2; <tt><span class='object_link'><a href="" title="Html2rss::ItemExtractors::Text (class)">Text</a></span></tt>
204
-
205
-
206
-
207
-
208
-
209
- </h3><div class="docstring">
210
- <div class="discussion">
211
-
212
- <p>Returns a new instance of Text</p>
213
-
214
-
215
- </div>
216
- </div>
217
- <div class="tags">
218
-
219
-
220
- </div><table class="source_code">
221
- <tr>
222
- <td>
223
- <pre class="lines">
224
-
225
-
226
- 21
227
- 22
228
- 23</pre>
229
- </td>
230
- <td>
231
- <pre class="code"><span class="info file"># File 'lib/html2rss/item_extractors/text.rb', line 21</span>
232
-
233
- <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>
234
- <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>
235
- <span class='kw'>end</span></pre>
236
- </td>
237
- </tr>
238
- </table>
239
- </div>
240
-
241
- </div>
242
-
243
-
244
- <div id="instance_method_details" class="method_details_list">
245
- <h2>Instance Method Details</h2>
246
-
247
-
248
- <div class="method_details first">
249
- <h3 class="signature first" id="get-instance_method">
250
-
251
- #<strong>get</strong> &#x21d2; <tt>String</tt>
252
-
253
-
254
-
255
-
256
-
257
- </h3><div class="docstring">
258
- <div class="discussion">
259
-
260
-
261
- </div>
262
- </div>
263
- <div class="tags">
264
-
265
- <p class="tag_title">Returns:</p>
266
- <ul class="return">
267
-
268
- <li>
269
-
270
-
271
- <span class='type'>(<tt>String</tt>)</span>
272
-
273
-
274
-
275
- </li>
276
-
277
- </ul>
278
-
279
- </div><table class="source_code">
280
- <tr>
281
- <td>
282
- <pre class="lines">
283
-
284
-
285
- 27
286
- 28
287
- 29</pre>
288
- </td>
289
- <td>
290
- <pre class="code"><span class="info file"># File 'lib/html2rss/item_extractors/text.rb', line 27</span>
291
-
292
- <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span>
293
- <span class='ivar'>@element</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
294
- <span class='kw'>end</span></pre>
295
- </td>
296
- </tr>
297
- </table>
298
- </div>
299
-
300
- </div>
301
-
302
- </div>
303
-
304
- <div id="footer">
305
- Generated on Wed Sep 18 12:52:16 2019 by
306
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
307
- 0.9.20 (ruby-2.6.3).
308
- </div>
309
-
310
- </div>
311
- </body>
312
- </html>
@@ -1,200 +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
- Module: Html2rss::Utils
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::Utils";
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 (U)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../Html2rss.html" title="Html2rss (module)">Html2rss</a></span></span>
41
- &raquo;
42
- <span class="title">Utils</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>Module: Html2rss::Utils
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
- <dl>
80
- <dt>Defined in:</dt>
81
- <dd>lib/html2rss/utils.rb</dd>
82
- </dl>
83
-
84
- </div>
85
-
86
- <h2>Defined Under Namespace</h2>
87
- <p class="children">
88
-
89
-
90
-
91
-
92
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Utils/IndifferentAccessHash.html" title="Html2rss::Utils::IndifferentAccessHash (class)">IndifferentAccessHash</a></span>
93
-
94
-
95
- </p>
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
- <h2>
105
- Class Method Summary
106
- <small><a href="#" class="summary_toggle">collapse</a></small>
107
- </h2>
108
-
109
- <ul class="summary">
110
-
111
- <li class="public ">
112
- <span class="summary_signature">
113
-
114
- <a href="#build_absolute_url_from_relative-class_method" title="build_absolute_url_from_relative (class method)">.<strong>build_absolute_url_from_relative</strong>(url, channel_url) &#x21d2; Object </a>
115
-
116
-
117
-
118
- </span>
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
- <span class="summary_desc"><div class='inline'></div></span>
129
-
130
- </li>
131
-
132
-
133
- </ul>
134
-
135
-
136
-
137
-
138
- <div id="class_method_details" class="method_details_list">
139
- <h2>Class Method Details</h2>
140
-
141
-
142
- <div class="method_details first">
143
- <h3 class="signature first" id="build_absolute_url_from_relative-class_method">
144
-
145
- .<strong>build_absolute_url_from_relative</strong>(url, channel_url) &#x21d2; <tt>Object</tt>
146
-
147
-
148
-
149
-
150
-
151
- </h3><table class="source_code">
152
- <tr>
153
- <td>
154
- <pre class="lines">
155
-
156
-
157
- 12
158
- 13
159
- 14
160
- 15
161
- 16
162
- 17
163
- 18
164
- 19
165
- 20
166
- 21
167
- 22</pre>
168
- </td>
169
- <td>
170
- <pre class="code"><span class="info file"># File 'lib/html2rss/utils.rb', line 12</span>
171
-
172
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_build_absolute_url_from_relative'>build_absolute_url_from_relative</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_channel_url'>channel_url</span><span class='rparen'>)</span>
173
- <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='const'>URI</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
174
-
175
- <span class='kw'>return</span> <span class='id identifier rubyid_url'>url</span> <span class='kw'>if</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_absolute?'>absolute?</span>
176
-
177
- <span class='const'>URI</span><span class='lparen'>(</span><span class='id identifier rubyid_channel_url'>channel_url</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_uri'>uri</span><span class='op'>|</span>
178
- <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
179
- <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span>
180
- <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_fragment'>fragment</span> <span class='kw'>if</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_fragment'>fragment</span>
181
- <span class='kw'>end</span>
182
- <span class='kw'>end</span></pre>
183
- </td>
184
- </tr>
185
- </table>
186
- </div>
187
-
188
- </div>
189
-
190
- </div>
191
-
192
- <div id="footer">
193
- Generated on Wed Sep 18 12:52:16 2019 by
194
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
195
- 0.9.20 (ruby-2.6.3).
196
- </div>
197
-
198
- </div>
199
- </body>
200
- </html>