File: cue2toc.1

package info (click to toggle)
cue2toc 0.4-5.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 408 kB
  • sloc: ansic: 1,314; sh: 400; makefile: 15
file content (451 lines) | stat: -rw-r--r-- 10,528 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
.\" cue2toc.1 - manual page for cue2toc
.\" Copyright (C) 2004 Matthias Czapla <dermatsch@gmx.de>
.\"
.\" This file is part of cue2toc.
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
.\"
.TH CUE2TOC 1

.SH NAME
cue2toc \- convert CUE to TOC format

.SH SYNOPSIS
.BR "cue2toc" " [" "-dhqv" "] [" "-o"
.IR "tocfile" "] [" "cuefile" "]"

.SH DESCRIPTION
.B Cue2toc
converts
.I cuefile
from CUE to TOC format and writes the result to
.IR "tocfile" "."
If either
.IR "cuefile" " or " "tocfile"
is omitted or a single dash "-"
.B cue2toc
reads from standard input and writes to standard ouput
respectively.

CUE files are text files describing the layout of a CD-Rom and
typically carry the extension ".cue".

Cdrdao is a CD-burning application which has its own native TOC
format to describe the disc layout. Although cdrdao has direct
support for reading CUE files, it is currently limited to data
tracks only. So
.BR "cue2toc" "'s"
main usefulness lies in converting
CUE files containing audio tracks.

CUE files for audio discs often come with data files in compressed
audio formats like MP3 or Ogg Vorbis. To burn such a disc with
cdrdao these files must be converted to WAVE or raw format.
.B Cue2toc
can do this automatically if configured properly (see section
.B CONFIGURATION
below for more information).

.B Cue2toc
normally displays warning messages for unsupported commands and
constructs as well as for each data file converted. The
.B -q
option disables these messages.

.SH OPTIONS

.TP
.B -d
print debugging information

.TP
.B -h
print a short help message

.TP
.BI "-o " "tocfile"
write result to
.I tocfile
instead of standard ouput

.TP
.B -q
quiet mode; do not print warnings

.TP
.B -v
display version information


.SH CUE FORMAT
What follows is a description of the CUE format expected by
.BR "cue2toc" "."
For information about the TOC format please consult the
.BR "cdrdao" "(1)"
manual page.

CUE files consist of commands and their arguments which must be
separated from each other by any number of whitespace characters.
Space, horizontal tabulator, newline and carriage return are
recognized as whitespace characters except inside strings surrounded
by double quotes, where they are part of the string. Commands are
not case sensitive. CD-Text data can be at most 80 characters per
item.

Timecode values are accepted in the forms "X:X:X", "X:X" and
"X" where each "X" must consist of at most two digits and may be
zero padded to the left. They are interpreted as "M:S:F", "S:F" and
"F" respectively where "M" means "minutes" and must be in the range
0 <= M <= 99, "S" means "seconds" and must be in the range
0 <= S <= 59, and "F" means "frames" and must be in the range
0 <= F <= 74.

CUE files are logically divided into a global section and
one to 99 track sections. Inside these sections the following
commands are allowed:

.SS Global Section

.B REM
.I anything_to_newline
.br
.B CATALOG
.I string
.br
.B CDTEXTFILE
.I string
.br
.B TITLE
.I string
.br
.B PERFORMER
.I string
.br
.B SONGWRITER
.I string
.br
.B FILE
.I string
.BR "BINARY" "|" "MOTOROLA" "|" "AIFF" "|" "WAVE" "|" "MP3"


.TP
.B REM
Optional.
Introduces a comment. Anything from there on up to and including the
next newline character is ignored. Comments can appear anywhere in
the file but not between a command and its arguments.

.TP
.B CATALOG
Optional.
The Media Catalog Number of the disc. Must be exactly 13 characters.

.TP
.B CDTEXTFILE
Optional.
Specifies an external file containing CD-Text data. Ignored.

.TP
.B TITLE
Optional.
The CD-Text title of the disc.

.TP
.B PERFORMER
Optional.
The CD-Text performer of the disc.

.TP
.B SONGWRITER
Optional.
The CD-Text songwriter of the disc.

.TP
.B FILE
Required.
The name and type of the file to be used for all following tracks.
The
.I string
contains the name of the file followed by one of
.BR "BINARY" ", " "MOTOROLA" ", " "AIFF" ", " "WAVE" " or " "MP3" "."
As far as
.B cue2toc
is concerned the type of the file is effectively ignored.
Nonetheless
.BR "MOTOROLA" ", " "AIFF" " and " "MP3"
cause printing of a warning message since these file types can
not be used directly with cdrdao.

.LP
The first appearance of a
.B TRACK
command causes leaving of the global section and entering the
track section.

.SS Track Section

.B TRACK
.I number
.I mode
.br
.B REM
.I anything_to_newline
.br
.B FLAGS
.RB "[" "DCP" "]"
.RB "[" "4CH" "]"
.RB "[" "PRE" "]"
.RB "[" "SCMS" "]"
.br
.B ISRC
.I string
.br
.B TITLE
.I string
.br
.B PERFORMER
.I string
.br
.B SONGWRITER
.I string
.br
.B PREGAP
.I timecode
.br
.B INDEX
.I number
.I timecode
.br
.B POSTGAP
.I timecode
.br
.B FILE
.I string
.BR "BINARY" "|" "MOTOROLA" "|" "AIFF" "|" "WAVE" "|" "MP3"


.TP
.B TRACK
Required.
Starts a new track definition. The
.I number
is ignored. The
.I mode
must be one of
.BR "AUDIO" ", " "MODE1/2048" ", " "MODE1/2352" ","
.BR "MODE2/2336" " or " "MODE2/2352" "."

.TP
.B FLAGS
Optional.
Defines the flags for this track. Must be followed by one
or more of the following commands:
.B DCP
(digital copy permitted),
.B 4CH
(four channel audio),
.B PRE
(pre-emphasis enabled) and
.B SCMS
(serial copy management system).
.B SCMS
is ignored because there is no corresponding option in
the TOC format.

.TP
.B ISRC
Optional.
The International Standard Recording Code for this track. Must
be exactly 12 characters long.

.TP
.B TITLE
Optional.
The CD-Text title of this track.

.TP
.B PERFORMER
Optional.
The CD-Text performer of this track.

.TP
.B SONWRITER
Optional.
The CD-Text songwriter of this track.

.TP
.B PREGAP
Optional.
The length of the track pregap to be filled with zero data.
Mutually exclusive with
.BR "INDEX 0" "."

.TP
.B POSTGAP
Optional.
The length of the track postgap to be filled with zero data.

.TP
.B INDEX
Optional.
The
.I number
must be in the range 0 <=
.I number
<= 99. Index number 1 specifies the start of the track. Index
number 0 is the start of the track pregap filled with data
from the file, i.e. the difference between index 0 and index 1
is the length of the pregap. Index 0 is mutually exclusive with
.BR "PREGAP" "."
Index numbers greater than 1 specify subindexes for this track
and must be sequential.

.TP
.B FILE
Optional in track section. The syntax is the same as described
above and if it appears inside a track specification it takes
effect on the next
.B TRACK
command.


.SH CONFIGURATION

.B Cue2toc
can be configured by specifying options in the file
~/.cue2tocrc. The syntax of this file and allowed
configuration options follow.

Comments are introduced by the hash character '#' and
extend to the end of the line. Configuration options
take the form

.nf
OPTION = value
.fi

The value must be quoted if it contains whitespace characters.
To include a double quote character in a quoted string,
precede it with a backslash. Option values can either be of
boolean type or string type. For boolean types any one of
"yes", "y", "true" or "1" means true and anything else means
false. The "default\ value" in the descriptions of the
individual options below is the value assumed by
.B cue2toc
in the absence of the option from the configuration file.


.TP
.BI "CONVERTER = " "ext_from ext_to command"
This option takes three string arguments and specifies
a converter for files with the extension ext_from. They
are converted by the given command and the extension
is replaced with ext_to in the TOC file. When the command
is run the environment will contain the two variables
C2T_FROM and C2T_TO which contain the original and new
file name respectively. For example

.nf
CONVERTER = .mp3 .wav
	"lame --decode \\"$C2T_FROM\\" \\"$C2T_TO\\""
.fi

will convert all MP3 files to WAVE format using lame. It is
a good idea to quote the varibles $C2T_FROM and $C2T_TO
because they could contain whitespace or other funny characters
with a special meaning to the shell.

This option can be specified multiple times and each
file is checked against the list of converters to see if it
matches any of them. If
multiple converters match a given file only the first
match is used.

If a file with the name that results from replacing ext_from
with ext_to already exists, the conversion command will not
be executed.

This option has no default value.

.TP
.BI "CONVERT = " "boolean"
This option enables or disables the conversion of data files
as described above for the CONVERTER option.
If this option is false, no conversion will take place.
The default value is "yes".

.TP
.BI "QUIET = " "boolean"
If this option is true it has the same effect as if
.B cue2toc
was invoked with the
.B -q
command line option. The default value is "no".

.TP
.BI "CDTEXT = " "boolean"
This option enables or disables the writing of CD-Text
data to the TOC file if it is present in the CUE file.
The default value is "yes".


.SH LIMITATIONS

The command
.B CDTEXTFILE
and the flag
.B SCMS
have no equivalent in the TOC format and are ignored.

CUE files containing data tracks which specify a starting time
greater than zero cannot be converted by
.B cue2toc
because the TOC format does not provide a way to specify a
starting time at all for data tracks. However if the CUE file
does not contain any audio tracks you can try to use the CUE file
directly with cdrdao.


.SH FILES

.TP
~/.cue2tocrc
The configuration file. The format of this file is described
in the section
.B CONFIGURATION
above.


.SH SEE ALSO
.BR cdrdao (1),
.BR lame (1)

.SH BUGS

Since
.BR "cue2toc" "'s"
definition of the CUE format is entirely based on a number
of different CUE files the author came across there is a very
high probability that it will not work correctly with all the
other CUE files you might encounter. If this is the case for
you please send the problematic CUE file along with the version
number of
.B cue2toc
to <dermatsch@gmx.de>.


.SH AUTHOR
Matthias Czapla <dermatsch@gmx.de>