| 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=iso-8859-1" /> |
| 6 |
<title>lltag - Automatic command-line mp3/ogg/flac file tagger and renamer - How-To?</title> |
| 7 |
<link rel="stylesheet" type="text/css" href="main.css"/> |
| 8 |
</head> |
| 9 |
<body> |
| 10 |
|
| 11 |
<h1 class="title">lltag How-To?</h1> |
| 12 |
|
| 13 |
<div class="howto"> |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
<h2 class="section">Basics</h2> |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
<h3 class="question"><a id="basic_use">How do I use lltag?</a></h3> |
| 22 |
|
| 23 |
<pre> |
| 24 |
lltag myfile1.mp3 myfile2.ogg |
| 25 |
</pre> |
| 26 |
|
| 27 |
It is also possible to tag all files in subdirectories with: |
| 28 |
<pre> |
| 29 |
lltag -R mymusic/ |
| 30 |
</pre> |
| 31 |
|
| 32 |
All mp3, ogg and flac are processed, depending on their extension. |
| 33 |
If the extension is wrong, it is possible to force the file processing type: |
| 34 |
<pre> |
| 35 |
lltag --ogg myfile.mp3 |
| 36 |
</pre> |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
<h3 class="question"><a id="see_current_tags">How do I see current tags in files?</a></h3> |
| 41 |
|
| 42 |
All the tags currently existing in files may be displayed: |
| 43 |
<pre> |
| 44 |
lltag -S * |
| 45 |
</pre> |
| 46 |
|
| 47 |
It is also possible to only display some tags: |
| 48 |
<pre> |
| 49 |
lltag --show-tags artist,album,title,number * |
| 50 |
</pre> |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
<h3 class="question"><a id="set_tags_by_hand">How do I set tags by hand?</a></h3> |
| 55 |
|
| 56 |
Any tag may be changed by hand: |
| 57 |
<pre> |
| 58 |
lltag --artist "myartist" --album "myalbum" --genre "rock" --comment="very cool" *.mp3 |
| 59 |
</pre> |
| 60 |
|
| 61 |
File types that support random tag names (ogg and flac currently) may also get random tags: |
| 62 |
<pre> |
| 63 |
lltag --tag foo=nil bar.ogg |
| 64 |
</pre> |
| 65 |
|
| 66 |
It is also possible to clear a tag: |
| 67 |
<pre> |
| 68 |
lltag --tag foo= bar.ogg |
| 69 |
</pre> |
| 70 |
|
| 71 |
And all tags may be removed from all files: |
| 72 |
<pre> |
| 73 |
lltag --clear *.flac |
| 74 |
</pre> |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
<h2 class="section">Disabling, Confirming, Forcing</h2> |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
<h3 class="question"><a id="do_not_tag">How do I try lltag without actually tagging?</a></h3> |
| 83 |
|
| 84 |
<pre> |
| 85 |
lltag --dry-run |
| 86 |
</pre> |
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
<h3 class="question"><a id="change_confirm">How do I change what confirmation lltag wants?</a></h3> |
| 91 |
|
| 92 |
It is possible to remove any need for confirmation when no problem occurs: |
| 93 |
<pre> |
| 94 |
lltag --yes myfile.flac |
| 95 |
</pre> |
| 96 |
|
| 97 |
It is also possible to force confirmation when <tt>lltag</tt> parses the |
| 98 |
filename with user-provided formats: |
| 99 |
<pre> |
| 100 |
lltag --ask myfile.ogg |
| 101 |
</pre> |
| 102 |
|
| 103 |
Finally, during confirmation, it is possible to use <tt>Always</tt> to enable |
| 104 |
<tt>--yes</tt> at runtime. |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
<h2 class="section">Parsing</h2> |
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
<h3 class="question"><a id="see_parsing">How do I see how lltag parses filename?</a></h3> |
| 113 |
|
| 114 |
<tt>lltag</tt> uses internal format that are defined in <tt>/etc/lltag/formats/</tt>. |
| 115 |
You might see them with: |
| 116 |
<pre> |
| 117 |
lltag -L |
| 118 |
</pre> |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
<h3 class="question"><a id="force_format">How do I force lltag to use another format?</a></h3> |
| 123 |
|
| 124 |
If internal formats do not fit the way your filename is written, you may pass |
| 125 |
additional formats with: |
| 126 |
<pre> |
| 127 |
lltag -F "%a-%t" -F "%n)%a-%t" myfile1.mp3 myfile2.flac |
| 128 |
</pre> |
| 129 |
|
| 130 |
It is also possible to try user-provided formats and then try internal formats: |
| 131 |
<pre> |
| 132 |
lltag -F "%a-%t" -F "%n)%a-%t" -G myfile1.mp3 myfile2.flac |
| 133 |
</pre> |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
<h3 class="question"><a id="preferred_parser">What is the preferred parser?</a></h3> |
| 138 |
|
| 139 |
If all your filenames have the same format, i.e. they may be matched with the |
| 140 |
same parser, you might want to try this one first instead of seeing the other |
| 141 |
ones fail or having to skip them. |
| 142 |
When confirming parsing, you may choose to accept the current parser and mark |
| 143 |
it as <em>preferred</em> so that <tt>lltag</tt> will try it first for the next |
| 144 |
files, and not ask you for confirmation as long as it parses filenames fine. |
| 145 |
<br /> |
| 146 |
|
| 147 |
If one filename cannot be matched by the <em>preferred</em> parser, <tt>lltag</tt> |
| 148 |
will revert to the common behavior. Any other parser, or the same previous one, |
| 149 |
may be marked as <em>preferred</em> later again. |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
<h2 class="section">Getting tags from the online CDDB</h2> |
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
<h3 class="question"><a id="what_is_cddb">What is CDDB and why does lltag need it?</a></h3> |
| 158 |
|
| 159 |
CDDB is a huge online database of CD describing their artist, album, date, |
| 160 |
tracks, ... everything that <tt>lltag</tt> considers as tags. |
| 161 |
|
| 162 |
By default, <tt>lltag</tt> accesses the database on <tt>www.freedb.org</tt> |
| 163 |
through the HTTP protocol. The server and its port may be changed on the |
| 164 |
command-line: |
| 165 |
<pre> |
| 166 |
lltag --cddb --cddb-server mycddb.mydomain.org:443 * |
| 167 |
</pre> |
| 168 |
|
| 169 |
In case of a HTTP proxy being required for HTTP request, <tt>lltag</tt> |
| 170 |
may also be configured to use it: |
| 171 |
<pre> |
| 172 |
lltag --cddb --cddb-proxy myhttpproxy.mydomain.org:3128 * |
| 173 |
</pre> |
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
<h3 class="question"><a id="cddb_get_tags">How do get tags from CDDB?</a></h3> |
| 178 |
|
| 179 |
The common way to search a CD on CDDB is to pass keywords, which return a list |
| 180 |
of matching CDs. Then, you choose a CD in the list, and a track in the CD tracks. |
| 181 |
<br /> |
| 182 |
|
| 183 |
When entering the <tt>lltag</tt> CDDB menu for the first time, you need to |
| 184 |
enter keywords to find the CD that match the audio file you are processing. |
| 185 |
<tt>lltag</tt> will return a list of CD. At this point, you may either go back |
| 186 |
to search with other keywords, or enter the index of the CD that you want. |
| 187 |
<br /> |
| 188 |
|
| 189 |
Then, <tt>lltag</tt> will display of the CD you have chosen and of its tracks. |
| 190 |
You may then choose a track and use it to tag/rename your file, or go back to |
| 191 |
choose another CD, or go back more to change the keywords. |
| 192 |
<br /> |
| 193 |
|
| 194 |
When coming back to CDDB the next time, <tt>lltag</tt> will propose the next |
| 195 |
track of the previous CD that you used, so that processing an entire album |
| 196 |
is quick and easy. |
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
<h3 class="question"><a id="choose_cddb_cd">How do choose a precise CD in CDDB?</a></h3> |
| 201 |
|
| 202 |
All CD that are registered in CDDB are identified by a category and an |
| 203 |
hexadecimal identifier. When searching by keywords, <tt>lltag</tt> will |
| 204 |
return a list of matching CD with their category/identifier in parentheses. |
| 205 |
<br /> |
| 206 |
|
| 207 |
It is also possible to directly enter this category/identifier instead |
| 208 |
of keywords to get a precise CD quickly. |
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
<h3 class="question"><a id="interactive_cddb">Is the interactive interface always required to access CDDB?</a></h3> |
| 213 |
|
| 214 |
The CDDB interface seems to be designed for interactive usage since the user |
| 215 |
is supposed to choose a CD in the list of CDs returned by the keywords query, |
| 216 |
and then choose a track in the CD. |
| 217 |
But, it is also possible to use CDDB automatically if the CD id is known and |
| 218 |
the files are ordered by track numbers. |
| 219 |
<br /> |
| 220 |
|
| 221 |
The CD id may be given on the command line: |
| 222 |
<pre> |
| 223 |
lltag --cddb-query rock/a0b2c4d7 --yes * |
| 224 |
</pre> |
| 225 |
Using --yes enables automatic mode which means <tt>lltag</tt> will tag the |
| 226 |
first file as the first track of the CD returned by CDDB, the second file as |
| 227 |
the second track, ... |
| 228 |
|
| 229 |
If <tt>lltag</tt> ever reaches the end of the CD, it will return to interactive |
| 230 |
mode so that the user may choose another CD to tag the remaining files. |
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
<h2 class="section">Managing tags</h2> |
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
<h3 class="question"><a id="set_explicit">How do I set a specific value? What are explicit tag values?</a></h3> |
| 239 |
|
| 240 |
Each tag field may receive a specific value even if it is not obtained through |
| 241 |
parsing the filename or so: |
| 242 |
<pre> |
| 243 |
lltag -a MyArtist -y 1990 myfile.mp3 |
| 244 |
</pre> |
| 245 |
|
| 246 |
All regular fields may be defined like the above with <tt>-a</tt>, <tt>-t</tt>, |
| 247 |
<tt>-A</tt>, <tt>-n</tt>, <tt>-g</tt>, <tt>-d</tt> or <tt>-c</tt>. |
| 248 |
These (and any random tag) may also be set through <tt>--tag FIELD=value</tt>. |
| 249 |
|
| 250 |
These values are called explicit values. They are always added to the ones |
| 251 |
obtained through parsing or so, even if it means that the target tag will |
| 252 |
have multiple values. |
| 253 |
Playing with <tt>--clear</tt> or <tt>--append</tt> enables configuration |
| 254 |
of how they are actually added. |
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
<h3 class="question"><a id="cleanup_tag">How do I cleanup tags?</a></h3> |
| 259 |
|
| 260 |
If your filenames are dirty, it is possible to ask <tt>lltag</tt> to be flexible |
| 261 |
with spaces. Any space in the format might be matched with 0 or several spaces |
| 262 |
with: |
| 263 |
<pre> |
| 264 |
lltag --spaces myfile.mp3 |
| 265 |
</pre> |
| 266 |
|
| 267 |
The first letter of each word in each tag might be upcased with: |
| 268 |
<pre> |
| 269 |
lltag --maj myfile.mp3 |
| 270 |
</pre> |
| 271 |
|
| 272 |
If the filename contains special characters that have to be translated into |
| 273 |
spaces for tags: |
| 274 |
<pre> |
| 275 |
lltag --sep _|-|: myfile.mp3 |
| 276 |
</pre> |
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
<h2 class="section">Renaming</h2> |
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
<h3 class="question"><a id="rename">How do I rename files after tagging?</a></h3> |
| 285 |
|
| 286 |
Files might be renamed using the tags that were gotten from original filename parsing: |
| 287 |
<pre> |
| 288 |
lltag myfile.mp3 --rename "%a - %t.mp3" |
| 289 |
</pre> |
| 290 |
|
| 291 |
Tags might be lowcased before renaming, and spaces might be replaced with another character: |
| 292 |
<pre> |
| 293 |
lltag myfile.mp3 --rename "%a - %t.mp3" --rename-min --rename-sep _ |
| 294 |
</pre> |
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
<h3 class="question"><a id="rename_without_tagging">How do I rename files without tagging?</a></h3> |
| 299 |
|
| 300 |
<tt>lltag</tt> may also be used as a renaming program without any tagging: |
| 301 |
|
| 302 |
<pre> |
| 303 |
lltag --no-tagging -F "%A/%n. %a - %t" --rename "%a - %A/%n - %t" */*.ogg |
| 304 |
</pre> |
| 305 |
|
| 306 |
Note that <tt>lltag</tt> may rename using existing tags even if the old filename |
| 307 |
is useless. Matching with <tt>"%i"</tt> to ignore the old filename might be useful |
| 308 |
in this case. |
| 309 |
|
| 310 |
<pre> |
| 311 |
lltag --no-tagging --rename "%a - %A/%n - %t" */*.ogg |
| 312 |
</pre> |
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
</div> |
| 317 |
|
| 318 |
<hr /> |
| 319 |
|
| 320 |
<address id="addr"> |
| 321 |
The <a href="mailto:lltag AT googlegroups.com">lltag team</a>. |
| 322 |
</address> |
| 323 |
|
| 324 |
<div id="modif"> |
| 325 |
$Id: howto.html,v 1.2 2006/05/07 00:57:26 bgoglin Exp $ |
| 326 |
</div> |
| 327 |
|
| 328 |
</body> |
| 329 |
</html> |