extcite 0.3.0 → 0.4.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.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +13 -11
- data/README.md +1 -1
- data/doc/Array.html +205 -0
- data/doc/Configuration.html +296 -0
- data/doc/Extcite.html +1122 -0
- data/doc/Hash.html +380 -0
- data/doc/String.html +289 -0
- data/doc/Textminer.html +601 -0
- data/doc/Textminer/Fetch.html +447 -0
- data/doc/Textminer/Mined.html +509 -0
- data/doc/Textminer/Miner.html +385 -0
- data/doc/Textminer/Request.html +669 -0
- data/doc/Textminer/Response.html +923 -0
- data/doc/_index.html +135 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +139 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +139 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +155 -0
- data/doc/top-level-namespace.html +397 -0
- data/extcite.gemspec +14 -4
- data/lib/extcite.rb +39 -24
- data/lib/extcite/version.rb +1 -1
- metadata +65 -9
data/doc/Hash.html
ADDED
@@ -0,0 +1,380 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Hash
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
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
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!Hash.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (H)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Hash</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Hash
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Hash</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/textminer/link_methods_hash.rb<span class="defines">,<br />
|
98
|
+
lib/textminer/link_methods_hash.rb,<br /> lib/textminer/link_methods_hash.rb,<br /> lib/textminer/link_methods_hash.rb</span>
|
99
|
+
</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
|
107
|
+
<p>Hash methods</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<h2>
|
124
|
+
Instance Method Summary
|
125
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
126
|
+
</h2>
|
127
|
+
|
128
|
+
<ul class="summary">
|
129
|
+
|
130
|
+
<li class="public ">
|
131
|
+
<span class="summary_signature">
|
132
|
+
|
133
|
+
<a href="#links-instance_method" title="#links (instance method)">- (Object) <strong>links</strong>(just_urls = true) </a>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
</span>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
<li class="public ">
|
153
|
+
<span class="summary_signature">
|
154
|
+
|
155
|
+
<a href="#links_pdf-instance_method" title="#links_pdf (instance method)">- (Object) <strong>links_pdf</strong>(just_urls = true) </a>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
</span>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
170
|
+
|
171
|
+
</li>
|
172
|
+
|
173
|
+
|
174
|
+
<li class="public ">
|
175
|
+
<span class="summary_signature">
|
176
|
+
|
177
|
+
<a href="#links_plain-instance_method" title="#links_plain (instance method)">- (Object) <strong>links_plain</strong>(just_urls = true) </a>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
</span>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
|
196
|
+
<li class="public ">
|
197
|
+
<span class="summary_signature">
|
198
|
+
|
199
|
+
<a href="#links_xml-instance_method" title="#links_xml (instance method)">- (Object) <strong>links_xml</strong>(just_urls = true) </a>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
214
|
+
|
215
|
+
</li>
|
216
|
+
|
217
|
+
|
218
|
+
</ul>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
<div id="instance_method_details" class="method_details_list">
|
224
|
+
<h2>Instance Method Details</h2>
|
225
|
+
|
226
|
+
|
227
|
+
<div class="method_details first">
|
228
|
+
<h3 class="signature first" id="links-instance_method">
|
229
|
+
|
230
|
+
- (<tt>Object</tt>) <strong>links</strong>(just_urls = true)
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
</h3><table class="source_code">
|
237
|
+
<tr>
|
238
|
+
<td>
|
239
|
+
<pre class="lines">
|
240
|
+
|
241
|
+
|
242
|
+
3
|
243
|
+
4
|
244
|
+
5
|
245
|
+
6
|
246
|
+
7
|
247
|
+
8
|
248
|
+
9
|
249
|
+
10
|
250
|
+
11
|
251
|
+
12
|
252
|
+
13
|
253
|
+
14
|
254
|
+
15
|
255
|
+
16</pre>
|
256
|
+
</td>
|
257
|
+
<td>
|
258
|
+
<pre class="code"><span class="info file"># File 'lib/textminer/link_methods_hash.rb', line 3</span>
|
259
|
+
|
260
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_links'>links</span><span class='lparen'>(</span><span class='id identifier rubyid_just_urls'>just_urls</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
261
|
+
<span class='kw'>if</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>items</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
262
|
+
<span class='id identifier rubyid_tmp'>tmp</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>link</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
263
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_tmp'>tmp</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
264
|
+
<span class='id identifier rubyid_tmp'>tmp</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
265
|
+
<span class='kw'>else</span>
|
266
|
+
<span class='id identifier rubyid_tmp'>tmp</span> <span class='op'>=</span> <span class='id identifier rubyid_tmp'>tmp</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='rbrace'>}</span>
|
267
|
+
<span class='kw'>end</span>
|
268
|
+
<span class='kw'>else</span>
|
269
|
+
<span class='id identifier rubyid_tmp'>tmp</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>items</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='id identifier rubyid_x'>x</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>link</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='rbrace'>}</span>
|
270
|
+
<span class='kw'>end</span>
|
271
|
+
|
272
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_parse_links'>parse_links</span><span class='lparen'>(</span><span class='id identifier rubyid_tmp'>tmp</span><span class='comma'>,</span> <span class='id identifier rubyid_just_urls'>just_urls</span><span class='rparen'>)</span>
|
273
|
+
<span class='kw'>end</span></pre>
|
274
|
+
</td>
|
275
|
+
</tr>
|
276
|
+
</table>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
<div class="method_details ">
|
280
|
+
<h3 class="signature " id="links_pdf-instance_method">
|
281
|
+
|
282
|
+
- (<tt>Object</tt>) <strong>links_pdf</strong>(just_urls = true)
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
</h3><table class="source_code">
|
289
|
+
<tr>
|
290
|
+
<td>
|
291
|
+
<pre class="lines">
|
292
|
+
|
293
|
+
|
294
|
+
26
|
295
|
+
27
|
296
|
+
28</pre>
|
297
|
+
</td>
|
298
|
+
<td>
|
299
|
+
<pre class="code"><span class="info file"># File 'lib/textminer/link_methods_hash.rb', line 26</span>
|
300
|
+
|
301
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_links_pdf'>links_pdf</span><span class='lparen'>(</span><span class='id identifier rubyid_just_urls'>just_urls</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
302
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_parse_links'>parse_links</span><span class='lparen'>(</span><span class='id identifier rubyid_pull_links'>pull_links</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>^application\/pdf$</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_just_urls'>just_urls</span><span class='rparen'>)</span>
|
303
|
+
<span class='kw'>end</span></pre>
|
304
|
+
</td>
|
305
|
+
</tr>
|
306
|
+
</table>
|
307
|
+
</div>
|
308
|
+
|
309
|
+
<div class="method_details ">
|
310
|
+
<h3 class="signature " id="links_plain-instance_method">
|
311
|
+
|
312
|
+
- (<tt>Object</tt>) <strong>links_plain</strong>(just_urls = true)
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
</h3><table class="source_code">
|
319
|
+
<tr>
|
320
|
+
<td>
|
321
|
+
<pre class="lines">
|
322
|
+
|
323
|
+
|
324
|
+
32
|
325
|
+
33
|
326
|
+
34</pre>
|
327
|
+
</td>
|
328
|
+
<td>
|
329
|
+
<pre class="code"><span class="info file"># File 'lib/textminer/link_methods_hash.rb', line 32</span>
|
330
|
+
|
331
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_links_plain'>links_plain</span><span class='lparen'>(</span><span class='id identifier rubyid_just_urls'>just_urls</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
332
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_parse_links'>parse_links</span><span class='lparen'>(</span><span class='id identifier rubyid_pull_links'>pull_links</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>^application\/plain$|^text\/plain$</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_just_urls'>just_urls</span><span class='rparen'>)</span>
|
333
|
+
<span class='kw'>end</span></pre>
|
334
|
+
</td>
|
335
|
+
</tr>
|
336
|
+
</table>
|
337
|
+
</div>
|
338
|
+
|
339
|
+
<div class="method_details ">
|
340
|
+
<h3 class="signature " id="links_xml-instance_method">
|
341
|
+
|
342
|
+
- (<tt>Object</tt>) <strong>links_xml</strong>(just_urls = true)
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
</h3><table class="source_code">
|
349
|
+
<tr>
|
350
|
+
<td>
|
351
|
+
<pre class="lines">
|
352
|
+
|
353
|
+
|
354
|
+
20
|
355
|
+
21
|
356
|
+
22</pre>
|
357
|
+
</td>
|
358
|
+
<td>
|
359
|
+
<pre class="code"><span class="info file"># File 'lib/textminer/link_methods_hash.rb', line 20</span>
|
360
|
+
|
361
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_links_xml'>links_xml</span><span class='lparen'>(</span><span class='id identifier rubyid_just_urls'>just_urls</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
362
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_parse_links'>parse_links</span><span class='lparen'>(</span><span class='id identifier rubyid_pull_links'>pull_links</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>^application\/xml$|^text\/xml$</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_just_urls'>just_urls</span><span class='rparen'>)</span>
|
363
|
+
<span class='kw'>end</span></pre>
|
364
|
+
</td>
|
365
|
+
</tr>
|
366
|
+
</table>
|
367
|
+
</div>
|
368
|
+
|
369
|
+
</div>
|
370
|
+
|
371
|
+
</div>
|
372
|
+
|
373
|
+
<div id="footer">
|
374
|
+
Generated on Fri Dec 4 20:45:51 2015 by
|
375
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
376
|
+
0.8.7.6 (ruby-2.2.3).
|
377
|
+
</div>
|
378
|
+
|
379
|
+
</body>
|
380
|
+
</html>
|
data/doc/String.html
ADDED
@@ -0,0 +1,289 @@
|
|
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: String
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.24
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "String";
|
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> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">String</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: String
|
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">String</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/extcite/methods_string.rb<span class="defines">,<br />
|
98
|
+
lib/extcite/methods_string.rb</span>
|
99
|
+
</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
|
107
|
+
<p>String methods</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<h2>
|
124
|
+
Instance Method Summary
|
125
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
126
|
+
</h2>
|
127
|
+
|
128
|
+
<ul class="summary">
|
129
|
+
|
130
|
+
<li class="public ">
|
131
|
+
<span class="summary_signature">
|
132
|
+
|
133
|
+
<a href="#make_bib_arxiv-instance_method" title="#make_bib_arxiv (instance method)">#<strong>make_bib_arxiv</strong>(id) ⇒ Object </a>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
</span>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
<li class="public ">
|
153
|
+
<span class="summary_signature">
|
154
|
+
|
155
|
+
<a href="#write_bib-instance_method" title="#write_bib (instance method)">#<strong>write_bib</strong>(file) ⇒ Object </a>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
</span>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
170
|
+
|
171
|
+
</li>
|
172
|
+
|
173
|
+
|
174
|
+
</ul>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<div id="instance_method_details" class="method_details_list">
|
180
|
+
<h2>Instance Method Details</h2>
|
181
|
+
|
182
|
+
|
183
|
+
<div class="method_details first">
|
184
|
+
<h3 class="signature first" id="make_bib_arxiv-instance_method">
|
185
|
+
|
186
|
+
#<strong>make_bib_arxiv</strong>(id) ⇒ <tt>Object</tt>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
</h3><table class="source_code">
|
193
|
+
<tr>
|
194
|
+
<td>
|
195
|
+
<pre class="lines">
|
196
|
+
|
197
|
+
|
198
|
+
14
|
199
|
+
15
|
200
|
+
16
|
201
|
+
17
|
202
|
+
18
|
203
|
+
19
|
204
|
+
20
|
205
|
+
21
|
206
|
+
22
|
207
|
+
23
|
208
|
+
24
|
209
|
+
25
|
210
|
+
26
|
211
|
+
27
|
212
|
+
28
|
213
|
+
29
|
214
|
+
30
|
215
|
+
31</pre>
|
216
|
+
</td>
|
217
|
+
<td>
|
218
|
+
<pre class="code"><span class="info file"># File 'lib/extcite/methods_string.rb', line 14</span>
|
219
|
+
|
220
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_make_bib_arxiv'>make_bib_arxiv</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
|
221
|
+
<span class='comment'># prep xml
|
222
|
+
</span> <span class='id identifier rubyid_xml'>xml</span> <span class='op'>=</span> <span class='const'>Oga</span><span class='period'>.</span><span class='id identifier rubyid_parse_xml'>parse_xml</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='comment'># author = xml.xpath('//author//name')[0].text.downcase.gsub(/\s|\./, '_')
|
223
|
+
</span>
|
224
|
+
<span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_strptime'>strptime</span><span class='lparen'>(</span><span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_xpath'>xpath</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>//updated</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span>
|
225
|
+
|
226
|
+
<span class='comment'># make bib citation
|
227
|
+
</span> <span class='id identifier rubyid_bib'>bib</span> <span class='op'>=</span> <span class='const'>BibTeX</span><span class='op'>::</span><span class='const'>Bibliography</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
228
|
+
<span class='id identifier rubyid_bib'>bib</span> <span class='op'><<</span> <span class='const'>BibTeX</span><span class='op'>::</span><span class='const'>Entry</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbrace'>{</span>
|
229
|
+
<span class='symbol'>:bibtex_type</span> <span class='op'>=></span> <span class='symbol'>:article</span><span class='comma'>,</span>
|
230
|
+
<span class='symbol'>:url</span> <span class='op'>=></span> <span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_xpath'>xpath</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>//entry/id</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='comma'>,</span>
|
231
|
+
<span class='symbol'>:author</span> <span class='op'>=></span> <span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_xpath'>xpath</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>//author//name</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='id identifier rubyid_x'>x</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> and </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span>
|
232
|
+
<span class='symbol'>:eprint</span> <span class='op'>=></span> <span class='id identifier rubyid_id'>id</span><span class='comma'>,</span>
|
233
|
+
<span class='symbol'>:title</span> <span class='op'>=></span> <span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_xpath'>xpath</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>//entry//title</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='comma'>,</span>
|
234
|
+
<span class='symbol'>:year</span> <span class='op'>=></span> <span class='id identifier rubyid_year'>year</span>
|
235
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
236
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_bib'>bib</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
237
|
+
<span class='kw'>end</span></pre>
|
238
|
+
</td>
|
239
|
+
</tr>
|
240
|
+
</table>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
<div class="method_details ">
|
244
|
+
<h3 class="signature " id="write_bib-instance_method">
|
245
|
+
|
246
|
+
#<strong>write_bib</strong>(file) ⇒ <tt>Object</tt>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
</h3><table class="source_code">
|
253
|
+
<tr>
|
254
|
+
<td>
|
255
|
+
<pre class="lines">
|
256
|
+
|
257
|
+
|
258
|
+
6
|
259
|
+
7
|
260
|
+
8
|
261
|
+
9
|
262
|
+
10</pre>
|
263
|
+
</td>
|
264
|
+
<td>
|
265
|
+
<pre class="code"><span class="info file"># File 'lib/extcite/methods_string.rb', line 6</span>
|
266
|
+
|
267
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_write_bib'>write_bib</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
|
268
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>a</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
|
269
|
+
<span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='kw'>self</span>
|
270
|
+
<span class='kw'>end</span>
|
271
|
+
<span class='kw'>end</span></pre>
|
272
|
+
</td>
|
273
|
+
</tr>
|
274
|
+
</table>
|
275
|
+
</div>
|
276
|
+
|
277
|
+
</div>
|
278
|
+
|
279
|
+
</div>
|
280
|
+
|
281
|
+
<div id="footer">
|
282
|
+
Generated on Wed Apr 15 16:00:31 2020 by
|
283
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
284
|
+
0.9.24 (ruby-2.7.1).
|
285
|
+
</div>
|
286
|
+
|
287
|
+
</div>
|
288
|
+
</body>
|
289
|
+
</html>
|