id3_tags 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/id3_tags +11 -0
- data/lib/id3_tags/m4a.rb +130 -0
- data/lib/id3_tags/mp3.rb +142 -0
- data/lib/id3_tags/version.rb +1 -1
- data/lib/id3_tags.rb +36 -147
- metadata +28 -44
- data/.gitignore +0 -16
- data/.rspec +0 -1
- data/Gemfile +0 -6
- data/HISTORY.md +0 -1
- data/Rakefile +0 -12
- data/TODO.md +0 -2
- data/doc/Id3Tags.html +0 -495
- data/doc/_index.html +0 -110
- data/doc/class_list.html +0 -53
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -57
- data/doc/css/style.css +0 -338
- data/doc/file.README.html +0 -102
- data/doc/file_list.html +0 -55
- data/doc/frames.html +0 -28
- data/doc/index.html +0 -102
- data/doc/js/app.js +0 -214
- data/doc/js/full_list.js +0 -178
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -64
- data/doc/top-level-namespace.html +0 -112
- data/id3_tags.gemspec +0 -30
- data/spec/assets/all_id3.mp3 +0 -0
- data/spec/assets/black_pixel.png +0 -0
- data/spec/assets/no_id3.mp3 +0 -0
- data/spec/helpers/duplicate_file_helper.rb +0 -11
- data/spec/lib/idempotency_spec.rb +0 -14
- data/spec/lib/read_id3_tags_spec.rb +0 -72
- data/spec/lib/write_id3_tags_spec.rb +0 -67
data/doc/Id3Tags.html
DELETED
@@ -1,495 +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
|
-
Module: Id3Tags
|
8
|
-
|
9
|
-
— Documentation by YARD 0.8.6.1
|
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#!" + escape(window.location.href);
|
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 (I)</a> »
|
35
|
-
|
36
|
-
|
37
|
-
<span class="title">Id3Tags</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>Module: Id3Tags
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<dt class="r1 last">Defined in:</dt>
|
82
|
-
<dd class="r1 last">lib/id3_tags.rb<span class="defines">,<br />
|
83
|
-
lib/id3_tags/version.rb</span>
|
84
|
-
</dd>
|
85
|
-
|
86
|
-
</dl>
|
87
|
-
<div class="clear"></div>
|
88
|
-
|
89
|
-
<h2>Overview</h2><div class="docstring">
|
90
|
-
<div class="discussion">
|
91
|
-
<p>
|
92
|
-
Provides two methods to read and write ID3 metadata from an MP3 file
|
93
|
-
</p>
|
94
|
-
|
95
|
-
|
96
|
-
</div>
|
97
|
-
</div>
|
98
|
-
<div class="tags">
|
99
|
-
|
100
|
-
|
101
|
-
</div>
|
102
|
-
<h2>Constant Summary</h2>
|
103
|
-
|
104
|
-
<dl class="constants">
|
105
|
-
|
106
|
-
<dt id="VERSION-constant" class="">VERSION =
|
107
|
-
|
108
|
-
</dt>
|
109
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.0.1</span><span class='tstring_end'>'</span></span></pre></dd>
|
110
|
-
|
111
|
-
</dl>
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
<h2>
|
122
|
-
Class Method Summary
|
123
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
124
|
-
</h2>
|
125
|
-
|
126
|
-
<ul class="summary">
|
127
|
-
|
128
|
-
<li class="public ">
|
129
|
-
<span class="summary_signature">
|
130
|
-
|
131
|
-
<a href="#read_tags_from-class_method" title="read_tags_from (class method)">+ (Hash) <strong>read_tags_from</strong>(file_path) </a>
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
</span>
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
<span class="summary_desc"><div class='inline'><p>
|
146
|
-
Returns a Hash of ID3 attributes stored in the file located at
|
147
|
-
<tt>file_path</tt>.
|
148
|
-
</p>
|
149
|
-
</div></span>
|
150
|
-
|
151
|
-
</li>
|
152
|
-
|
153
|
-
|
154
|
-
<li class="public ">
|
155
|
-
<span class="summary_signature">
|
156
|
-
|
157
|
-
<a href="#write_tags_to-class_method" title="write_tags_to (class method)">+ (Boolean) <strong>write_tags_to</strong>(file_path, attrs = {}) </a>
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
</span>
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
<span class="summary_desc"><div class='inline'><p>
|
172
|
-
Stores the <tt>attrs</tt> Hash of ID3 attributes into the file at
|
173
|
-
<tt>file_path</tt>.
|
174
|
-
</p>
|
175
|
-
</div></span>
|
176
|
-
|
177
|
-
</li>
|
178
|
-
|
179
|
-
|
180
|
-
</ul>
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
<div id="class_method_details" class="method_details_list">
|
186
|
-
<h2>Class Method Details</h2>
|
187
|
-
|
188
|
-
|
189
|
-
<div class="method_details first">
|
190
|
-
<h3 class="signature first" id="read_tags_from-class_method">
|
191
|
-
|
192
|
-
+ (<tt>Hash</tt>) <strong>read_tags_from</strong>(file_path)
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
</h3><div class="docstring">
|
199
|
-
<div class="discussion">
|
200
|
-
<p>
|
201
|
-
Returns a Hash of ID3 attributes stored in the file located at
|
202
|
-
<tt>file_path</tt>.
|
203
|
-
</p>
|
204
|
-
|
205
|
-
|
206
|
-
</div>
|
207
|
-
</div>
|
208
|
-
<div class="tags">
|
209
|
-
|
210
|
-
<div class="examples">
|
211
|
-
<p class="tag_title">Examples:</p>
|
212
|
-
|
213
|
-
|
214
|
-
<p class="example_title"><div class='inline'><p>
|
215
|
-
Read tags from an MP3 full of metadata
|
216
|
-
</p>
|
217
|
-
</div></p>
|
218
|
-
|
219
|
-
<pre class="example code"><code>Id3Tags.read_tags_from("all_id3.mp3")
|
220
|
-
|
221
|
-
# => {title: "Sample track", album: "Sample album", artist: Sample
|
222
|
-
artist", :comment=>"Sample comments", genre: "Sample Genre",
|
223
|
-
year: 1979, bitrate: 128, channels: 2, length: 38, samplerate:
|
224
|
-
44100, bpm: 110, lyrics: "Sample lyrics line 1\rand line 2",
|
225
|
-
composer: "Sample composer", grouping: "Sample group",
|
226
|
-
album_artist: "Sample album artist", compilation: true, track:
|
227
|
-
{number: 3, count: 12}, disk: {number: 1, count: 2}, cover_art:
|
228
|
-
{mime_type: "image/png", data: "\x89PNG\r\n\x1A[...]"}}</code></pre>
|
229
|
-
|
230
|
-
</div>
|
231
|
-
<p class="tag_title">Parameters:</p>
|
232
|
-
<ul class="param">
|
233
|
-
|
234
|
-
<li>
|
235
|
-
|
236
|
-
<span class='name'>file_path</span>
|
237
|
-
|
238
|
-
|
239
|
-
<span class='type'>(<tt>String</tt>)</span>
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
—
|
244
|
-
<div class='inline'><p>
|
245
|
-
Local path to an MP3 file
|
246
|
-
</p>
|
247
|
-
</div>
|
248
|
-
|
249
|
-
</li>
|
250
|
-
|
251
|
-
</ul>
|
252
|
-
|
253
|
-
<p class="tag_title">Returns:</p>
|
254
|
-
<ul class="return">
|
255
|
-
|
256
|
-
<li>
|
257
|
-
|
258
|
-
|
259
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
—
|
264
|
-
<div class='inline'><p>
|
265
|
-
the ID3 attributes stored in the file
|
266
|
-
</p>
|
267
|
-
</div>
|
268
|
-
|
269
|
-
</li>
|
270
|
-
|
271
|
-
</ul>
|
272
|
-
|
273
|
-
</div><table class="source_code">
|
274
|
-
<tr>
|
275
|
-
<td>
|
276
|
-
<pre class="lines">
|
277
|
-
|
278
|
-
|
279
|
-
23
|
280
|
-
24
|
281
|
-
25
|
282
|
-
26
|
283
|
-
27
|
284
|
-
28
|
285
|
-
29
|
286
|
-
30
|
287
|
-
31
|
288
|
-
32
|
289
|
-
33
|
290
|
-
34
|
291
|
-
35
|
292
|
-
36
|
293
|
-
37
|
294
|
-
38
|
295
|
-
39
|
296
|
-
40
|
297
|
-
41
|
298
|
-
42
|
299
|
-
43
|
300
|
-
44</pre>
|
301
|
-
</td>
|
302
|
-
<td>
|
303
|
-
<pre class="code"><span class="info file"># File 'lib/id3_tags.rb', line 23</span>
|
304
|
-
|
305
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_read_tags_from'>read_tags_from</span><span class='lparen'>(</span><span class='id identifier rubyid_file_path'>file_path</span><span class='rparen'>)</span>
|
306
|
-
<span class='id identifier rubyid_attrs'>attrs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
307
|
-
<span class='const'>TagLib</span><span class='op'>::</span><span class='const'>MPEG</span><span class='op'>::</span><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_path'>file_path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span>
|
308
|
-
<span class='id identifier rubyid_tag_fields'>tag_fields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>|</span>
|
309
|
-
<span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_tag'>tag</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:method</span><span class='rbracket'>]</span>
|
310
|
-
<span class='id identifier rubyid_assign!'>assign!</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='comma'>,</span> <span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span>
|
311
|
-
<span class='kw'>end</span> <span class='kw'>unless</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_tag'>tag</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
312
|
-
|
313
|
-
<span class='id identifier rubyid_audio_properties_fields'>audio_properties_fields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>|</span>
|
314
|
-
<span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_audio_properties'>audio_properties</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:method</span><span class='rbracket'>]</span>
|
315
|
-
<span class='id identifier rubyid_assign!'>assign!</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='comma'>,</span> <span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span>
|
316
|
-
<span class='kw'>end</span> <span class='kw'>unless</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_audio_properties'>audio_properties</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
317
|
-
|
318
|
-
<span class='id identifier rubyid_id3v2_tag_fields'>id3v2_tag_fields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>|</span>
|
319
|
-
<span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_id3v2_tag'>id3v2_tag</span><span class='period'>.</span><span class='id identifier rubyid_frame_list'>frame_list</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:frame_id</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
320
|
-
<span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_string'>to_string</span> <span class='kw'>if</span> <span class='id identifier rubyid_value'>value</span> <span class='kw'>and</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='symbol'>:image</span>
|
321
|
-
<span class='id identifier rubyid_assign!'>assign!</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='comma'>,</span> <span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span>
|
322
|
-
<span class='kw'>end</span> <span class='kw'>unless</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_id3v2_tag'>id3v2_tag</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
323
|
-
<span class='kw'>end</span>
|
324
|
-
|
325
|
-
<span class='id identifier rubyid_attrs'>attrs</span><span class='period'>.</span><span class='id identifier rubyid_symbolize_keys'>symbolize_keys</span>
|
326
|
-
<span class='kw'>end</span></pre>
|
327
|
-
</td>
|
328
|
-
</tr>
|
329
|
-
</table>
|
330
|
-
</div>
|
331
|
-
|
332
|
-
<div class="method_details ">
|
333
|
-
<h3 class="signature " id="write_tags_to-class_method">
|
334
|
-
|
335
|
-
+ (<tt>Boolean</tt>) <strong>write_tags_to</strong>(file_path, attrs = {})
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
</h3><div class="docstring">
|
342
|
-
<div class="discussion">
|
343
|
-
<p>
|
344
|
-
Stores the <tt>attrs</tt> Hash of ID3 attributes into the file at
|
345
|
-
<tt>file_path</tt>.
|
346
|
-
</p>
|
347
|
-
|
348
|
-
|
349
|
-
</div>
|
350
|
-
</div>
|
351
|
-
<div class="tags">
|
352
|
-
|
353
|
-
<div class="examples">
|
354
|
-
<p class="tag_title">Examples:</p>
|
355
|
-
|
356
|
-
|
357
|
-
<p class="example_title"><div class='inline'><p>
|
358
|
-
Write ID3 tags to an MP3 file
|
359
|
-
</p>
|
360
|
-
</div></p>
|
361
|
-
|
362
|
-
<pre class="example code"><code>Id3Tags.write_tags_to("no_id3.mp3", {title: "Sample track", album:
|
363
|
-
"Sample album", artist: Sample artist", :comment=>"Sample comments",
|
364
|
-
genre: "Sample Genre", year: 1979, bitrate: 128, channels: 2,
|
365
|
-
length: 38, samplerate: 44100, bpm: 110, lyrics: "Sample lyrics
|
366
|
-
line 1\rand line 2", composer: "Sample composer", grouping: "Sample
|
367
|
-
group", album_artist: "Sample album artist", compilation: true,
|
368
|
-
track: {number: 3, count: 12}, disk: {number: 1, count: 2},
|
369
|
-
cover_art: {mime_type: "image/png", data: "\x89PNG\r\n\x1A[...]"}}
|
370
|
-
|
371
|
-
# => true</code></pre>
|
372
|
-
|
373
|
-
</div>
|
374
|
-
<p class="tag_title">Parameters:</p>
|
375
|
-
<ul class="param">
|
376
|
-
|
377
|
-
<li>
|
378
|
-
|
379
|
-
<span class='name'>file_path</span>
|
380
|
-
|
381
|
-
|
382
|
-
<span class='type'>(<tt>String</tt>)</span>
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
—
|
387
|
-
<div class='inline'><p>
|
388
|
-
Local path to an MP3 file
|
389
|
-
</p>
|
390
|
-
</div>
|
391
|
-
|
392
|
-
</li>
|
393
|
-
|
394
|
-
<li>
|
395
|
-
|
396
|
-
<span class='name'>attrs</span>
|
397
|
-
|
398
|
-
|
399
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
400
|
-
|
401
|
-
|
402
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
403
|
-
|
404
|
-
|
405
|
-
—
|
406
|
-
<div class='inline'><p>
|
407
|
-
the ID3 attributes stored in the file
|
408
|
-
</p>
|
409
|
-
</div>
|
410
|
-
|
411
|
-
</li>
|
412
|
-
|
413
|
-
</ul>
|
414
|
-
|
415
|
-
<p class="tag_title">Returns:</p>
|
416
|
-
<ul class="return">
|
417
|
-
|
418
|
-
<li>
|
419
|
-
|
420
|
-
|
421
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
—
|
426
|
-
<div class='inline'><p>
|
427
|
-
true (the file gets changed)
|
428
|
-
</p>
|
429
|
-
</div>
|
430
|
-
|
431
|
-
</li>
|
432
|
-
|
433
|
-
</ul>
|
434
|
-
|
435
|
-
</div><table class="source_code">
|
436
|
-
<tr>
|
437
|
-
<td>
|
438
|
-
<pre class="lines">
|
439
|
-
|
440
|
-
|
441
|
-
63
|
442
|
-
64
|
443
|
-
65
|
444
|
-
66
|
445
|
-
67
|
446
|
-
68
|
447
|
-
69
|
448
|
-
70
|
449
|
-
71
|
450
|
-
72
|
451
|
-
73
|
452
|
-
74
|
453
|
-
75
|
454
|
-
76
|
455
|
-
77
|
456
|
-
78
|
457
|
-
79</pre>
|
458
|
-
</td>
|
459
|
-
<td>
|
460
|
-
<pre class="code"><span class="info file"># File 'lib/id3_tags.rb', line 63</span>
|
461
|
-
|
462
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_write_tags_to'>write_tags_to</span><span class='lparen'>(</span><span class='id identifier rubyid_file_path'>file_path</span><span class='comma'>,</span> <span class='id identifier rubyid_attrs'>attrs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
463
|
-
<span class='id identifier rubyid_attrs'>attrs</span><span class='period'>.</span><span class='id identifier rubyid_symbolize_keys!'>symbolize_keys!</span>
|
464
|
-
|
465
|
-
<span class='const'>TagLib</span><span class='op'>::</span><span class='const'>MPEG</span><span class='op'>::</span><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_path'>file_path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span>
|
466
|
-
<span class='id identifier rubyid_tag_fields'>tag_fields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>|</span>
|
467
|
-
<span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_tag'>tag</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:method</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_attrs'>attrs</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:default</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
468
|
-
<span class='kw'>end</span> <span class='kw'>unless</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_tag'>tag</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
469
|
-
|
470
|
-
<span class='id identifier rubyid_id3v2_tag_fields'>id3v2_tag_fields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>|</span>
|
471
|
-
<span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_id3v2_tag'>id3v2_tag</span><span class='period'>.</span><span class='id identifier rubyid_remove_frames'>remove_frames</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:frame_id</span><span class='rbracket'>]</span>
|
472
|
-
<span class='id identifier rubyid_frame'>frame</span> <span class='op'>=</span> <span class='id identifier rubyid_new_frame_for'>new_frame_for</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:frame_id</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span>
|
473
|
-
<span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_id3v2_tag'>id3v2_tag</span><span class='period'>.</span><span class='id identifier rubyid_add_frame'>add_frame</span> <span class='id identifier rubyid_frame'>frame</span> <span class='kw'>if</span> <span class='id identifier rubyid_frame'>frame</span>
|
474
|
-
<span class='kw'>end</span> <span class='kw'>unless</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_id3v2_tag'>id3v2_tag</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
475
|
-
|
476
|
-
<span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_save'>save</span>
|
477
|
-
<span class='kw'>end</span>
|
478
|
-
<span class='kw'>end</span></pre>
|
479
|
-
</td>
|
480
|
-
</tr>
|
481
|
-
</table>
|
482
|
-
</div>
|
483
|
-
|
484
|
-
</div>
|
485
|
-
|
486
|
-
</div>
|
487
|
-
|
488
|
-
<div id="footer">
|
489
|
-
Generated on Fri Jun 14 11:03:18 2013 by
|
490
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
491
|
-
0.8.6.1 (ruby-1.9.2).
|
492
|
-
</div>
|
493
|
-
|
494
|
-
</body>
|
495
|
-
</html>
|
data/doc/_index.html
DELETED
@@ -1,110 +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
|
-
Documentation by YARD 0.8.6.1
|
8
|
-
|
9
|
-
</title>
|
10
|
-
|
11
|
-
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8">
|
16
|
-
hasFrames = window.top.frames.main ? true : false;
|
17
|
-
relpath = '';
|
18
|
-
framesUrl = "frames.html#!" + escape(window.location.href);
|
19
|
-
</script>
|
20
|
-
|
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
|
-
<div id="header">
|
30
|
-
<div id="menu">
|
31
|
-
|
32
|
-
|
33
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
34
|
-
</div>
|
35
|
-
|
36
|
-
<div id="search">
|
37
|
-
|
38
|
-
<a class="full_list_link" id="class_list_link"
|
39
|
-
href="class_list.html">
|
40
|
-
Class List
|
41
|
-
</a>
|
42
|
-
|
43
|
-
<a class="full_list_link" id="method_list_link"
|
44
|
-
href="method_list.html">
|
45
|
-
Method List
|
46
|
-
</a>
|
47
|
-
|
48
|
-
<a class="full_list_link" id="file_list_link"
|
49
|
-
href="file_list.html">
|
50
|
-
File List
|
51
|
-
</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="noborder title">Documentation by YARD 0.8.6.1</h1>
|
60
|
-
<div id="listing">
|
61
|
-
<h1 class="alphaindex">Alphabetic Index</h1>
|
62
|
-
|
63
|
-
<h2>File Listing</h2>
|
64
|
-
<ul id="files" class="index_inline_list">
|
65
|
-
|
66
|
-
|
67
|
-
<li class="r1"><a href="index.html" title="README">README</a></li>
|
68
|
-
|
69
|
-
|
70
|
-
</ul>
|
71
|
-
|
72
|
-
<div class="clear"></div>
|
73
|
-
<h2>Namespace Listing A-Z</h2>
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
<table>
|
79
|
-
<tr>
|
80
|
-
<td valign='top' width="33%">
|
81
|
-
|
82
|
-
|
83
|
-
<ul id="alpha_I" class="alpha">
|
84
|
-
<li class="letter">I</li>
|
85
|
-
<ul>
|
86
|
-
|
87
|
-
<li>
|
88
|
-
<span class='object_link'><a href="Id3Tags.html" title="Id3Tags (module)">Id3Tags</a></span>
|
89
|
-
|
90
|
-
</li>
|
91
|
-
|
92
|
-
</ul>
|
93
|
-
</ul>
|
94
|
-
|
95
|
-
</td>
|
96
|
-
</tr>
|
97
|
-
</table>
|
98
|
-
|
99
|
-
</div>
|
100
|
-
|
101
|
-
</div>
|
102
|
-
|
103
|
-
<div id="footer">
|
104
|
-
Generated on Fri Jun 14 11:03:18 2013 by
|
105
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
106
|
-
0.8.6.1 (ruby-1.9.2).
|
107
|
-
</div>
|
108
|
-
|
109
|
-
</body>
|
110
|
-
</html>
|
data/doc/class_list.html
DELETED
@@ -1,53 +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>
|
4
|
-
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
|
7
|
-
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
|
9
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
16
|
-
|
17
|
-
|
18
|
-
<base id="base_target" target="_parent" />
|
19
|
-
</head>
|
20
|
-
<body>
|
21
|
-
<script type="text/javascript" charset="utf-8">
|
22
|
-
if (window.top.frames.main) {
|
23
|
-
document.getElementById('base_target').target = 'main';
|
24
|
-
document.body.className = 'frames';
|
25
|
-
}
|
26
|
-
</script>
|
27
|
-
<div id="content">
|
28
|
-
<h1 id="full_list_header">Class List</h1>
|
29
|
-
<div id="nav">
|
30
|
-
|
31
|
-
<span><a target="_self" href="class_list.html">
|
32
|
-
Classes
|
33
|
-
</a></span>
|
34
|
-
|
35
|
-
<span><a target="_self" href="method_list.html">
|
36
|
-
Methods
|
37
|
-
</a></span>
|
38
|
-
|
39
|
-
<span><a target="_self" href="file_list.html">
|
40
|
-
Files
|
41
|
-
</a></span>
|
42
|
-
|
43
|
-
</div>
|
44
|
-
<div id="search">Search: <input type="text" /></div>
|
45
|
-
|
46
|
-
<ul id="full_list" class="class">
|
47
|
-
<li><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></li>
|
48
|
-
<li><span class='object_link'><a href="Id3Tags.html" title="Id3Tags (module)">Id3Tags</a></span><small class='search_info'>Top Level Namespace</small></li>
|
49
|
-
|
50
|
-
</ul>
|
51
|
-
</div>
|
52
|
-
</body>
|
53
|
-
</html>
|
data/doc/css/common.css
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
/* Override this file with custom rules */
|