File: howto.html

package info (click to toggle)
lltag 0.14.4-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 448 kB
  • ctags: 301
  • sloc: perl: 2,833; makefile: 120; sh: 17
file content (343 lines) | stat: -rw-r--r-- 9,778 bytes parent folder | download
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
<!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=iso-8859-1" />
 <title>lltag - Automatic command-line mp3/ogg/flac file tagger and renamer - How-To?</title>
 <link rel="stylesheet" type="text/css" href="main.css"/>
</head>
<body>

<h1 class="title">lltag How-To?</h1>

<div class="howto">



<h2 class="section">Basics</h2>



<h3 class="question"><a id="basic_use">How do I use lltag?</a></h3>

<pre>
  lltag myfile1.mp3 myfile2.ogg
</pre>

It is also possible to tag all files in subdirectories with:
<pre>
  lltag -R mymusic/
</pre>

All mp3, ogg and flac are processed, depending on their extension.
If the extension is wrong, it is possible to force the file processing type:
<pre>
  lltag --ogg myfile.mp3
</pre>



<h3 class="question"><a id="see_current_tags">How do I see current tags in files?</a></h3>

All the tags currently existing in files may be displayed:
<pre>
  lltag -S *
</pre>

It is also possible to only display some tags:
<pre>
  lltag --show-tags artist,album,title,number *
</pre>



<h3 class="question"><a id="set_tags_by_hand">How do I set tags by hand?</a></h3>

Any tag may be changed by hand:
<pre>
  lltag --artist "myartist" --album "myalbum" --genre "rock" --comment="very cool" *.mp3
</pre>

File types that support random tag names (ogg and flac currently) may also get random tags:
<pre>
  lltag --tag foo=nil bar.ogg
</pre>

It is also possible to clear a tag:
<pre>
  lltag --tag foo= bar.ogg
</pre>

And all tags may be removed from all files:
<pre>
  lltag --clear *.flac
</pre>



<h2 class="section">Disabling, Confirming, Forcing</h2>



<h3 class="question"><a id="do_not_tag">How do I try lltag without actually tagging?</a></h3>

<pre>
  lltag --dry-run
</pre>



<h3 class="question"><a id="change_confirm">How do I change what confirmation lltag wants?</a></h3>

It is possible to remove any need for confirmation when no problem occurs:
<pre>
  lltag --yes myfile.flac
</pre>

It is also possible to force confirmation when <tt>lltag</tt> parses the 
filename with user-provided formats:
<pre>
  lltag --ask myfile.ogg
</pre>

Finally, during confirmation, it is possible to use <tt>Always</tt> to enable
<tt>--yes</tt> at runtime.



<h2 class="section">Parsing</h2>



<h3 class="question"><a id="see_parsing">How do I see how lltag parses filename?</a></h3>

<tt>lltag</tt> uses internal format that are defined in <tt>/etc/lltag/formats/</tt>.
You might see them with:
<pre>
  lltag -L
</pre>



<h3 class="question"><a id="force_format">How do I force lltag to use another format?</a></h3>

If internal formats do not fit the way your filename is written, you may pass
additional formats with:
<pre>
  lltag -F "%a-%t" -F "%n)%a-%t" myfile1.mp3 myfile2.flac
</pre>

It is also possible to try user-provided formats and then try internal formats:
<pre>
  lltag -F "%a-%t" -F "%n)%a-%t" -G myfile1.mp3 myfile2.flac
</pre>



<h3 class="question"><a id="preferred_parser">What is the preferred parser?</a></h3>

If all your filenames have the same format, i.e. they may be matched with the
same parser, you might want to try this one first instead of seeing the other
ones fail or having to skip them.
When confirming parsing, you may choose to accept the current parser and mark
it as <em>preferred</em> so that <tt>lltag</tt> will try it first for the next
files, and not ask you for confirmation as long as it parses filenames fine.
<br />

If one filename cannot be matched by the <em>preferred</em> parser, <tt>lltag</tt>
will revert to the common behavior. Any other parser, or the same previous one,
may be marked as <em>preferred</em> later again.



<h2 class="section">Getting tags from the online CDDB</h2>



<h3 class="question"><a id="what_is_cddb">What is CDDB and why does lltag need it?</a></h3>

CDDB is a huge online database of CD describing their artist, album, date,
tracks, ... everything that <tt>lltag</tt> considers as tags.

By default, <tt>lltag</tt> accesses the database on <tt>www.freedb.org</tt>
through the HTTP protocol. The server and its port may be changed on the
command-line:
<pre>
  lltag --cddb --cddb-server mycddb.mydomain.org:443 *
</pre>

In case of a HTTP proxy being required for HTTP request, <tt>lltag</tt>
may also be configured to use it:
<pre>
  lltag --cddb --cddb-proxy myhttpproxy.mydomain.org:3128 *
</pre>



<h3 class="question"><a id="cddb_get_tags">How do get tags from CDDB?</a></h3>

The common way to search a CD on CDDB is to pass keywords, which return a list
of matching CDs. Then, you choose a CD in the list, and a track in the CD tracks.
<br />

When entering the <tt>lltag</tt> CDDB menu for the first time, you need to
enter keywords to find the CD that match the audio file you are processing.
<tt>lltag</tt> will return a list of CD. At this point, you may either go back
to search with other keywords, or enter the index of the CD that you want.
<br />

Then, <tt>lltag</tt> will display of the CD you have chosen and of its tracks.
You may then choose a track and use it to tag/rename your file, or go back to
choose another CD, or go back more to change the keywords.
<br />

When coming back to CDDB the next time, <tt>lltag</tt> will propose the next
track of the previous CD that you used, so that processing an entire album
is quick and easy.



<h3 class="question"><a id="choose_cddb_cd">How do choose a precise CD in CDDB?</a></h3>

All CD that are registered in CDDB are identified by a category and an
hexadecimal identifier. When searching by keywords, <tt>lltag</tt> will
return a list of matching CD with their category/identifier in parentheses.
<br />

It is also possible to directly enter this category/identifier instead
of keywords to get a precise CD quickly.



<h3 class="question"><a id="interactive_cddb">Is the interactive interface always required to access CDDB?</a></h3>

The CDDB interface seems to be designed for interactive usage since the user
is supposed to choose a CD in the list of CDs returned by the keywords query,
and then choose a track in the CD.
But, it is also possible to use CDDB automatically if the CD id is known and
the files are ordered by track numbers.
<br />

The CD id may be given on the command line:
<pre>
  lltag --cddb-query rock/a0b2c4d7 --yes *
</pre>
Using --yes enables automatic mode which means <tt>lltag</tt> will tag the
first file as the first track of the CD returned by CDDB, the second file as
the second track, ...

If <tt>lltag</tt> ever reaches the end of the CD, it will return to interactive
mode so that the user may choose another CD to tag the remaining files.



<h2 class="section">Managing tags</h2>



<h3 class="question"><a id="set_explicit">How do I set a specific value? What are explicit tag values?</a></h3>

Each tag field may receive a specific value even if it is not obtained through
parsing the filename or so:
<pre>
  lltag -a MyArtist -y 1990 myfile.mp3
</pre>

All regular fields may be defined like the above with <tt>-a</tt>, <tt>-t</tt>,
<tt>-A</tt>, <tt>-n</tt>, <tt>-g</tt>, <tt>-d</tt> or <tt>-c</tt>.
These (and any random tag) may also be set through <tt>--tag FIELD=value</tt>.

These values are called explicit values. They are always added to the ones
obtained through parsing or so, even if it means that the target tag will
have multiple values.
Playing with <tt>--clear</tt> or <tt>--append</tt> enables configuration
of how they are actually added.



<h3 class="question"><a id="cleanup_tag">How do I cleanup tags?</a></h3>

If your filenames are dirty, it is possible to ask <tt>lltag</tt> to be flexible
with spaces. Any space in the format might be matched with 0 or several spaces
with:
<pre>
  lltag --spaces myfile.mp3
</pre>

The first letter of each word in each tag might be upcased with:
<pre>
  lltag --maj myfile.mp3
</pre>

If the filename contains special characters that have to be translated into
spaces for tags:
<pre>
  lltag --sep _|-|: myfile.mp3
</pre>



<h2 class="section">Renaming</h2>



<h3 class="question"><a id="rename">How do I rename files after tagging?</a></h3>

Files might be renamed using the tags that were gotten from original filename parsing:
<pre>
  lltag myfile.mp3 --rename "%a - %t.mp3"
</pre>

Tags might be lowcased before renaming, and spaces might be replaced with another character:
<pre>
  lltag myfile.mp3 --rename "%a - %t.mp3" --rename-min --rename-sep _
</pre>



<h3 class="question"><a id="rename_without_tagging">How do I rename files without tagging?</a></h3>

<tt>lltag</tt> may also be used as a renaming program without any tagging:

<pre>
  lltag --no-tagging -F "%A/%n. %a - %t" --rename "%a - %A/%n - %t" */*.ogg
</pre>

Note that <tt>lltag</tt> may rename using existing tags even if the old filename
is useless. Matching with <tt>"%i"</tt> to ignore the old filename might be useful
in this case.

<pre>
  lltag --no-tagging --rename "%a - %A/%n - %t" */*.ogg
</pre>



</div>

<hr />

<p style="text-align: center">
<a href="http://validator.w3.org/check/referer">
 <img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1!" class="icon" />
</a>

<a href="http://jigsaw.w3.org/css-validator/check/referer">
 <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" class="icon" />
</a>

<a href="http://validator.loulous.org/check?uri=referer">
 <img style="border:0;width:88px;height:31px;" src="http://loulous.org/loulous.png" alt="Loulous Compliant" />
</a>
</p>

<address id="addr">
 The <a href="mailto:lltag-users AT gna.org">lltag team</a>.
</address>

<div id="modif">
 $Id: howto.html,v 1.2 2006/05/07 00:57:26 bgoglin Exp $
</div>

</body>
</html>