Debian Codegraph @

flactag.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <meta name="generator" content="AsciiDoc 8.5.2" />
7 <title>FLACTAG</title>
8 <style type="text/css">
9 /* Debug borders */
10 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
11 /*
12 border: 1px solid red;
13 */
14 }
15
16 body {
17 margin: 1em 5% 1em 5%;
18 }
19
20 a {
21 color: blue;
22 text-decoration: underline;
23 }
24 a:visited {
25 color: fuchsia;
26 }
27
28 em {
29 font-style: italic;
30 color: navy;
31 }
32
33 strong {
34 font-weight: bold;
35 color: #083194;
36 }
37
38 tt {
39 color: navy;
40 }
41
42 h1, h2, h3, h4, h5, h6 {
43 color: #527bbd;
44 font-family: sans-serif;
45 margin-top: 1.2em;
46 margin-bottom: 0.5em;
47 line-height: 1.3;
48 }
49
50 h1, h2, h3 {
51 border-bottom: 2px solid silver;
52 }
53 h2 {
54 padding-top: 0.5em;
55 }
56 h3 {
57 float: left;
58 }
59 h3 + * {
60 clear: left;
61 }
62
63 div.sectionbody {
64 font-family: serif;
65 margin-left: 0;
66 }
67
68 hr {
69 border: 1px solid silver;
70 }
71
72 p {
73 margin-top: 0.5em;
74 margin-bottom: 0.5em;
75 }
76
77 ul, ol, li > p {
78 margin-top: 0;
79 }
80
81 pre {
82 padding: 0;
83 margin: 0;
84 }
85
86 span#author {
87 color: #527bbd;
88 font-family: sans-serif;
89 font-weight: bold;
90 font-size: 1.1em;
91 }
92 span#email {
93 }
94 span#revnumber, span#revdate, span#revremark {
95 font-family: sans-serif;
96 }
97
98 div#footer {
99 font-family: sans-serif;
100 font-size: small;
101 border-top: 2px solid silver;
102 padding-top: 0.5em;
103 margin-top: 4.0em;
104 }
105 div#footer-text {
106 float: left;
107 padding-bottom: 0.5em;
108 }
109 div#footer-badges {
110 float: right;
111 padding-bottom: 0.5em;
112 }
113
114 div#preamble {
115 margin-top: 1.5em;
116 margin-bottom: 1.5em;
117 }
118 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
119 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
120 div.admonitionblock {
121 margin-top: 1.0em;
122 margin-bottom: 1.5em;
123 }
124 div.admonitionblock {
125 margin-top: 2.0em;
126 margin-bottom: 2.0em;
127 margin-right: 10%;
128 color: #606060;
129 }
130
131 div.content { /* Block element content. */
132 padding: 0;
133 }
134
135 /* Block element titles. */
136 div.title, caption.title {
137 color: #527bbd;
138 font-family: sans-serif;
139 font-weight: bold;
140 text-align: left;
141 margin-top: 1.0em;
142 margin-bottom: 0.5em;
143 }
144 div.title + * {
145 margin-top: 0;
146 }
147
148 td div.title:first-child {
149 margin-top: 0.0em;
150 }
151 div.content div.title:first-child {
152 margin-top: 0.0em;
153 }
154 div.content + div.title {
155 margin-top: 0.0em;
156 }
157
158 div.sidebarblock > div.content {
159 background: #ffffee;
160 border: 1px solid silver;
161 padding: 0.5em;
162 }
163
164 div.listingblock > div.content {
165 border: 1px solid silver;
166 background: #f4f4f4;
167 padding: 0.5em;
168 }
169
170 div.quoteblock, div.verseblock {
171 padding-left: 1.0em;
172 margin-left: 1.0em;
173 margin-right: 10%;
174 border-left: 5px solid #dddddd;
175 color: #777777;
176 }
177
178 div.quoteblock > div.attribution {
179 padding-top: 0.5em;
180 text-align: right;
181 }
182
183 div.verseblock > div.content {
184 white-space: pre;
185 }
186 div.verseblock > div.attribution {
187 padding-top: 0.75em;
188 text-align: left;
189 }
190 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
191 div.verseblock + div.attribution {
192 text-align: left;
193 }
194
195 div.admonitionblock .icon {
196 vertical-align: top;
197 font-size: 1.1em;
198 font-weight: bold;
199 text-decoration: underline;
200 color: #527bbd;
201 padding-right: 0.5em;
202 }
203 div.admonitionblock td.content {
204 padding-left: 0.5em;
205 border-left: 3px solid #dddddd;
206 }
207
208 div.exampleblock > div.content {
209 border-left: 3px solid #dddddd;
210 padding-left: 0.5em;
211 }
212
213 div.imageblock div.content { padding-left: 0; }
214 span.image img { border-style: none; }
215 a.image:visited { color: white; }
216
217 dl {
218 margin-top: 0.8em;
219 margin-bottom: 0.8em;
220 }
221 dt {
222 margin-top: 0.5em;
223 margin-bottom: 0;
224 font-style: normal;
225 color: navy;
226 }
227 dd > *:first-child {
228 margin-top: 0.1em;
229 }
230
231 ul, ol {
232 list-style-position: outside;
233 }
234 ol.arabic {
235 list-style-type: decimal;
236 }
237 ol.loweralpha {
238 list-style-type: lower-alpha;
239 }
240 ol.upperalpha {
241 list-style-type: upper-alpha;
242 }
243 ol.lowerroman {
244 list-style-type: lower-roman;
245 }
246 ol.upperroman {
247 list-style-type: upper-roman;
248 }
249
250 div.compact ul, div.compact ol,
251 div.compact p, div.compact p,
252 div.compact div, div.compact div {
253 margin-top: 0.1em;
254 margin-bottom: 0.1em;
255 }
256
257 div.tableblock > table {
258 border: 3px solid #527bbd;
259 }
260 thead, p.table.header {
261 font-family: sans-serif;
262 font-weight: bold;
263 }
264 tfoot {
265 font-weight: bold;
266 }
267 td > div.verse {
268 white-space: pre;
269 }
270 p.table {
271 margin-top: 0;
272 }
273 /* Because the table frame attribute is overriden by CSS in most browsers. */
274 div.tableblock > table[frame="void"] {
275 border-style: none;
276 }
277 div.tableblock > table[frame="hsides"] {
278 border-left-style: none;
279 border-right-style: none;
280 }
281 div.tableblock > table[frame="vsides"] {
282 border-top-style: none;
283 border-bottom-style: none;
284 }
285
286
287 div.hdlist {
288 margin-top: 0.8em;
289 margin-bottom: 0.8em;
290 }
291 div.hdlist tr {
292 padding-bottom: 15px;
293 }
294 dt.hdlist1.strong, td.hdlist1.strong {
295 font-weight: bold;
296 }
297 td.hdlist1 {
298 vertical-align: top;
299 font-style: normal;
300 padding-right: 0.8em;
301 color: navy;
302 }
303 td.hdlist2 {
304 vertical-align: top;
305 }
306 div.hdlist.compact tr {
307 margin: 0;
308 padding-bottom: 0;
309 }
310
311 .comment {
312 background: yellow;
313 }
314
315 .footnote, .footnoteref {
316 font-size: 0.8em;
317 }
318
319 span.footnote, span.footnoteref {
320 vertical-align: super;
321 }
322
323 #footnotes {
324 margin: 20px 0 20px 0;
325 padding: 7px 0 0 0;
326 }
327
328 #footnotes div.footnote {
329 margin: 0 0 5px 0;
330 }
331
332 #footnotes hr {
333 border: none;
334 border-top: 1px solid silver;
335 height: 1px;
336 text-align: left;
337 margin-left: 0;
338 width: 20%;
339 min-width: 100px;
340 }
341
342
343 @media print {
344 div#footer-badges { display: none; }
345 }
346
347 div#toc {
348 margin-bottom: 2.5em;
349 }
350
351 div#toctitle {
352 color: #527bbd;
353 font-family: sans-serif;
354 font-size: 1.1em;
355 font-weight: bold;
356 margin-top: 1.0em;
357 margin-bottom: 0.1em;
358 }
359
360 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
361 margin-top: 0;
362 margin-bottom: 0;
363 }
364 div.toclevel2 {
365 margin-left: 2em;
366 font-size: 0.9em;
367 }
368 div.toclevel3 {
369 margin-left: 4em;
370 font-size: 0.9em;
371 }
372 div.toclevel4 {
373 margin-left: 6em;
374 font-size: 0.9em;
375 }
376 /* Workarounds for IE6's broken and incomplete CSS2. */
377
378 div.sidebar-content {
379 background: #ffffee;
380 border: 1px solid silver;
381 padding: 0.5em;
382 }
383 div.sidebar-title, div.image-title {
384 color: #527bbd;
385 font-family: sans-serif;
386 font-weight: bold;
387 margin-top: 0.0em;
388 margin-bottom: 0.5em;
389 }
390
391 div.listingblock div.content {
392 border: 1px solid silver;
393 background: #f4f4f4;
394 padding: 0.5em;
395 }
396
397 div.quoteblock-attribution {
398 padding-top: 0.5em;
399 text-align: right;
400 }
401
402 div.verseblock-content {
403 white-space: pre;
404 }
405 div.verseblock-attribution {
406 padding-top: 0.75em;
407 text-align: left;
408 }
409
410 div.exampleblock-content {
411 border-left: 3px solid #dddddd;
412 padding-left: 0.5em;
413 }
414
415 /* IE6 sets dynamically generated links as visited. */
416 div#toc a:visited { color: blue; }
417 </style>
418 <script type="text/javascript">
419 /*<![CDATA[*/
420 window.onload = function(){asciidoc.footnotes();}
421 var asciidoc = { // Namespace.
422
423 /////////////////////////////////////////////////////////////////////
424 // Table Of Contents generator
425 /////////////////////////////////////////////////////////////////////
426
427 /* Author: Mihai Bazon, September 2002
428 * http://students.infoiasi.ro/~mishoo
429 *
430 * Table Of Content generator
431 * Version: 0.4
432 *
433 * Feel free to use this script under the terms of the GNU General Public
434 * License, as long as you do not remove or alter this notice.
435 */
436
437 /* modified by Troy D. Hanson, September 2006. License: GPL */
438 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
439
440 // toclevels = 1..4.
441 toc: function (toclevels) {
442
443 function getText(el) {
444 var text = "";
445 for (var i = el.firstChild; i != null; i = i.nextSibling) {
446 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
447 text += i.data;
448 else if (i.firstChild != null)
449 text += getText(i);
450 }
451 return text;
452 }
453
454 function TocEntry(el, text, toclevel) {
455 this.element = el;
456 this.text = text;
457 this.toclevel = toclevel;
458 }
459
460 function tocEntries(el, toclevels) {
461 var result = new Array;
462 var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
463 // Function that scans the DOM tree for header elements (the DOM2
464 // nodeIterator API would be a better technique but not supported by all
465 // browsers).
466 var iterate = function (el) {
467 for (var i = el.firstChild; i != null; i = i.nextSibling) {
468 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
469 var mo = re.exec(i.tagName);
470 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
471 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
472 }
473 iterate(i);
474 }
475 }
476 }
477 iterate(el);
478 return result;
479 }
480
481 var toc = document.getElementById("toc");
482 var entries = tocEntries(document.getElementById("content"), toclevels);
483 for (var i = 0; i < entries.length; ++i) {
484 var entry = entries[i];
485 if (entry.element.id == "")
486 entry.element.id = "_toc_" + i;
487 var a = document.createElement("a");
488 a.href = "#" + entry.element.id;
489 a.appendChild(document.createTextNode(entry.text));
490 var div = document.createElement("div");
491 div.appendChild(a);
492 div.className = "toclevel" + entry.toclevel;
493 toc.appendChild(div);
494 }
495 if (entries.length == 0)
496 toc.parentNode.removeChild(toc);
497 },
498
499
500 /////////////////////////////////////////////////////////////////////
501 // Footnotes generator
502 /////////////////////////////////////////////////////////////////////
503
504 /* Based on footnote generation code from:
505 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
506 */
507
508 footnotes: function () {
509 var cont = document.getElementById("content");
510 var noteholder = document.getElementById("footnotes");
511 var spans = cont.getElementsByTagName("span");
512 var refs = {};
513 var n = 0;
514 for (i=0; i<spans.length; i++) {
515 if (spans[i].className == "footnote") {
516 n++;
517 // Use [\s\S] in place of . so multi-line matches work.
518 // Because JavaScript has no s (dotall) regex flag.
519 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
520 noteholder.innerHTML +=
521 "<div class='footnote' id='_footnote_" + n + "'>" +
522 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
523 n + "</a>. " + note + "</div>";
524 spans[i].innerHTML =
525 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
526 "' title='View footnote' class='footnote'>" + n + "</a>]";
527 var id =spans[i].getAttribute("id");
528 if (id != null) refs["#"+id] = n;
529 }
530 }
531 if (n == 0)
532 noteholder.parentNode.removeChild(noteholder);
533 else {
534 // Process footnoterefs.
535 for (i=0; i<spans.length; i++) {
536 if (spans[i].className == "footnoteref") {
537 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
538 href = href.match(/#.*/)[0]; // Because IE return full URL.
539 n = refs[href];
540 spans[i].innerHTML =
541 "[<a href='#_footnote_" + n +
542 "' title='View footnote' class='footnote'>" + n + "</a>]";
543 }
544 }
545 }
546 }
547
548 }
549 /*]]>*/
550 </script>
551 </head>
552 <body>
553 <div id="header">
554 <h1>FLACTAG</h1>
555 <span id="author">Andy Hawkins</span><br />
556 <span id="email"><tt>&lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</tt></span><br />
557 </div>
558 <div id="content">
559 <div id="preamble">
560 <div class="sectionbody">
561 <div class="paragraph"><p>Daniel Pocock &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</p></div>
562 <div class="paragraph"><p>A utility for tagging single album FLAC files with embedded CUE sheets
563 using data from the <a href="http://www.musicbrainz.org">MusicBrainz</a> service.</p></div>
564 <div class="paragraph"><p>Flactag is licensed under the GNU General Public License (GPL) v3.</p></div>
565 </div>
566 </div>
567 <h2 id="_downloading">1. Downloading</h2>
568 <div class="sectionbody">
569 <div class="paragraph"><p>The latest version of flactag can always be found <a href="http://sourceforge.net/projects/flactag/files/">here</a>.</p></div>
570 </div>
571 <h2 id="_requirements">2. Requirements</h2>
572 <div class="sectionbody">
573 <div class="ulist"><ul>
574 <li>
575 <p>
576 <a href="http://musicbrainz.org/doc/libmusicbrainz">libmusicbrainz</a> (Version 5 required)
577 </p>
578 </li>
579 <li>
580 <p>
581 <a href="http://musicbrainz.org/doc/libdiscid">libdiscid</a>
582 </p>
583 </li>
584 <li>
585 <p>
586 <a href="http://flac.sourceforge.net/download.html">libflac++</a> (I used version 1.2.1)
587 </p>
588 </li>
589 <li>
590 <p>
591 <a href="http://www.s-lang.org/download.html">S-Lang</a> (I used version 2.2.2 from Debian)
592 </p>
593 </li>
594 <li>
595 <p>
596 <a href="http://www.webdav.org/neon/">libneon</a> (I used version 0.27-gnutls from Debian)
597 </p>
598 </li>
599 <li>
600 <p>
601 <a href="http://www.nongnu.org/unac/">unac</a> (I used version 1.8.0 from Debian)
602 </p>
603 </li>
604 <li>
605 <p>
606 <a href="http://www.ijg.org/">libjpeg</a> (I used version 8b-1 from Debian)
607 </p>
608 </li>
609 <li>
610 <p>
611 <a href="http://www.methods.co.nz/asciidoc/">asciidoc</a> (I used version 8.5.2 from Debian)
612 </p>
613 </li>
614 </ul></div>
615 </div>
616 <h2 id="_building_and_installing">3. Building and Installing</h2>
617 <div class="sectionbody">
618 <div class="paragraph"><p>If you take the source code directly from the repository (not a tarball),
619 you must run</p></div>
620 <div class="ulist"><ul>
621 <li>
622 <p>
623 <strong>autoreconf --install</strong>
624 </p>
625 </li>
626 </ul></div>
627 <div class="paragraph"><p>to prepare the autotools environment.</p></div>
628 <div class="paragraph"><p>The project is built using autotools. Once you have obtained the source
629 code (either from the repository or a tarball), you run</p></div>
630 <div class="ulist"><ul>
631 <li>
632 <p>
633 <strong>./configure</strong> - this will create the Makefile
634 </p>
635 </li>
636 <li>
637 <p>
638 <strong>make</strong> - this will compile
639 </p>
640 </li>
641 <li>
642 <p>
643 <strong>make install</strong> - this will install everything
644 </p>
645 </li>
646 </ul></div>
647 <div class="paragraph"><p>See the help output from the <strong>./configure</strong> command for details about
648 how to change LDFLAGS, CXXFLAGS, installation directories and other
649 settings.</p></div>
650 <div class="paragraph"><p>The build process should complete with no errors. You will be left
651 with the following executables:</p></div>
652 <div class="ulist"><ul>
653 <li>
654 <p>
655 <strong>flactag</strong> - The main application
656 </p>
657 </li>
658 <li>
659 <p>
660 <strong>discid</strong> - A test utility to read the disc ID from a CD
661 </p>
662 </li>
663 </ul></div>
664 <div class="paragraph"><p>To install the software and associated scripts, simply run <tt>make install</tt>.
665 This step will need to be run as <tt>root</tt> if the install is being done outside of
666 the user&#8217;s home directory.</p></div>
667 </div>
668 <h2 id="_developer_notes">4. Developer notes</h2>
669 <div class="sectionbody">
670 <div class="paragraph"><p>When releasing a new version, it is necessary to change the version
671 number in <strong>configure.ac</strong> before making a tag in the version control
672 system.</p></div>
673 <div class="paragraph"><p>To build a tarball for public distribution, use the command</p></div>
674 <div class="ulist"><ul>
675 <li>
676 <p>
677 <strong>make dist</strong> - this will create flactag-$(VERSION).tar.gz
678 </p>
679 </li>
680 </ul></div>
681 </div>
682 <h2 id="_ripping_cds_to_flac">5. Ripping CDs to FLAC</h2>
683 <div class="sectionbody">
684 <div class="paragraph"><p><strong>IMPORTANT: I think I found a bug in <tt>cueconvert</tt> which means that any FLAC
685 files generated from CDs that used INDEX marks to separate tracks that didn&#8217;t
686 have any pre-gap would generate invalid disc IDs. I would urge you to use the
687 <tt>checkflac</tt> script provided to compare any disks you may have ripped with
688 their FLAC files to ensure that the discids match correctly. Included in this
689 release is a SED script which will massage the TOC file of a CD to work around
690 this problem. Unfortunately, the only way to recover from this is to re-rip the
691 CD</strong></p></div>
692 <div class="paragraph"><p>To rip a CD to flac, simply enter <tt>ripflac &lt;basename&gt;</tt> (where basename is
693 used as the base name of the FLAC file you will be creating. The CD in the drive
694 will be ripped, and a FLAC file created containing an embedded CUE sheet. ripflac
695 takes an optional final parameter for the path to the CD drive, which defaults
696 to /dev/cdrom.</p></div>
697 <div class="paragraph"><p>If the original CD contains data tracks, then the FLAC conversion will fail.
698 Should this happen, enter <tt>ripdataflac &lt;basename&gt; &lt;range&gt;</tt> (where basename is
699 the same one specified in the first rip attempt, and range is the range of
700 tracks to rip (e.g. if the CD has 13 tracks, where track 13 is the data track,
701 then the range would be 1-12). ripdataflac takes an optional final parameter
702 for the path to the CD drive, which defaults to /dev/cdrom.</p></div>
703 <div class="paragraph"><p>During the ripping of the data CD, you will be provided with the CUE sheet in an
704 editor. You should delete the data track from this CUE sheet file and save it (I
705 will try to automate this process at some point).</p></div>
706 <div class="paragraph"><p>Both these scripts will compare the calculated discid of the FLAC file with the
707 discid of the CD in the drive. If they do not match, a warning will be issued.</p></div>
708 </div>
709 <h2 id="_using_flactag">6. Using flactag</h2>
710 <div class="sectionbody">
711 <h3 id="_interactive_mode">6.1. Interactive mode</h3><div style="clear:left"></div>
712 <div class="paragraph"><p>If flactac is executed without any options, it will interactively process
713 all FLAC files given as arguments.</p></div>
714 <div class="paragraph"><p>If the flactag utility does not find information for your CD, a URL will be
715 provided to submit information for it. Often the MusicBrainz server will
716 have information about the tracks and artist, but cannot match this up to your
717 CD. In these circumstances, it is simply a matter of 'associating' your CD&#8217;s
718 DiskID with the correct album data on the MusicBrainz server. In other
719 instances, you may be required to enter the track and album information into the
720 MusicBrainz service. Once you have entered this information, you can re-run
721 flactag, and the data should be downloaded from the MusicBrainz server.</p></div>
722 <div class="paragraph"><p>If the flactag utility finds information for your CD at the musicbrainz server,
723 the application&#8217;s main window will be shown.</p></div>
724 <div class="paragraph"><p><span class="image">
725 <img src="flactag.jpg" alt="flactag interactive mode" />
726 </span></p></div>
727 <div class="paragraph"><p>This contains three main areas:</p></div>
728 <div class="ulist"><ul>
729 <li>
730 <p>
731 The <strong>'Albums'</strong> window. This will contain a list of albums that match
732 the DiskID for your FLAC file.
733 </p>
734 </li>
735 <li>
736 <p>
737 The <strong>'Tracks'</strong> window. This contains a list of all the tracks on the
738 currently selected album.
739 </p>
740 </li>
741 <li>
742 <p>
743 The <strong>'Tags'</strong> window. At startup, this will contain a list of the tags
744 currently found in your FLAC file. If there are no tags present, then an empty
745 set appropriate for the album will be displayed. If you make changes to these
746 tags, an asterisk ('*') will be displayed to indicate that this information has
747 been changed.
748 </p>
749 </li>
750 </ul></div>
751 <div class="paragraph"><p>The currently active window will be highlighted by the border and window title
752 changing colour. To switch between the three windows, press the <strong>TAB</strong> key. To
753 scroll around the active window, use the <strong>cursor UP</strong> and <strong>cursor DOWN</strong> keys (to
754 scroll one line at a time) or the <strong>PAGE UP</strong> and <strong>PAGE DOWN</strong> keys (to scroll half
755 a page at a time). Scrolling in the <strong>'Albums'</strong> window will update the information
756 in the <strong>'Tracks'</strong> window appropriately.</p></div>
757 <div class="paragraph"><p>Once the appropriate album has been selected, pressing <strong>c</strong> will copy the tags
758 for that album into the <strong>'Tags'</strong> window. These tags can then be saved to the FLAC
759 file by pressing the <strong>w</strong> key.</p></div>
760 <div class="paragraph"><p>Pressing <strong>r</strong> will rename the file based on the settings in the
761 configuration file (~/.flactag - this file is created automatically the first
762 time you run <strong>flactag</strong>). Note that this facility uses the tags that are
763 actually written to the file, so should generally be performed after the new
764 tags have been written. This option will be unavailable if the filename and
765 location are already correct.</p></div>
766 <div class="paragraph"><p>Pressing <strong>q</strong> will move to the next file specified on the command line.
767 If all files have been processed, the application will exit.</p></div>
768 <h3 id="_batch_mode">6.2. Batch mode</h3><div style="clear:left"></div>
769 <div class="paragraph"><p>Alternatively, flactag can be used in batch mode to automatically check tags,
770 write them and rename the file. Care should be taken when using these options.</p></div>
771 <div class="paragraph"><p>The following command line options are understood:</p></div>
772 <div class="ulist"><ul>
773 <li>
774 <p>
775 <strong>--discid (-d)</strong> - Display the calculated disc ID for the specified FLAC
776 file and exit.
777 </p>
778 </li>
779 <li>
780 <p>
781 <strong>--submit-url (-s)</strong> - Display the URL used to submit information for this
782 file to the MusicBrainz service. Use this to submit data for your CD if the
783 data returned does not match.
784 </p>
785 </li>
786 <li>
787 <p>
788 <strong>--check (-c)</strong> - This option will compare the file&#8217;s tags against those
789 returned from the MusicBrainz service. A message will be displayed indicating
790 where the tags match or not.
791 </p>
792 </li>
793 <li>
794 <p>
795 <strong>--write (-w)</strong> - This option implies <strong>--check</strong>. If the files tags differ
796 from those returned from the MusicBrainz service, the tags will be written to
797 the file.
798 </p>
799 </li>
800 <li>
801 <p>
802 <strong>--force-write (-f)</strong> - If --write is specified then tags will be written even
803 if they appear to match those already in the file.
804 </p>
805 </li>
806 <li>
807 <p>
808 <strong>--rename (-r)</strong> - The filename will be compared with that specified by the
809 rename rules, and if it doesn&#8217;t match, the file will be renamed.
810 </p>
811 </li>
812 <li>
813 <p>
814 <strong>--overwrite-existing (-o)</strong> - If --rename is specified then flactag will
815 overwrite existing files when renaming.
816 </p>
817 </li>
818 <li>
819 <p>
820 <strong>--override-discid (-O)</strong> - Instead of calculating disc ID from the cuesheet,
821 flactag will use the provided disc ID to query MusicBrainz. Only one FLAC
822 file can be processed when this option is used. This is useful if you
823 do not want to add the disc ID to the real MusicBrainz database, for
824 example: because the original disc has not been sighted, the FLAC was
825 made by ripping a disc that was only a copy of the original and
826 the copy was not made in disc-at-once mode.
827 </p>
828 </li>
829 </ul></div>
830 <div class="paragraph"><p>Example uses of these options could be as follows (note the use of the find
831 option '-print0' and the xargs option '-0' to handle filenames containing
832 spaces):</p></div>
833 <h4 id="_report_on_the_tags_of_all_flac_files">6.2.1. Report on the tags of all FLAC files</h4>
834 <div class="paragraph"><p><tt>find /var/spool/music -name "*.flac" -print0 | xargs -0 flactag --check</tt></p></div>
835 <h4 id="_tag_and_rename_all_flac_files">6.2.2. Tag and rename all flac files</h4>
836 <div class="paragraph"><p><tt>find /var/spool/music -name "*.flac" -print0 | xargs -0 flactag --write --rename</tt></p></div>
837 </div>
838 <h2 id="_file_renaming_details">7. File Renaming Details</h2>
839 <div class="sectionbody">
840 <div class="paragraph"><p>The following configuration file (~/.flactag) entries affect file renaming:</p></div>
841 <div class="ulist"><ul>
842 <li>
843 <p>
844 <strong>BasePath</strong> - This is the <em>root</em> directory of where your music files
845 should be stored. (e.g. /var/spool/music)
846 </p>
847 </li>
848 <li>
849 <p>
850 <strong>SingleDiskFileName</strong> - This template is used to rename disks that
851 are not part of a multi-disk set.
852 </p>
853 </li>
854 <li>
855 <p>
856 <strong>MultiDiskFileName</strong> - This template is used to rename disks that
857 are part of a multi-disk set.
858 </p>
859 </li>
860 <li>
861 <p>
862 <strong>DirectoryCreatePermissions</strong> - The permissions to be set on any
863 directory that is created (e.g. 0755).
864 </p>
865 </li>
866 <li>
867 <p>
868 <strong>CreateCuesheetAfterRename</strong> - If set to true, flactag will generate
869 a cuesheet file to accompany the renamed FLAC file.
870 </p>
871 </li>
872 </ul></div>
873 <div class="paragraph"><p>The FileName templates can accept the following parameters:</p></div>
874 <div class="ulist"><ul>
875 <li>
876 <p>
877 <strong>%A</strong> - This will be replaced with the artist name
878 </p>
879 </li>
880 <li>
881 <p>
882 <strong>%S</strong> - This will be replaced with the artist sort name
883 </p>
884 </li>
885 <li>
886 <p>
887 <strong>%T</strong> - This will be replaced with the album title
888 </p>
889 </li>
890 <li>
891 <p>
892 <strong>%D</strong> - This will be replaced with the disk number
893 </p>
894 </li>
895 <li>
896 <p>
897 <strong>%Y</strong> - This will be replaced with the year
898 </p>
899 </li>
900 <li>
901 <p>
902 <strong>%G</strong> - This will be replaced with the genre
903 </p>
904 </li>
905 <li>
906 <p>
907 <strong>%1</strong> - This will be replaced with the first character of the artist sort name
908 </p>
909 </li>
910 <li>
911 <p>
912 <strong>%E</strong> - This will be replaced by the appropriate filename extension (flac or cue)
913 </p>
914 </li>
915 </ul></div>
916 <div class="paragraph"><p>If any item is used but does not have a value, then it will be stored as (for
917 example) NOGENRE (if the genre tag is empty).</p></div>
918 </div>
919 <h2 id="_using_a_different_musicbrainz_server">8. Using A Different Musicbrainz Server</h2>
920 <div class="sectionbody">
921 <div class="paragraph"><p>To use a different MusicBrainz server (for example if you have a local mirror)
922 you can set the <em>Server</em> and <em>Port</em> parameters in the configuration file.</p></div>
923 <div class="paragraph"><p>e.g.</p></div>
924 <div class="paragraph"><p>Server=mbserver.localdomain</p></div>
925 <div class="paragraph"><p>Port=5000</p></div>
926 </div>
927 <h2 id="_bugs_limitations_future_enhancements">9. Bugs / Limitations / Future Enhancements</h2>
928 <div class="sectionbody">
929 <div class="ulist"><ul>
930 <li>
931 <p>
932 Once changes are written to the FLAC file, there is no way of reverting
933 back to the original tags.
934 </p>
935 </li>
936 </ul></div>
937 </div>
938 <h2 id="_problems_suggestions">10. Problems / Suggestions</h2>
939 <div class="sectionbody">
940 <div class="paragraph"><p>If you have any problems with the software, or suggestions for improvements or
941 new features, then please report them <a href="http://sourceforge.net/projects/flactag/">here</a>.</p></div>
942 <div class="paragraph"><p>There are two mailing lists for
943 <a href="http://lists.gently.org.uk/mailman/listinfo/flactag-discuss">discussion</a> and
944 <a href="http://lists.gently.org.uk/mailman/listinfo/flactag-announce">announcements</a>,
945 which would be a good place to start for any questions. These lists are gated
946 via <a href="http://www.gmane.org">GMane</a> as gmane.comp.audio.flactag.announce and
947 gmane.comp.audio.flactag.discuss respectively.</p></div>
948 </div>
949 <h2 id="_version_history">11. Version History</h2>
950 <div class="sectionbody">
951 <h3 id="_v2_0_4_19th_june_2012">11.1. v2.0.4 - 19th June 2012</h3><div style="clear:left"></div>
952 <div class="ulist"><ul>
953 <li>
954 <p>
955 Fix Debian bug #677296 - Don&#8217;t write negative times in CUE sheets
956 </p>
957 </li>
958 <li>
959 <p>
960 Resolve realpath related compilation issues on Hurd
961 </p>
962 </li>
963 </ul></div>
964 <h3 id="_v2_0_3_7th_june_2012">11.2. v2.0.3 - 7th June 2012</h3><div style="clear:left"></div>
965 <div class="ulist"><ul>
966 <li>
967 <p>
968 Have iconv transliterate characters wherever possible
969 </p>
970 </li>
971 <li>
972 <p>
973 Correctly initialise UTF-8 in slang
974 </p>
975 </li>
976 <li>
977 <p>
978 Fix memory issues when writing picture blocks
979 </p>
980 </li>
981 <li>
982 <p>
983 Fix crash under debian unstable 64 due to incorrect buffer size passed to realpath
984 </p>
985 </li>
986 <li>
987 <p>
988 Correctly check return value from realpath
989 </p>
990 </li>
991 <li>
992 <p>
993 Allow user to pass path to cdrom drive in ripflac and ripdataflac
994 </p>
995 </li>
996 </ul></div>
997 <h3 id="_v2_0_2_18th_may_2012">11.3. v2.0.2 - 18th May 2012</h3><div style="clear:left"></div>
998 <div class="ulist"><ul>
999 <li>
1000 <p>
1001 Build system updates
1002 </p>
1003 </li>
1004 <li>
1005 <p>
1006 Fix bug passing incorrect buffer size to realpath
1007 </p>
1008 </li>
1009 <li>
1010 <p>
1011 Update to use libmusicbrainz5
1012 </p>
1013 </li>
1014 </ul></div>
1015 <h3 id="_v2_0_1_18th_april_2012">11.4. v2.0.1 - 18th April 2012</h3><div style="clear:left"></div>
1016 <div class="ulist"><ul>
1017 <li>
1018 <p>
1019 Change license to GPL v3
1020 </p>
1021 </li>
1022 <li>
1023 <p>
1024 Documentation updates
1025 </p>
1026 </li>
1027 </ul></div>
1028 <h3 id="_v2_0_0_17th_april_2012">11.5. v2.0.0 - 17th April 2012</h3><div style="clear:left"></div>
1029 <div class="ulist"><ul>
1030 <li>
1031 <p>
1032 Build system updated to use autotools (submitted by Daniel Pocock)
1033 </p>
1034 </li>
1035 <li>
1036 <p>
1037 Updated to work with MusicBrainz NGS using libmusicbrainz4
1038 </p>
1039 </li>
1040 <li>
1041 <p>
1042 Add ability to generate CUE file containing appropriate tag information (submitted by Daniel Pocock)
1043 </p>
1044 </li>
1045 <li>
1046 <p>
1047 Add ability to specify disk id rather than using the one derived from the CUE sheet (submitted by Daniel Pocock)
1048 </p>
1049 </li>
1050 <li>
1051 <p>
1052 More work on packaging for Debian
1053 </p>
1054 </li>
1055 <li>
1056 <p>
1057 Add ability to specify both server and port to query
1058 </p>
1059 </li>
1060 </ul></div>
1061 <h3 id="_v1_1_16th_december_2008">11.6. v1.1 - 16th December 2008</h3><div style="clear:left"></div>
1062 <div class="ulist"><ul>
1063 <li>
1064 <p>
1065 Scripts no longer have <em>.sh</em> extension
1066 </p>
1067 </li>
1068 <li>
1069 <p>
1070 Initial work on packaging for Debian
1071 </p>
1072 </li>
1073 <li>
1074 <p>
1075 More consistent mechanism for delaying requests to MusicBrainz
1076 </p>
1077 </li>
1078 <li>
1079 <p>
1080 Fix file name building issues if base path is <em>.</em>
1081 </p>
1082 </li>
1083 <li>
1084 <p>
1085 Handle presence and absence of trailing <em>/</em> in base path
1086 </p>
1087 </li>
1088 <li>
1089 <p>
1090 New option <em>--overwrite-existing</em> when renaming files
1091 </p>
1092 </li>
1093 <li>
1094 <p>
1095 Fix compilation problems caused by newer gcc
1096 </p>
1097 </li>
1098 <li>
1099 <p>
1100 Switch to neon for downloading image files
1101 </p>
1102 </li>
1103 </ul></div>
1104 <h3 id="_v1_1rc1_17th_july_2008">11.7. v1.1RC1 - 17th July 2008</h3><div style="clear:left"></div>
1105 <div class="ulist"><ul>
1106 <li>
1107 <p>
1108 Use new version of MusicBrainz library
1109 </p>
1110 </li>
1111 <li>
1112 <p>
1113 Correctly handle exceptions generated
1114 </p>
1115 </li>
1116 <li>
1117 <p>
1118 Limit rate of requests to MusicBrainz server
1119 </p>
1120 </li>
1121 <li>
1122 <p>
1123 Append <em>(Single)</em> to end of names of singles
1124 </p>
1125 </li>
1126 <li>
1127 <p>
1128 Removed <em>--force-multi</em> option from command line. Now compare stored MUSICBRAINZ_ALBUMID
1129 if multiple releases are returned.
1130 </p>
1131 </li>
1132 <li>
1133 <p>
1134 Store embedded cover art
1135 </p>
1136 </li>
1137 </ul></div>
1138 <h3 id="_v1_0_27th_september_2007">11.8. v1.0 - 27th September 2007</h3><div style="clear:left"></div>
1139 <div class="ulist"><ul>
1140 <li>
1141 <p>
1142 Handle PICTURE block if library supports it
1143 </p>
1144 </li>
1145 </ul></div>
1146 <h3 id="_v1_0rc2_10th_january_2007">11.9. v1.0RC2 - 10th January 2007</h3><div style="clear:left"></div>
1147 <div class="ulist"><ul>
1148 <li>
1149 <p>
1150 Add install target to install application and associated scripts
1151 </p>
1152 </li>
1153 <li>
1154 <p>
1155 Documentation now generated using asciidoc
1156 </p>
1157 </li>
1158 <li>
1159 <p>
1160 Scripts for ripping now included (including modification of TOC files where necessary)
1161 </p>
1162 </li>
1163 <li>
1164 <p>
1165 PAGE UP and PAGE DOWN can now be used for scrolling in windows
1166 </p>
1167 </li>
1168 <li>
1169 <p>
1170 Always use index number 1 when calculating TOC for FLAC file
1171 </p>
1172 </li>
1173 <li>
1174 <p>
1175 Convert accented characters to standard characters in filenames
1176 </p>
1177 </li>
1178 <li>
1179 <p>
1180 Add --discid option to report calculated discid for FLAC file
1181 </p>
1182 </li>
1183 <li>
1184 <p>
1185 Fix various compilation errors on some systems
1186 </p>
1187 </li>
1188 <li>
1189 <p>
1190 Report differences in tags when using --check option
1191 </p>
1192 </li>
1193 <li>
1194 <p>
1195 Compare real path of file (not path used in command line which could be
1196 relative) to see if renaming should be allowed
1197 </p>
1198 </li>
1199 <li>
1200 <p>
1201 Don&#8217;t write ALBUMARTIST tag (causes problems with artist sorting in current SlimServer software)
1202 </p>
1203 </li>
1204 <li>
1205 <p>
1206 Add --force-write option
1207 </p>
1208 </li>
1209 <li>
1210 <p>
1211 Correctly write UTF8 values for tags
1212 </p>
1213 </li>
1214 </ul></div>
1215 <h3 id="_v1_0_rc1_12th_october_2006">11.10. v1.0-RC1 - 12th October 2006</h3><div style="clear:left"></div>
1216 <div class="ulist"><ul>
1217 <li>
1218 <p>
1219 Add command line options and ability to handle more than one FLAC file
1220 </p>
1221 </li>
1222 <li>
1223 <p>
1224 Store cover art embedded into file tags
1225 </p>
1226 </li>
1227 <li>
1228 <p>
1229 Handle console screen size changes
1230 </p>
1231 </li>
1232 <li>
1233 <p>
1234 Retrieve more tags from MusicBrainz
1235 </p>
1236 </li>
1237 </ul></div>
1238 <h3 id="_v0_04_23rd_september_2006">11.11. v0.04 - 23rd September 2006</h3><div style="clear:left"></div>
1239 <div class="ulist"><ul>
1240 <li>
1241 <p>
1242 Software released under the GPL
1243 </p>
1244 </li>
1245 <li>
1246 <p>
1247 Add ability to rename file after tagging
1248 </p>
1249 </li>
1250 <li>
1251 <p>
1252 Add logging capability (all log messages are queued and display on exit)
1253 </p>
1254 </li>
1255 <li>
1256 <p>
1257 Add facility to download album cover art from Amazon
1258 </p>
1259 </li>
1260 <li>
1261 <p>
1262 Store more Musicbrainz related information in tags
1263 </p>
1264 </li>
1265 </ul></div>
1266 <h3 id="_v0_03_18th_september_2006">11.12. v0.03 - 18th September 2006</h3><div style="clear:left"></div>
1267 <div class="ulist"><ul>
1268 <li>
1269 <p>
1270 Fix serious bug in generating submission URLs
1271 </p>
1272 </li>
1273 </ul></div>
1274 <h3 id="_v0_02_18th_september_2006">11.13. v0.02 - 18th September 2006</h3><div style="clear:left"></div>
1275 <div class="ulist"><ul>
1276 <li>
1277 <p>
1278 Correctly handle multi-album disc sets
1279 </p>
1280 </li>
1281 <li>
1282 <p>
1283 Include ARTISTSORT tag
1284 </p>
1285 </li>
1286 <li>
1287 <p>
1288 Retrieve Amazon ASIN in preparation for downloading cover art
1289 </p>
1290 </li>
1291 </ul></div>
1292 <h3 id="_v0_01_16th_september_2006">11.14. v0.01 - 16th September 2006</h3><div style="clear:left"></div>
1293 <div class="ulist"><ul>
1294 <li>
1295 <p>
1296 Initial version
1297 </p>
1298 </li>
1299 </ul></div>
1300 </div>
1301 </div>
1302 <div id="footnotes"><hr /></div>
1303 <div id="footer">
1304 <div id="footer-text">
1305 Last updated 2012-06-19 13:40:34 BST
1306 </div>
1307 </div>
1308 </body>
1309 </html>