epub-parser 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/.gitignore +1 -0
  2. data/MIT-LICENSE +1 -1
  3. data/README +7 -0
  4. data/lib/epub/book.rb +7 -1
  5. data/lib/epub/constants.rb +29 -0
  6. data/lib/epub/parser.rb +11 -3
  7. data/lib/epub/parser/publication.rb +14 -3
  8. data/lib/epub/parser/version.rb +1 -1
  9. data/lib/epub/publication/package.rb +6 -1
  10. data/lib/epub/publication/package/guide.rb +37 -2
  11. data/lib/epub/publication/package/manifest.rb +41 -4
  12. data/test/fixtures/book.epub +0 -0
  13. data/test/fixtures/book/OPS//343/203/253/343/203/274/343/203/210/343/203/225/343/202/241/343/202/244/343/203/253.opf +12 -2
  14. data/test/test_parser_publication.rb +73 -4
  15. metadata +26 -73
  16. data/doc/EPUB.html +0 -143
  17. data/doc/EPUB/Book.html +0 -616
  18. data/doc/EPUB/Constants.html +0 -130
  19. data/doc/EPUB/Constants/Type.html +0 -118
  20. data/doc/EPUB/ContentDocument.html +0 -108
  21. data/doc/EPUB/ContentDocument/Navigation.html +0 -673
  22. data/doc/EPUB/ContentDocument/Navigation/Nav.html +0 -563
  23. data/doc/EPUB/ContentDocument/Navigation/Nav/Ol.html +0 -285
  24. data/doc/EPUB/ContentDocument/Navigation/Nav/Ol/A.html +0 -354
  25. data/doc/EPUB/ContentDocument/Navigation/Nav/Ol/Span.html +0 -354
  26. data/doc/EPUB/OCF.html +0 -135
  27. data/doc/EPUB/OCF/Container.html +0 -358
  28. data/doc/EPUB/OCF/Container/Rootfile.html +0 -257
  29. data/doc/EPUB/OCF/Encryption.html +0 -111
  30. data/doc/EPUB/OCF/Manifest.html +0 -111
  31. data/doc/EPUB/OCF/Metadata.html +0 -111
  32. data/doc/EPUB/OCF/Rights.html +0 -111
  33. data/doc/EPUB/OCF/Signatures.html +0 -111
  34. data/doc/EPUB/Parser.html +0 -448
  35. data/doc/EPUB/Parser/ContentDocument.html +0 -531
  36. data/doc/EPUB/Parser/OCF.html +0 -635
  37. data/doc/EPUB/Parser/Publication.html +0 -640
  38. data/doc/EPUB/Publication.html +0 -108
  39. data/doc/EPUB/Publication/Package.html +0 -751
  40. data/doc/EPUB/Publication/Package/Bindings.html +0 -267
  41. data/doc/EPUB/Publication/Package/Bindings/MediaType.html +0 -257
  42. data/doc/EPUB/Publication/Package/Guide.html +0 -111
  43. data/doc/EPUB/Publication/Package/Manifest.html +0 -578
  44. data/doc/EPUB/Publication/Package/Manifest/Item.html +0 -669
  45. data/doc/EPUB/Publication/Package/Metadata.html +0 -257
  46. data/doc/EPUB/Publication/Package/Spine.html +0 -755
  47. data/doc/EPUB/Publication/Package/Spine/Itemref.html +0 -558
  48. data/doc/EPUB/Type.html +0 -118
  49. data/doc/_index.html +0 -422
  50. data/doc/class_list.html +0 -47
  51. data/doc/css/common.css +0 -1
  52. data/doc/css/full_list.css +0 -55
  53. data/doc/css/style.css +0 -322
  54. data/doc/file.README.html +0 -76
  55. data/doc/file_list.html +0 -49
  56. data/doc/frames.html +0 -13
  57. data/doc/index.html +0 -76
  58. data/doc/js/app.js +0 -205
  59. data/doc/js/full_list.js +0 -167
  60. data/doc/js/jquery.js +0 -16
  61. data/doc/method_list.html +0 -902
  62. data/doc/top-level-namespace.html +0 -103
@@ -1,358 +0,0 @@
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: EPUB::OCF::Container
8
-
9
- &mdash; Documentation by YARD 0.7.4
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- relpath = '../..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../../_index.html">Index (C)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../../EPUB.html" title="EPUB (module)">EPUB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../OCF.html" title="EPUB::OCF (class)">OCF</a></span></span>
38
- &raquo;
39
- <span class="title">Container</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Class: EPUB::OCF::Container
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
- <dt class="r1">Inherits:</dt>
68
- <dd class="r1">
69
- <span class="inheritName">Object</span>
70
-
71
- <ul class="fullTree">
72
- <li>Object</li>
73
-
74
- <li class="next">EPUB::OCF::Container</li>
75
-
76
- </ul>
77
- <a href="#" class="inheritanceTree">show all</a>
78
-
79
- </dd>
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
- <dt class="r2 last">Defined in:</dt>
90
- <dd class="r2 last">lib/epub/ocf/container.rb</dd>
91
-
92
- </dl>
93
- <div class="clear"></div>
94
-
95
- <h2>Defined Under Namespace</h2>
96
- <p class="children">
97
-
98
-
99
-
100
-
101
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Container/Rootfile.html" title="EPUB::OCF::Container::Rootfile (class)">Rootfile</a></span>
102
-
103
-
104
- </p>
105
-
106
- <h2>Constant Summary</h2>
107
-
108
- <dl class="constants">
109
-
110
- <dt id="FILE-constant" class="">FILE =
111
-
112
- </dt>
113
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>container.xml</span><span class='tstring_end'>'</span></span></pre></dd>
114
-
115
- </dl>
116
-
117
-
118
-
119
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
120
- <ul class="summary">
121
-
122
- <li class="public ">
123
- <span class="summary_signature">
124
-
125
- <a href="#rootfiles-instance_method" title="#rootfiles (instance method)">- (Object) <strong>rootfiles</strong> </a>
126
-
127
-
128
-
129
- </span>
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
- <span class="summary_desc"><div class='inline'>
142
- <p>Returns the value of attribute rootfiles.</p>
143
- </div></span>
144
-
145
- </li>
146
-
147
-
148
- </ul>
149
-
150
-
151
-
152
-
153
-
154
- <h2>
155
- Instance Method Summary
156
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
157
- </h2>
158
-
159
- <ul class="summary">
160
-
161
- <li class="public ">
162
- <span class="summary_signature">
163
-
164
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Container) <strong>initialize</strong> </a>
165
-
166
-
167
-
168
- </span>
169
-
170
- <span class="note title constructor">constructor</span>
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
- <span class="summary_desc"><div class='inline'>
180
- <p>A new instance of Container.</p>
181
- </div></span>
182
-
183
- </li>
184
-
185
-
186
- <li class="public ">
187
- <span class="summary_signature">
188
-
189
- <a href="#rootfile-instance_method" title="#rootfile (instance method)">- (Object) <strong>rootfile</strong> </a>
190
-
191
-
192
-
193
- </span>
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
- <span class="summary_desc"><div class='inline'>
203
- <p>syntax sugar.</p>
204
- </div></span>
205
-
206
- </li>
207
-
208
-
209
- </ul>
210
-
211
-
212
- <div id="constructor_details" class="method_details_list">
213
- <h2>Constructor Details</h2>
214
-
215
- <div class="method_details first">
216
- <p class="signature first" id="initialize-instance_method">
217
-
218
- - (<tt><span class='object_link'><a href="" title="EPUB::OCF::Container (class)">Container</a></span></tt>) <strong>initialize</strong>
219
-
220
-
221
-
222
- </p><div class="docstring">
223
- <div class="discussion">
224
-
225
- <p>A new instance of Container</p>
226
-
227
-
228
- </div>
229
- </div>
230
- <div class="tags">
231
-
232
-
233
- </div><table class="source_code">
234
- <tr>
235
- <td>
236
- <pre class="lines">
237
-
238
-
239
- 8
240
- 9
241
- 10</pre>
242
- </td>
243
- <td>
244
- <pre class="code"><span class="info file"># File 'lib/epub/ocf/container.rb', line 8</span>
245
-
246
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
247
- <span class='ivar'>@rootfiles</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
248
- <span class='kw'>end</span></pre>
249
- </td>
250
- </tr>
251
- </table>
252
- </div>
253
-
254
- </div>
255
-
256
- <div id="instance_attr_details" class="attr_details">
257
- <h2>Instance Attribute Details</h2>
258
-
259
-
260
- <span id="rootfiles=-instance_method"></span>
261
- <span id="rootfiles-instance_method"></span>
262
- <div class="method_details first">
263
- <p class="signature first" id="rootfiles-instance_method">
264
-
265
- - (<tt>Object</tt>) <strong>rootfiles</strong>
266
-
267
-
268
-
269
- </p><div class="docstring">
270
- <div class="discussion">
271
-
272
- <p>Returns the value of attribute rootfiles</p>
273
-
274
-
275
- </div>
276
- </div>
277
- <div class="tags">
278
-
279
-
280
- </div><table class="source_code">
281
- <tr>
282
- <td>
283
- <pre class="lines">
284
-
285
-
286
- 6
287
- 7
288
- 8</pre>
289
- </td>
290
- <td>
291
- <pre class="code"><span class="info file"># File 'lib/epub/ocf/container.rb', line 6</span>
292
-
293
- <span class='kw'>def</span> <span class='id identifier rubyid_rootfiles'>rootfiles</span>
294
- <span class='ivar'>@rootfiles</span>
295
- <span class='kw'>end</span></pre>
296
- </td>
297
- </tr>
298
- </table>
299
- </div>
300
-
301
- </div>
302
-
303
-
304
- <div id="instance_method_details" class="method_details_list">
305
- <h2>Instance Method Details</h2>
306
-
307
-
308
- <div class="method_details first">
309
- <p class="signature first" id="rootfile-instance_method">
310
-
311
- - (<tt>Object</tt>) <strong>rootfile</strong>
312
-
313
-
314
-
315
- </p><div class="docstring">
316
- <div class="discussion">
317
-
318
- <p>syntax sugar</p>
319
-
320
-
321
- </div>
322
- </div>
323
- <div class="tags">
324
-
325
-
326
- </div><table class="source_code">
327
- <tr>
328
- <td>
329
- <pre class="lines">
330
-
331
-
332
- 13
333
- 14
334
- 15</pre>
335
- </td>
336
- <td>
337
- <pre class="code"><span class="info file"># File 'lib/epub/ocf/container.rb', line 13</span>
338
-
339
- <span class='kw'>def</span> <span class='id identifier rubyid_rootfile'>rootfile</span>
340
- <span class='id identifier rubyid_rootfiles'>rootfiles</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
341
- <span class='kw'>end</span></pre>
342
- </td>
343
- </tr>
344
- </table>
345
- </div>
346
-
347
- </div>
348
-
349
- </div>
350
-
351
- <div id="footer">
352
- Generated on Fri Dec 30 08:49:44 2011 by
353
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
354
- 0.7.4 (ruby-1.9.3).
355
- </div>
356
-
357
- </body>
358
- </html>
@@ -1,257 +0,0 @@
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: EPUB::OCF::Container::Rootfile
8
-
9
- &mdash; Documentation by YARD 0.7.4
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- relpath = '../../..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../../../_index.html">Index (R)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../../../EPUB.html" title="EPUB (module)">EPUB</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../OCF.html" title="EPUB::OCF (class)">OCF</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Container.html" title="EPUB::OCF::Container (class)">Container</a></span></span>
38
- &raquo;
39
- <span class="title">Rootfile</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Class: EPUB::OCF::Container::Rootfile
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
- <dt class="r1">Inherits:</dt>
68
- <dd class="r1">
69
- <span class="inheritName">Object</span>
70
-
71
- <ul class="fullTree">
72
- <li>Object</li>
73
-
74
- <li class="next">EPUB::OCF::Container::Rootfile</li>
75
-
76
- </ul>
77
- <a href="#" class="inheritanceTree">show all</a>
78
-
79
- </dd>
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
- <dt class="r2 last">Defined in:</dt>
90
- <dd class="r2 last">lib/epub/ocf/container.rb</dd>
91
-
92
- </dl>
93
- <div class="clear"></div>
94
-
95
-
96
-
97
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
98
- <ul class="summary">
99
-
100
- <li class="public ">
101
- <span class="summary_signature">
102
-
103
- <a href="#full_path-instance_method" title="#full_path (instance method)">- (Object) <strong>full_path</strong> </a>
104
-
105
-
106
-
107
- </span>
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
- <span class="summary_desc"><div class='inline'>
120
- <p>Returns the value of attribute full_path.</p>
121
- </div></span>
122
-
123
- </li>
124
-
125
-
126
- <li class="public ">
127
- <span class="summary_signature">
128
-
129
- <a href="#media_type-instance_method" title="#media_type (instance method)">- (Object) <strong>media_type</strong> </a>
130
-
131
-
132
-
133
- </span>
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
- <span class="summary_desc"><div class='inline'>
146
- <p>Returns the value of attribute media_type.</p>
147
- </div></span>
148
-
149
- </li>
150
-
151
-
152
- </ul>
153
-
154
-
155
-
156
-
157
-
158
- <div id="instance_attr_details" class="attr_details">
159
- <h2>Instance Attribute Details</h2>
160
-
161
-
162
- <span id="full_path=-instance_method"></span>
163
- <span id="full_path-instance_method"></span>
164
- <div class="method_details first">
165
- <p class="signature first" id="full_path-instance_method">
166
-
167
- - (<tt>Object</tt>) <strong>full_path</strong>
168
-
169
-
170
-
171
- </p><div class="docstring">
172
- <div class="discussion">
173
-
174
- <p>Returns the value of attribute full_path</p>
175
-
176
-
177
- </div>
178
- </div>
179
- <div class="tags">
180
-
181
-
182
- </div><table class="source_code">
183
- <tr>
184
- <td>
185
- <pre class="lines">
186
-
187
-
188
- 18
189
- 19
190
- 20</pre>
191
- </td>
192
- <td>
193
- <pre class="code"><span class="info file"># File 'lib/epub/ocf/container.rb', line 18</span>
194
-
195
- <span class='kw'>def</span> <span class='id identifier rubyid_full_path'>full_path</span>
196
- <span class='ivar'>@full_path</span>
197
- <span class='kw'>end</span></pre>
198
- </td>
199
- </tr>
200
- </table>
201
- </div>
202
-
203
-
204
- <span id="media_type=-instance_method"></span>
205
- <span id="media_type-instance_method"></span>
206
- <div class="method_details ">
207
- <p class="signature " id="media_type-instance_method">
208
-
209
- - (<tt>Object</tt>) <strong>media_type</strong>
210
-
211
-
212
-
213
- </p><div class="docstring">
214
- <div class="discussion">
215
-
216
- <p>Returns the value of attribute media_type</p>
217
-
218
-
219
- </div>
220
- </div>
221
- <div class="tags">
222
-
223
-
224
- </div><table class="source_code">
225
- <tr>
226
- <td>
227
- <pre class="lines">
228
-
229
-
230
- 18
231
- 19
232
- 20</pre>
233
- </td>
234
- <td>
235
- <pre class="code"><span class="info file"># File 'lib/epub/ocf/container.rb', line 18</span>
236
-
237
- <span class='kw'>def</span> <span class='id identifier rubyid_media_type'>media_type</span>
238
- <span class='ivar'>@media_type</span>
239
- <span class='kw'>end</span></pre>
240
- </td>
241
- </tr>
242
- </table>
243
- </div>
244
-
245
- </div>
246
-
247
-
248
- </div>
249
-
250
- <div id="footer">
251
- Generated on Fri Dec 30 08:49:44 2011 by
252
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
253
- 0.7.4 (ruby-1.9.3).
254
- </div>
255
-
256
- </body>
257
- </html>