File: flactag.html

package info (click to toggle)
flactag 2.0.4-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,096 kB
  • ctags: 477
  • sloc: sh: 10,777; cpp: 3,283; makefile: 62; sed: 7
file content (1309 lines) | stat: -rw-r--r-- 33,550 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.5.2" />
<title>FLACTAG</title>
<style type="text/css">
/* Debug borders */
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
/*
  border: 1px solid red;
*/
}

body {
  margin: 1em 5% 1em 5%;
}

a {
  color: blue;
  text-decoration: underline;
}
a:visited {
  color: fuchsia;
}

em {
  font-style: italic;
  color: navy;
}

strong {
  font-weight: bold;
  color: #083194;
}

tt {
  color: navy;
}

h1, h2, h3, h4, h5, h6 {
  color: #527bbd;
  font-family: sans-serif;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1, h2, h3 {
  border-bottom: 2px solid silver;
}
h2 {
  padding-top: 0.5em;
}
h3 {
  float: left;
}
h3 + * {
  clear: left;
}

div.sectionbody {
  font-family: serif;
  margin-left: 0;
}

hr {
  border: 1px solid silver;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul, ol, li > p {
  margin-top: 0;
}

pre {
  padding: 0;
  margin: 0;
}

span#author {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1.1em;
}
span#email {
}
span#revnumber, span#revdate, span#revremark {
  font-family: sans-serif;
}

div#footer {
  font-family: sans-serif;
  font-size: small;
  border-top: 2px solid silver;
  padding-top: 0.5em;
  margin-top: 4.0em;
}
div#footer-text {
  float: left;
  padding-bottom: 0.5em;
}
div#footer-badges {
  float: right;
  padding-bottom: 0.5em;
}

div#preamble {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
div.admonitionblock {
  margin-top: 2.0em;
  margin-bottom: 2.0em;
  margin-right: 10%;
  color: #606060;
}

div.content { /* Block element content. */
  padding: 0;
}

/* Block element titles. */
div.title, caption.title {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  text-align: left;
  margin-top: 1.0em;
  margin-bottom: 0.5em;
}
div.title + * {
  margin-top: 0;
}

td div.title:first-child {
  margin-top: 0.0em;
}
div.content div.title:first-child {
  margin-top: 0.0em;
}
div.content + div.title {
  margin-top: 0.0em;
}

div.sidebarblock > div.content {
  background: #ffffee;
  border: 1px solid silver;
  padding: 0.5em;
}

div.listingblock > div.content {
  border: 1px solid silver;
  background: #f4f4f4;
  padding: 0.5em;
}

div.quoteblock, div.verseblock {
  padding-left: 1.0em;
  margin-left: 1.0em;
  margin-right: 10%;
  border-left: 5px solid #dddddd;
  color: #777777;
}

div.quoteblock > div.attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock > div.content {
  white-space: pre;
}
div.verseblock > div.attribution {
  padding-top: 0.75em;
  text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
  text-align: left;
}

div.admonitionblock .icon {
  vertical-align: top;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: underline;
  color: #527bbd;
  padding-right: 0.5em;
}
div.admonitionblock td.content {
  padding-left: 0.5em;
  border-left: 3px solid #dddddd;
}

div.exampleblock > div.content {
  border-left: 3px solid #dddddd;
  padding-left: 0.5em;
}

div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; }
a.image:visited { color: white; }

dl {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
dt {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-style: normal;
  color: navy;
}
dd > *:first-child {
  margin-top: 0.1em;
}

ul, ol {
    list-style-position: outside;
}
ol.arabic {
  list-style-type: decimal;
}
ol.loweralpha {
  list-style-type: lower-alpha;
}
ol.upperalpha {
  list-style-type: upper-alpha;
}
ol.lowerroman {
  list-style-type: lower-roman;
}
ol.upperroman {
  list-style-type: upper-roman;
}

div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
  margin-top: 0.1em;
  margin-bottom: 0.1em;
}

div.tableblock > table {
  border: 3px solid #527bbd;
}
thead, p.table.header {
  font-family: sans-serif;
  font-weight: bold;
}
tfoot {
  font-weight: bold;
}
td > div.verse {
  white-space: pre;
}
p.table {
  margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
  border-style: none;
}
div.tableblock > table[frame="hsides"] {
  border-left-style: none;
  border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
  border-top-style: none;
  border-bottom-style: none;
}


div.hdlist {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
div.hdlist tr {
  padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
  font-weight: bold;
}
td.hdlist1 {
  vertical-align: top;
  font-style: normal;
  padding-right: 0.8em;
  color: navy;
}
td.hdlist2 {
  vertical-align: top;
}
div.hdlist.compact tr {
  margin: 0;
  padding-bottom: 0;
}

.comment {
  background: yellow;
}

.footnote, .footnoteref {
  font-size: 0.8em;
}

span.footnote, span.footnoteref {
  vertical-align: super;
}

#footnotes {
  margin: 20px 0 20px 0;
  padding: 7px 0 0 0;
}

#footnotes div.footnote {
  margin: 0 0 5px 0;
}

#footnotes hr {
  border: none;
  border-top: 1px solid silver;
  height: 1px;
  text-align: left;
  margin-left: 0;
  width: 20%;
  min-width: 100px;
}


@media print {
  div#footer-badges { display: none; }
}

div#toc {
  margin-bottom: 2.5em;
}

div#toctitle {
  color: #527bbd;
  font-family: sans-serif;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 1.0em;
  margin-bottom: 0.1em;
}

div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
  margin-top: 0;
  margin-bottom: 0;
}
div.toclevel2 {
  margin-left: 2em;
  font-size: 0.9em;
}
div.toclevel3 {
  margin-left: 4em;
  font-size: 0.9em;
}
div.toclevel4 {
  margin-left: 6em;
  font-size: 0.9em;
}
/* Workarounds for IE6's broken and incomplete CSS2. */

div.sidebar-content {
  background: #ffffee;
  border: 1px solid silver;
  padding: 0.5em;
}
div.sidebar-title, div.image-title {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  margin-top: 0.0em;
  margin-bottom: 0.5em;
}

div.listingblock div.content {
  border: 1px solid silver;
  background: #f4f4f4;
  padding: 0.5em;
}

div.quoteblock-attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock-content {
  white-space: pre;
}
div.verseblock-attribution {
  padding-top: 0.75em;
  text-align: left;
}

div.exampleblock-content {
  border-left: 3px solid #dddddd;
  padding-left: 0.5em;
}

/* IE6 sets dynamically generated links as visited. */
div#toc a:visited { color: blue; }
</style>
<script type="text/javascript">
/*<![CDATA[*/
window.onload = function(){asciidoc.footnotes();}
var asciidoc = {  // Namespace.

/////////////////////////////////////////////////////////////////////
// Table Of Contents generator
/////////////////////////////////////////////////////////////////////

/* Author: Mihai Bazon, September 2002
 * http://students.infoiasi.ro/~mishoo
 *
 * Table Of Content generator
 * Version: 0.4
 *
 * Feel free to use this script under the terms of the GNU General Public
 * License, as long as you do not remove or alter this notice.
 */

 /* modified by Troy D. Hanson, September 2006. License: GPL */
 /* modified by Stuart Rackham, 2006, 2009. License: GPL */

// toclevels = 1..4.
toc: function (toclevels) {

  function getText(el) {
    var text = "";
    for (var i = el.firstChild; i != null; i = i.nextSibling) {
      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
        text += i.data;
      else if (i.firstChild != null)
        text += getText(i);
    }
    return text;
  }

  function TocEntry(el, text, toclevel) {
    this.element = el;
    this.text = text;
    this.toclevel = toclevel;
  }

  function tocEntries(el, toclevels) {
    var result = new Array;
    var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
    // Function that scans the DOM tree for header elements (the DOM2
    // nodeIterator API would be a better technique but not supported by all
    // browsers).
    var iterate = function (el) {
      for (var i = el.firstChild; i != null; i = i.nextSibling) {
        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
          var mo = re.exec(i.tagName);
          if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
          }
          iterate(i);
        }
      }
    }
    iterate(el);
    return result;
  }

  var toc = document.getElementById("toc");
  var entries = tocEntries(document.getElementById("content"), toclevels);
  for (var i = 0; i < entries.length; ++i) {
    var entry = entries[i];
    if (entry.element.id == "")
      entry.element.id = "_toc_" + i;
    var a = document.createElement("a");
    a.href = "#" + entry.element.id;
    a.appendChild(document.createTextNode(entry.text));
    var div = document.createElement("div");
    div.appendChild(a);
    div.className = "toclevel" + entry.toclevel;
    toc.appendChild(div);
  }
  if (entries.length == 0)
    toc.parentNode.removeChild(toc);
},


/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////

/* Based on footnote generation code from:
 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
 */

footnotes: function () {
  var cont = document.getElementById("content");
  var noteholder = document.getElementById("footnotes");
  var spans = cont.getElementsByTagName("span");
  var refs = {};
  var n = 0;
  for (i=0; i<spans.length; i++) {
    if (spans[i].className == "footnote") {
      n++;
      // Use [\s\S] in place of . so multi-line matches work.
      // Because JavaScript has no s (dotall) regex flag.
      note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
      noteholder.innerHTML +=
        "<div class='footnote' id='_footnote_" + n + "'>" +
        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
        n + "</a>. " + note + "</div>";
      spans[i].innerHTML =
        "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
        "' title='View footnote' class='footnote'>" + n + "</a>]";
      var id =spans[i].getAttribute("id");
      if (id != null) refs["#"+id] = n;
    }
  }
  if (n == 0)
    noteholder.parentNode.removeChild(noteholder);
  else {
    // Process footnoterefs.
    for (i=0; i<spans.length; i++) {
      if (spans[i].className == "footnoteref") {
        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
        href = href.match(/#.*/)[0];  // Because IE return full URL.
        n = refs[href];
        spans[i].innerHTML =
          "[<a href='#_footnote_" + n +
          "' title='View footnote' class='footnote'>" + n + "</a>]";
      }
    }
  }
}

}
/*]]>*/
</script>
</head>
<body>
<div id="header">
<h1>FLACTAG</h1>
<span id="author">Andy Hawkins</span><br />
<span id="email"><tt>&lt;<a href="mailto:andy@gently.org.uk">andy@gently.org.uk</a>&gt;</tt></span><br />
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>Daniel Pocock &lt;<a href="mailto:daniel@pocock.com.au">daniel@pocock.com.au</a>&gt;</p></div>
<div class="paragraph"><p>A utility for tagging single album FLAC files with embedded CUE sheets
using data from the <a href="http://www.musicbrainz.org">MusicBrainz</a> service.</p></div>
<div class="paragraph"><p>Flactag is licensed under the GNU General Public License (GPL) v3.</p></div>
</div>
</div>
<h2 id="_downloading">1. Downloading</h2>
<div class="sectionbody">
<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>
</div>
<h2 id="_requirements">2. Requirements</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
<a href="http://musicbrainz.org/doc/libmusicbrainz">libmusicbrainz</a> (Version 5 required)
</p>
</li>
<li>
<p>
<a href="http://musicbrainz.org/doc/libdiscid">libdiscid</a>
</p>
</li>
<li>
<p>
<a href="http://flac.sourceforge.net/download.html">libflac++</a> (I used version 1.2.1)
</p>
</li>
<li>
<p>
<a href="http://www.s-lang.org/download.html">S-Lang</a> (I used version 2.2.2 from Debian)
</p>
</li>
<li>
<p>
<a href="http://www.webdav.org/neon/">libneon</a> (I used version 0.27-gnutls from Debian)
</p>
</li>
<li>
<p>
<a href="http://www.nongnu.org/unac/">unac</a> (I used version 1.8.0 from Debian)
</p>
</li>
<li>
<p>
<a href="http://www.ijg.org/">libjpeg</a> (I used version 8b-1 from Debian)
</p>
</li>
<li>
<p>
<a href="http://www.methods.co.nz/asciidoc/">asciidoc</a> (I used version 8.5.2 from Debian)
</p>
</li>
</ul></div>
</div>
<h2 id="_building_and_installing">3. Building and Installing</h2>
<div class="sectionbody">
<div class="paragraph"><p>If you take the source code directly from the repository (not a tarball),
you must run</p></div>
<div class="ulist"><ul>
<li>
<p>
<strong>autoreconf --install</strong>
</p>
</li>
</ul></div>
<div class="paragraph"><p>to prepare the autotools environment.</p></div>
<div class="paragraph"><p>The project is built using autotools.  Once you have obtained the source
code (either from the repository or a tarball), you run</p></div>
<div class="ulist"><ul>
<li>
<p>
<strong>./configure</strong> - this will create the Makefile
</p>
</li>
<li>
<p>
<strong>make</strong> - this will compile
</p>
</li>
<li>
<p>
<strong>make install</strong> - this will install everything
</p>
</li>
</ul></div>
<div class="paragraph"><p>See the help output from the <strong>./configure</strong> command for details about
how to change LDFLAGS, CXXFLAGS, installation directories and other
settings.</p></div>
<div class="paragraph"><p>The build process should complete with no errors. You will be left
with the following executables:</p></div>
<div class="ulist"><ul>
<li>
<p>
<strong>flactag</strong> - The main application
</p>
</li>
<li>
<p>
<strong>discid</strong> - A test utility to read the disc ID from a CD
</p>
</li>
</ul></div>
<div class="paragraph"><p>To install the software and associated scripts, simply run <tt>make install</tt>.
This step will need to be run as <tt>root</tt> if the install is being done outside of
the user&#8217;s home directory.</p></div>
</div>
<h2 id="_developer_notes">4. Developer notes</h2>
<div class="sectionbody">
<div class="paragraph"><p>When releasing a new version, it is necessary to change the version
number in <strong>configure.ac</strong> before making a tag in the version control
system.</p></div>
<div class="paragraph"><p>To build a tarball for public distribution, use the command</p></div>
<div class="ulist"><ul>
<li>
<p>
<strong>make dist</strong> - this will create flactag-$(VERSION).tar.gz
</p>
</li>
</ul></div>
</div>
<h2 id="_ripping_cds_to_flac">5. Ripping CDs to FLAC</h2>
<div class="sectionbody">
<div class="paragraph"><p><strong>IMPORTANT: I think I found a bug in <tt>cueconvert</tt> which means that any FLAC
files generated from CDs that used INDEX marks to separate tracks that didn&#8217;t
have any pre-gap would generate invalid disc IDs. I would urge you to use the
<tt>checkflac</tt> script provided to compare any disks you may have ripped with
their FLAC files to ensure that the discids match correctly. Included in this
release is a SED script which will massage the TOC file of a CD to work around
this problem. Unfortunately, the only way to recover from this is to re-rip the
CD</strong></p></div>
<div class="paragraph"><p>To rip a CD to flac, simply enter <tt>ripflac &lt;basename&gt;</tt> (where basename is
used as the base name of the FLAC file you will be creating. The CD in the drive
will be ripped, and a FLAC file created containing an embedded CUE sheet. ripflac
takes an optional final parameter for the path to the CD drive, which defaults
to /dev/cdrom.</p></div>
<div class="paragraph"><p>If the original CD contains data tracks, then the FLAC conversion will fail.
Should this happen, enter <tt>ripdataflac &lt;basename&gt; &lt;range&gt;</tt> (where basename is
the same one specified in the first rip attempt, and range is the range of
tracks to rip (e.g. if the CD has 13 tracks, where track 13 is the data track,
then the range would be 1-12). ripdataflac takes an optional final parameter
for the path to the CD drive, which defaults to /dev/cdrom.</p></div>
<div class="paragraph"><p>During the ripping of the data CD, you will be provided with the CUE sheet in an
editor. You should delete the data track from this CUE sheet file and save it (I
will try to automate this process at some point).</p></div>
<div class="paragraph"><p>Both these scripts will compare the calculated discid of the FLAC file with the
discid of the CD in the drive. If they do not match, a warning will be issued.</p></div>
</div>
<h2 id="_using_flactag">6. Using flactag</h2>
<div class="sectionbody">
<h3 id="_interactive_mode">6.1. Interactive mode</h3><div style="clear:left"></div>
<div class="paragraph"><p>If flactac is executed without any options, it will interactively process
all FLAC files given as arguments.</p></div>
<div class="paragraph"><p>If the flactag utility does not find information for your CD, a URL will be
provided to submit information for it. Often the MusicBrainz server will
have information about the tracks and artist, but cannot match this up to your
CD. In these circumstances, it is simply a matter of 'associating' your CD&#8217;s
DiskID with the correct album data on the MusicBrainz server. In other
instances, you may be required to enter the track and album information into the
MusicBrainz service. Once you have entered this information, you can re-run
flactag, and the data should be downloaded from the MusicBrainz server.</p></div>
<div class="paragraph"><p>If the flactag utility finds information for your CD at the musicbrainz server,
the application&#8217;s main window will be shown.</p></div>
<div class="paragraph"><p><span class="image">
<img src="flactag.jpg" alt="flactag interactive mode" />
</span></p></div>
<div class="paragraph"><p>This contains three main areas:</p></div>
<div class="ulist"><ul>
<li>
<p>
The <strong>'Albums'</strong> window. This will contain a list of albums that match
the DiskID for your FLAC file.
</p>
</li>
<li>
<p>
The <strong>'Tracks'</strong> window. This contains a list of all the tracks on the
currently selected album.
</p>
</li>
<li>
<p>
The <strong>'Tags'</strong> window. At startup, this will contain a list of the tags
currently found in your FLAC file. If there are no tags present, then an empty
set appropriate for the album will be displayed. If you make changes to these
tags, an asterisk ('*') will be displayed to indicate that this information has
been changed.
</p>
</li>
</ul></div>
<div class="paragraph"><p>The currently active window will be highlighted by the border and window title
changing colour. To switch between the three windows, press the <strong>TAB</strong> key. To
scroll around the active window, use the <strong>cursor UP</strong> and <strong>cursor DOWN</strong> keys (to
scroll one line at a time) or the <strong>PAGE UP</strong> and <strong>PAGE DOWN</strong> keys (to scroll half
a page at a time). Scrolling in the <strong>'Albums'</strong> window will update the information
in the <strong>'Tracks'</strong> window appropriately.</p></div>
<div class="paragraph"><p>Once the appropriate album has been selected, pressing <strong>c</strong> will copy the tags
for that album into the <strong>'Tags'</strong> window. These tags can then be saved to the FLAC
file by pressing the <strong>w</strong> key.</p></div>
<div class="paragraph"><p>Pressing <strong>r</strong> will rename the file based on the settings in the
configuration file (~/.flactag - this file is created automatically the first
time you run <strong>flactag</strong>). Note that this facility uses the tags that are
actually written to the file, so should generally be performed after the new
tags have been written. This option will be unavailable if the filename and
location are already correct.</p></div>
<div class="paragraph"><p>Pressing <strong>q</strong> will move to the next file specified on the command line.
If all files have been processed, the application will exit.</p></div>
<h3 id="_batch_mode">6.2. Batch mode</h3><div style="clear:left"></div>
<div class="paragraph"><p>Alternatively, flactag can be used in batch mode to automatically check tags,
write them and rename the file. Care should be taken when using these options.</p></div>
<div class="paragraph"><p>The following command line options are understood:</p></div>
<div class="ulist"><ul>
<li>
<p>
<strong>--discid (-d)</strong> - Display the calculated disc ID for the specified FLAC
file and exit.
</p>
</li>
<li>
<p>
<strong>--submit-url (-s)</strong> - Display the URL used to submit information for this
file to the MusicBrainz service. Use this to submit data for your CD if the
data returned does not match.
</p>
</li>
<li>
<p>
<strong>--check (-c)</strong> - This option will compare the file&#8217;s tags against those
returned from the MusicBrainz service. A message will be displayed indicating
where the tags match or not.
</p>
</li>
<li>
<p>
<strong>--write (-w)</strong> - This option implies <strong>--check</strong>. If the files tags differ
from those returned from the MusicBrainz service, the tags will be written to
the file.
</p>
</li>
<li>
<p>
<strong>--force-write (-f)</strong> - If --write is specified then tags will be written even
if they appear to match those already in the file.
</p>
</li>
<li>
<p>
<strong>--rename (-r)</strong> - The filename will be compared with that specified by the
rename rules, and if it doesn&#8217;t match, the file will be renamed.
</p>
</li>
<li>
<p>
<strong>--overwrite-existing (-o)</strong> - If --rename is specified then flactag will
overwrite existing files when renaming.
</p>
</li>
<li>
<p>
<strong>--override-discid (-O)</strong> - Instead of calculating disc ID from the cuesheet,
flactag will use the provided disc ID to query MusicBrainz.  Only one FLAC
file can be processed when this option is used.  This is useful if you
do not want to add the disc ID to the real MusicBrainz database, for
example: because the original disc has not been sighted, the FLAC was
made by ripping a disc that was only a copy of the original and
the copy was not made in disc-at-once mode.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Example uses of these options could be as follows (note the use of the find
option '-print0' and the xargs option '-0' to handle filenames containing
spaces):</p></div>
<h4 id="_report_on_the_tags_of_all_flac_files">6.2.1. Report on the tags of all FLAC files</h4>
<div class="paragraph"><p><tt>find /var/spool/music -name "*.flac" -print0 | xargs -0 flactag --check</tt></p></div>
<h4 id="_tag_and_rename_all_flac_files">6.2.2. Tag and rename all flac files</h4>
<div class="paragraph"><p><tt>find /var/spool/music -name "*.flac" -print0 | xargs -0 flactag --write --rename</tt></p></div>
</div>
<h2 id="_file_renaming_details">7. File Renaming Details</h2>
<div class="sectionbody">
<div class="paragraph"><p>The following configuration file (~/.flactag) entries affect file renaming:</p></div>
<div class="ulist"><ul>
<li>
<p>
<strong>BasePath</strong> - This is the <em>root</em> directory of where your music files
should be stored. (e.g. /var/spool/music)
</p>
</li>
<li>
<p>
<strong>SingleDiskFileName</strong> - This template is used to rename disks that
are not part of a multi-disk set.
</p>
</li>
<li>
<p>
<strong>MultiDiskFileName</strong> - This template is used to rename disks that
are part of a multi-disk set.
</p>
</li>
<li>
<p>
<strong>DirectoryCreatePermissions</strong> - The permissions to be set on any
directory that is created (e.g. 0755).
</p>
</li>
<li>
<p>
<strong>CreateCuesheetAfterRename</strong> - If set to true, flactag will generate
a cuesheet file to accompany the renamed FLAC file.
</p>
</li>
</ul></div>
<div class="paragraph"><p>The FileName templates can accept the following parameters:</p></div>
<div class="ulist"><ul>
<li>
<p>
<strong>%A</strong> - This will be replaced with the artist name
</p>
</li>
<li>
<p>
<strong>%S</strong> - This will be replaced with the artist sort name
</p>
</li>
<li>
<p>
<strong>%T</strong> - This will be replaced with the album title
</p>
</li>
<li>
<p>
<strong>%D</strong> - This will be replaced with the disk number
</p>
</li>
<li>
<p>
<strong>%Y</strong> - This will be replaced with the year
</p>
</li>
<li>
<p>
<strong>%G</strong> - This will be replaced with the genre
</p>
</li>
<li>
<p>
<strong>%1</strong> - This will be replaced with the first character of the artist sort name
</p>
</li>
<li>
<p>
<strong>%E</strong> - This will be replaced by the appropriate filename extension (flac or cue)
</p>
</li>
</ul></div>
<div class="paragraph"><p>If any item is used but does not have a value, then it will be stored as (for
example) NOGENRE (if the genre tag is empty).</p></div>
</div>
<h2 id="_using_a_different_musicbrainz_server">8. Using A Different Musicbrainz Server</h2>
<div class="sectionbody">
<div class="paragraph"><p>To use a different MusicBrainz server (for example if you have a local mirror)
you can set the <em>Server</em> and <em>Port</em> parameters in the configuration file.</p></div>
<div class="paragraph"><p>e.g.</p></div>
<div class="paragraph"><p>Server=mbserver.localdomain</p></div>
<div class="paragraph"><p>Port=5000</p></div>
</div>
<h2 id="_bugs_limitations_future_enhancements">9. Bugs / Limitations / Future Enhancements</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
Once changes are written to the FLAC file, there is no way of reverting
back to the original tags.
</p>
</li>
</ul></div>
</div>
<h2 id="_problems_suggestions">10. Problems / Suggestions</h2>
<div class="sectionbody">
<div class="paragraph"><p>If you have any problems with the software, or suggestions for improvements or
new features, then please report them <a href="http://sourceforge.net/projects/flactag/">here</a>.</p></div>
<div class="paragraph"><p>There are two mailing lists for
<a href="http://lists.gently.org.uk/mailman/listinfo/flactag-discuss">discussion</a> and
<a href="http://lists.gently.org.uk/mailman/listinfo/flactag-announce">announcements</a>,
which would be a good place to start for any questions. These lists are gated
via <a href="http://www.gmane.org">GMane</a> as gmane.comp.audio.flactag.announce and
gmane.comp.audio.flactag.discuss respectively.</p></div>
</div>
<h2 id="_version_history">11. Version History</h2>
<div class="sectionbody">
<h3 id="_v2_0_4_19th_june_2012">11.1. v2.0.4 - 19th June 2012</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Fix Debian bug #677296 - Don&#8217;t write negative times in CUE sheets
</p>
</li>
<li>
<p>
Resolve realpath related compilation issues on Hurd
</p>
</li>
</ul></div>
<h3 id="_v2_0_3_7th_june_2012">11.2. v2.0.3 - 7th June 2012</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Have iconv transliterate characters wherever possible
</p>
</li>
<li>
<p>
Correctly initialise UTF-8 in slang
</p>
</li>
<li>
<p>
Fix memory issues when writing picture blocks
</p>
</li>
<li>
<p>
Fix crash under debian unstable 64 due to incorrect buffer size passed to realpath
</p>
</li>
<li>
<p>
Correctly check return value from realpath
</p>
</li>
<li>
<p>
Allow user to pass path to cdrom drive in ripflac and ripdataflac
</p>
</li>
</ul></div>
<h3 id="_v2_0_2_18th_may_2012">11.3. v2.0.2 - 18th May 2012</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Build system updates
</p>
</li>
<li>
<p>
Fix bug passing incorrect buffer size to realpath
</p>
</li>
<li>
<p>
Update to use libmusicbrainz5
</p>
</li>
</ul></div>
<h3 id="_v2_0_1_18th_april_2012">11.4. v2.0.1 - 18th April 2012</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Change license to GPL v3
</p>
</li>
<li>
<p>
Documentation updates
</p>
</li>
</ul></div>
<h3 id="_v2_0_0_17th_april_2012">11.5. v2.0.0 - 17th April 2012</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Build system updated to use autotools (submitted by Daniel Pocock)
</p>
</li>
<li>
<p>
Updated to work with MusicBrainz NGS using libmusicbrainz4
</p>
</li>
<li>
<p>
Add ability to generate CUE file containing appropriate tag information (submitted by Daniel Pocock)
</p>
</li>
<li>
<p>
Add ability to specify disk id rather than using the one derived from the CUE sheet (submitted by Daniel Pocock)
</p>
</li>
<li>
<p>
More work on packaging for Debian
</p>
</li>
<li>
<p>
Add ability to specify both server and port to query
</p>
</li>
</ul></div>
<h3 id="_v1_1_16th_december_2008">11.6. v1.1 - 16th December 2008</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Scripts no longer have <em>.sh</em> extension
</p>
</li>
<li>
<p>
Initial work on packaging for Debian
</p>
</li>
<li>
<p>
More consistent mechanism for delaying requests to MusicBrainz
</p>
</li>
<li>
<p>
Fix file name building issues if base path is <em>.</em>
</p>
</li>
<li>
<p>
Handle presence and absence of trailing <em>/</em> in base path
</p>
</li>
<li>
<p>
New option <em>--overwrite-existing</em> when renaming files
</p>
</li>
<li>
<p>
Fix compilation problems caused by newer gcc
</p>
</li>
<li>
<p>
Switch to neon for downloading image files
</p>
</li>
</ul></div>
<h3 id="_v1_1rc1_17th_july_2008">11.7. v1.1RC1 - 17th July 2008</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Use new version of MusicBrainz library
</p>
</li>
<li>
<p>
Correctly handle exceptions generated
</p>
</li>
<li>
<p>
Limit rate of requests to MusicBrainz server
</p>
</li>
<li>
<p>
Append <em>(Single)</em> to end of names of singles
</p>
</li>
<li>
<p>
Removed <em>--force-multi</em> option from command line. Now compare stored MUSICBRAINZ_ALBUMID
if multiple releases are returned.
</p>
</li>
<li>
<p>
Store embedded cover art
</p>
</li>
</ul></div>
<h3 id="_v1_0_27th_september_2007">11.8. v1.0 - 27th September 2007</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Handle PICTURE block if library supports it
</p>
</li>
</ul></div>
<h3 id="_v1_0rc2_10th_january_2007">11.9. v1.0RC2 - 10th January 2007</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Add install target to install application and associated scripts
</p>
</li>
<li>
<p>
Documentation now generated using asciidoc
</p>
</li>
<li>
<p>
Scripts for ripping now included (including modification of TOC files where necessary)
</p>
</li>
<li>
<p>
PAGE UP and PAGE DOWN can now be used for scrolling in windows
</p>
</li>
<li>
<p>
Always use index number 1 when calculating TOC for FLAC file
</p>
</li>
<li>
<p>
Convert accented characters to standard characters in filenames
</p>
</li>
<li>
<p>
Add --discid option to report calculated discid for FLAC file
</p>
</li>
<li>
<p>
Fix various compilation errors on some systems
</p>
</li>
<li>
<p>
Report differences in tags when using --check option
</p>
</li>
<li>
<p>
Compare real path of file (not path used in command line which could be
relative) to see if renaming should be allowed
</p>
</li>
<li>
<p>
Don&#8217;t write ALBUMARTIST tag (causes problems with artist sorting in current SlimServer software)
</p>
</li>
<li>
<p>
Add --force-write option
</p>
</li>
<li>
<p>
Correctly write UTF8 values for tags
</p>
</li>
</ul></div>
<h3 id="_v1_0_rc1_12th_october_2006">11.10. v1.0-RC1 - 12th October 2006</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Add command line options and ability to handle more than one FLAC file
</p>
</li>
<li>
<p>
Store cover art embedded into file tags
</p>
</li>
<li>
<p>
Handle console screen size changes
</p>
</li>
<li>
<p>
Retrieve more tags from MusicBrainz
</p>
</li>
</ul></div>
<h3 id="_v0_04_23rd_september_2006">11.11. v0.04 - 23rd September 2006</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Software released under the GPL
</p>
</li>
<li>
<p>
Add ability to rename file after tagging
</p>
</li>
<li>
<p>
Add logging capability (all log messages are queued and display on exit)
</p>
</li>
<li>
<p>
Add facility to download album cover art from Amazon
</p>
</li>
<li>
<p>
Store more Musicbrainz related information in tags
</p>
</li>
</ul></div>
<h3 id="_v0_03_18th_september_2006">11.12. v0.03 - 18th September 2006</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Fix serious bug in generating submission URLs
</p>
</li>
</ul></div>
<h3 id="_v0_02_18th_september_2006">11.13. v0.02 - 18th September 2006</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Correctly handle multi-album disc sets
</p>
</li>
<li>
<p>
Include ARTISTSORT tag
</p>
</li>
<li>
<p>
Retrieve Amazon ASIN in preparation for downloading cover art
</p>
</li>
</ul></div>
<h3 id="_v0_01_16th_september_2006">11.14. v0.01 - 16th September 2006</h3><div style="clear:left"></div>
<div class="ulist"><ul>
<li>
<p>
Initial version
</p>
</li>
</ul></div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated 2012-06-19 13:40:34 BST
</div>
</div>
</body>
</html>