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 preferred so that lltag will try it first for the next
files, and not ask you for confirmation as long as it parses filenames fine.
If one filename cannot be matched by the preferred parser, lltag
will revert to the common behavior. Any other parser, or the same previous one,
may be marked as preferred later again.
CDDB is a huge online database of CD describing their artist, album, date,
tracks, ... everything that lltag considers as tags.
By default, lltag accesses the database on www.freedb.org
through the HTTP protocol. The server and its port may be changed on the
command-line:
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.
When entering the lltag CDDB menu for the first time, you need to
enter keywords to find the CD that match the audio file you are processing.
lltag 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.
Then, lltag 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.
When coming back to CDDB the next time, lltag will propose the next
track of the previous CD that you used, so that processing an entire album
is quick and easy.
All CD that are registered in CDDB are identified by a category and an
hexadecimal identifier. When searching by keywords, lltag will
return a list of matching CD with their category/identifier in parentheses.
It is also possible to directly enter this category/identifier instead
of keywords to get a precise CD quickly.
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.
The CD id may be given on the command line:
lltag --cddb-query rock/a0b2c4d7 --yes *
Using --yes enables automatic mode which means lltag will tag the
first file as the first track of the CD returned by CDDB, the second file as
the second track, ...
If lltag 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.
Each tag field may receive a specific value even if it is not obtained through
parsing the filename or so:
lltag -a MyArtist -y 1990 myfile.mp3
All regular fields may be defined like the above with -a, -t,
-A, -n, -g, -d or -c.
These (and any random tag) may also be set through --tag FIELD=value.
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 --clear or --append enables configuration
of how they are actually added.
If your filenames are dirty, it is possible to ask lltag to be flexible
with spaces. Any space in the format might be matched with 0 or several spaces
with:
lltag --spaces myfile.mp3
The first letter of each word in each tag might be upcased with:
lltag --maj myfile.mp3
If the filename contains special characters that have to be translated into
spaces for tags:
Note that lltag may rename using existing tags even if the old filename
is useless. Matching with "%i" to ignore the old filename might be useful
in this case.
lltag-0.14.4/Changes 0000644 0001750 0000144 00000056632 11615760622 013560 0 ustar bgoglin users lltag (0.14.4)
* Fix a typo in usage (reported by Jonas Kölker in Gna! bug #17836).
* Fix miscellaneous typos everywhere, reported by Debian's lintian.
-- Brice Goglin Tue, 02 Aug 2011 13:32:00 +0100
lltag (0.14.3)
* Add -T and --preserve-time, and the preserve_time configuration
file option, to preserve file modification time during tagging
(requested by Adam Rosi-Kessel in Gna! bug #12367).
* Do not try to display binary data tags such as cover front picture
(requested by Alexandre Buisse).
* Do not try to initialize readline in non-interactive environment,
only fail if readline is actually needed.
Thanks Miroslaw Zalewski in Debian bug #558831.
* Do not apply colors or bold/underline formatting to output messages
in non-interactive environment.
* Try command-line given user formats (with -F) before those given
in the config file (with 'format = ...').
* Add %n) %a - %t to the internal format database.
* Add --id3v2, synonym for --mp3v2 (requested by Alexandre Buisse).
* Display basename parsers both with and without path parsers when
listing internal parsers.
* Display the usage when there is nothing to do (requested by Alexandre
Buisse).
* Fix the case of some options in the manpage.
-- Brice Goglin Sun, 21 Mar 2010 00:06:00 +0100
lltag (0.14.2)
* Merge the whole concept of default and additional values into
"explicit tag values" which may be set with either -a, -A, -t,
-n, -d, -g and -c or the generic --tag command line option.
The default_* configuration options are removed.
Based on complaints from Alexandre Buisse and Olivier Schwander.
+ Fix the way they are exported in the config file.
* Replace slashes with dashes before renaming
(reported by Mark McEver in Gna! bug #10127).
+ Add --rename-slash to change dash into any other string.
* Fix track numbers into actual numbers (without track total).
-- Brice Goglin Sun, 16 Dec 2007 12:27:00 +0200
lltag (0.14.1)
* Make sure the last character of user-provided format is correctly
escaped (reported by Benjamin Saunders).
* Keep CDDB tags in UTF-8 when using a UTF-8 locale
(reported by Tino Keitel in Debian bug #418951).
* Set verbose level to 0 by default so that menu usage information
is not displayed unless the user explicitly request it, either
by passing -v on the command, or by typing 'h' in a menu
(requested by Alexandre Buisse).
+ Fix documentation about verbosity levels in the manpages.
* Fix typo in lltag.1 (reported by Georg Neis in Debian bug #438795).
* Fix typo in lltag_config.5 (reported by Emmanuel Jeandel).
-- Brice Goglin Sat, 22 Sep 2007 11:25:00 +0200
lltag (0.14)
* Add an optional ID3v2 tag support for MP3 files using MP3::Tag
(requested by lots of people), enabled with --mp3v2 for now.
+ Add --mp3read option to specify whether ID3v1 and v2 should be
read, and in which order (default is 21).
* Large rework of the core loop:
+ Display existing tags with the new ones to be set.
+ Add O to display existing tags, R to revert to them, Z to reset
to no tags at all, and n to skip tagging and jump to renaming.
+ Also try internal parsers when parsing from the main menu even
if -G was not given on the command line.
+ Support renaming from existing tags without any need to parse
and/or reapply tags when --rename and --no-tagging are passed
with nothing else (requested by Alexandre Buisse).
+ Make sure guessing is enabled as default only when there is
really nothing else to do.
+ Make sure we apply additional values to new tags before merging
and defaults at the very end, so that --clear and --append are
correctly processed.
* Tag edition improvements:
+ Support edition of existing tags and tags with multiple values.
+ Support edition of all CD tags returned by CDDB.
+ Add -E/--edit (and edit option in the configuration file) to
edit tags immediately.
* Make the old MP3 backend more safe:
+ Check genre and tracknumbers and ignore invalid values to avoid
mp3info failures.
+ Add warnings about multiple values and special tags that are not
supported.
* Add -q/--quiet to reduce verbosity, useful to disable displaying
of menu usage when a menu appears for the first time
(requested by Alexandre Buisse).
+ The verbose option in the config file is now a verbose level,
with its default being 1.
* Miscellaneous fixes:
+ Support removing of all tags.
+ Handle Ctrl-d in interactive menus and make it cancel the current
operation without quitting, as opposed to Ctrl-c
(requested by Alexandre Buisse).
+ Uniformize the letter to enter to view current values (changed
'v' into 'V' in the CDDB menus).
* Documentation updates and fixes:
+ Add an EXAMPLES section at the end of the lltag.1 manpage
(requested by Stefano Sabatini in Debian bug #406213) and also
insert more basic command lines in the howto.html documentation.
+ Explain the difference between default and additional values in
the howto.
+ Explain how the strategies are used, how new tags are generated
and applied, in the DESCRIPTION section of lltag.1.
+ Have the lltag_config.5 manpage also point to the config template
file provided in the documentation directory.
* Lots of other minor fixes.
-- Brice Goglin Mon, 09 Apr 2007 11:22:00 +0200
lltag (0.13.1)
* Multiple fixes regarding parsing:
+ Try to apply internal parsers immediately after reading the formats
file and catch error gracefully instead of dying later horribly.
+ Catch errors gracefully when actually parsing filenames too.
+ Report the beginning line (instead of a later one) in the formats
file when meeting an invalid parser.
+ Check that the formats given either with -F or in the formats file
have correct number of fields to match, and that we actually get the
same number of fields after matching.
+ Escape []() correctly in internal parsers (reported by David Mohr).
+ Print the regexp when listing internal parsers in verbose mode
(requested by David Mohr).
+ Improve documentation about the impact of --spaces on internal parsers.
+ Add 2 new internal formats ("%a/%A [%d]" and "%a/%A (%d)") by David
Mohr.
* Multiple cleanup in the documentation:
+ Install the config file in the doc/ directory instead of /etc/lltag/
since it only contains documentation, no actual configuration.
+ Move configuration option documentation into the new lltag_config.5
manpage, and the documentation of internal formats database file in
lltag_formats.5.
+ Add install-man, uninstall-man, install-doc and uninstall-doc targets
in the Makefile to install manpages and documentation on demand.
+ Some fixes in the manpage.
* Hack the parameters that are passed during Perl modules installation
to deal with MakeMaker not using PREFIX in the common way. Without
this change, setting PREFIX=/usr/local on the make install command
line was installing in /usr/local/local/perl (reported by David Mohr).
-- Brice Goglin Fri, 01 Dec 2006 18:22:00 +0100
lltag (0.13)
* Fix CDDB, was broken since the HTTP search interface of freedb.org is
unavailable for now (closes Hamish Moffatt's Debian bug #397626).
+ CDDB now uses TrackType.org instead of freedb.org.
- Reorganize the CDDB code to make it easy to use other online CDDB
site, using kind of a backend interface.
+ Rewrite HTTP requests using libwww-perl.
+ Drop --cddb-proxy and use the HTTP_PROXY variable in the
environment (set it to something like "http://my.proxy.com").
+ libwww-perl (LWP) is now recommended since required for CDDB access.
* Several important fixes regarding internal tag management:
+ --clear, --append, additional tags (passed with --tag)
+ Handling of multiple values for the same tag.
- When tags have multiple value, do not keep the same value twice.
* Improve manpage and documentation:
+ Add "files..." to the synopsis in the manpage since lltag only
operates on files that are given on the command line (not on the
whole directory) and add a message in verbose mode when no files
are given (reported by Hamish Moffatt in Debian bug #397627).
+ Add the configuration file option name near the corresponding
command line option in the manpage.
+ Add a note, near -g, about the fact that the genre string might
have to match within a list of specified genres.
+ Add missing options in the comments in the config file.
+ Improve requirements in the README.
+ Main description at the beginning of the manpage.
+ Various fixes in the manpage.
* --nopath (i.e. -p) is now --no-path (and no_path in the config file).
* When --tag is passed, disable -G by default.
* Change the internal backend API to manipulate hash of values instead
of talking to external programs, to help upcoming backends.
- Conversion from hash to external programs (command line and output
stream) is moved to new helper functions for backends that need them.
-- Brice Goglin Thu, 16 Nov 2006 22:53:00 +0100
lltag (0.12.2)
* Fix %i processing (was broken since 0.12).
* Fix regexp application.
* Update the How-to about automatic CDDB and --cddb-query.
* Improve error messaging.
* Improve messaging in automatic mode.
* Cleanup Perl regexps.
-- Brice Goglin Mon, 23 Oct 2006 13:38:00 +0200
lltag (0.12.1)
* Improve automatization of CDDB:
+ Add --cddb-query to search in CDDB automatically from the
command-line with either keywords or category/id.
+ Add 'a' and ' a' to switch to automatic CDDB mode
while interactively choosing a track in a CD.
+ Fix automization of CDDB with --yes.
* When using 'a' to switch to automatic mode, only change the mode
for the local menu (i.e. automatic parsing does not make automatic
tagging or CDDB usage).
* If CDDB query by keywords finds nothing, go back to keywords query
instead of asking the user to choose in the (empty) list.
* Add %F, %E and %P to be replaced by original basename, extension
and path of the file when renaming.
* Add --type to make file type selection more flexible.
* Use DELETE or to erase a tag when editing.
* Add a easy-to-use backend interface to help adding support for
other file types.
+ Backend information (registrations and failures) are displayed
in verbose mode -v).
* Fix Perl modularization, no need to use Exporter module since we
access modular functions by prefixing with the module name.
* Improve some messages.
-- Brice Goglin Tue, 03 Oct 2006 16:22:00 +0200
lltag (0.12)
* Add CDDB support with -C or --cddb (or C in the main menu):
+ Search CD ids by keywords, with ability to choose categories
and fields to look in.
+ Lookup a CD by giving its category and CD id directly.
+ Keep the previous CD contents in memory so that the next track
might be tagged immediately.
+ Edit CDDB common tags before extracting a track from a CD.
+ Configurable HTTP CDDB server and proxy.
* Rework interactive menus to integrate CDDB better:
+ Add a main menu from where CDDB, parsing and editing is called.
+ Use 'q' to leave submenus (parsing, CDDB, renaming and editing).
+ Use 'q' instead of 's' to skip a file from the main menu.
+ Use 'y' to exit editing after save the changes.
+ Add 'Q' to exit completely.
+ Do not match user replies case-insensitively.
+ Large rework of the manpage to document the new menus.
* Some new entries in the How-To.
* Do not write guess option in the generated configuration file
unless explicitely asked by the user.
* Add a doc/ subdirectory:
+ The How-To is now also included in the tarball.
* Perl modularization.
* Add the date to the program name when compiling it from SVN.
-- Brice Goglin Tue, 19 Sep 2006 21:34:00 -0400
lltag (0.11)
* Always read existing tags first, allowing to:
+ Rename using existing tags when the old filename is useless
(requested by Fabien Wernli). In case of multiple occurence of a tag,
the first one is used.
+ Suppport replacing, clearing, and appending well for all types:
- Replacing is now the default for all types.
- Appending is useless for mp3 since only one occurence (the first one)
may be stored in the file.
- Remove the CLEARING, REPLACING OR APPENDING manpage section.
* Add --tag for additional tags, and warn when not storable in in mp3 files.
* Now use %d, -d and DATE instead of %y, -y and YEAR since ogg/flac tags
are dates.
* Use %i instead of %d to ignore some text when matching.
* Fix 'u' confirmation to try the current parser first for next files
(was broken since 0.10).
* 'basename' is now used instead of 'filename' for 'type' in the format
file, 'filename' is still supported for now.
* Do not rename if the new name already exists.
* Fix reading/tagging the date of ogg/flac files.
* Use all-capitals tag names to match ogg/flac.
+ default_ option is still supported in the config
for now.
* The indices in the format file may now be full field names instead of
letters.
* Print the default letter in <> instead of capital when confirming/editing.
* Add EDITING TAGS in the manpage.
* Add configuration options for the config file in the manpage.
* Fix quoting of the command-line in --dry-run.
* Large rework of the internal structures.
* Major cleanup of the manpage.
-- Brice Goglin Sat, 19 Mar 2006 23:56:00 -0500
lltag (0.10)
* Use Readline library to make tag editing easier if the installed
readline library is smart, with inline edition of existing tags
and history of last entered values.
* Added -S ans --show-tags to only show file tags instead of tagging
(requested by Stephane Gimenez in Gna! bug #4601).
* Add --regexp and --rename-regexp for basic regexp-replacing in tags
(requested by Jonathan Worth Washington, Gna! bug #4604).
* When renaming with a undefined track number, initialize it to 0.
* When renaming with a track number, make it at least 2 digits
(reported by Emmanuel Jeandel).
* Always write renaming configuration options with --gencfg, even
if renaming was not enabled.
* Cleanup core function names and several messages so that lltag speak
about matching instead of tagging. It avoids getting messages about
tagging while --no-tagging was passed (requested by Stephane Gimenez).
* Use ' instead of # to show spaces between command line argument
with --dry-run (requested by Emmanuel Jeandel).
* Allow to pass ()[] characters in the matching format without having
to escape them.
* Allow all %x in the renaming format when x is not a field letter.
* Fix where the 'd' field (dummy) is allowed.
* Fix the error when no formats file is found.
* Fix typos in the manpage (reported by Emmanuel Jeandel).
-- Brice Goglin Sat, 19 Nov 2005 02:41:00 -0500
lltag (0.9.1)
* Large fix of internal database format files processing:
+ Fix formats file parsing (last format was omitted).
+ If $HOME/.lltag/formats exists, /etc/lltag/formats is ignored.
+ Fix documentation.
* Add --config, --gencfg and /etc/lltag/config to configure lltag behavior
(requested by Stephane Gimenez).
* Do not warn when no file is passed.
-- Brice Goglin Mon, 17 Oct 2005 20:51:00 +0200
lltag (0.9)
* Add rename support with --rename (requested by Stephane Gimenez):
+ Add --rename-min to lowcase tags before renaming.
+ Add --rename-sep to replace spaces before renaming.
+ Add --rename-ext to assume the extension in provided in the rename format.
+ Add --no-tagging to rename file without actually tagging them.
* When compiling from SVN, add a +svn suffix to the version.
* Reorder usage in a comprehensible way.
* Do not be case-sensitive when looking at file extensions to guess their type.
-- Brice Goglin Sun, 2 Oct 2005 19:06:00 +0200
lltag (0.8)
* Add FLAC support (requested by Stephane Gimenez).
* Add --maj to upcase first letters in tags (requested by Stephane Gimenez).
-- Brice Goglin Tue, 27 Sep 2005 23:03:00 +0200
lltag (0.7.2)
* Fix compilation and installation when DESTDIR is overridden.
* Fix make uninstall.
* Add a VERSION file.
* Update all contact addresses and URLs since the project is
now hosted by Gna!.
-- Brice Goglin Thu, 22 Sep 2005 10:40:00 +0200
lltag (0.7.1)
* Add a warning (with reference to README) when system fails with ENOENT or EPERM.
* Cleanup system usage.
* Update contact address to gna.org and add it to README.
-- Brice Goglin Wed, 7 Sep 2005 17:57:18 +0200
lltag (0.7)
* Add --clear to force emptying of mp3 tags (default for ogg).
* Add --append to force appending of ogg tags
(default is overwrite, append is impossible for mp3).
* Add a section about clearing, replacing or appending in the manpage.
* Add 'comment' tag support (with -c or %c).
* Add missing options to the command line in the man page.
* Cleanup the way current values are shown,
show and .
* Accept both CLEAR and when editing fields.
* Cleanup system usage when tagging command, get the output
and show it in case of error.
* Don't add () after sub prototypes.
-- Brice Goglin Tue, 16 Aug 2005 00:39:18 +0200
lltag (0.6.2)
* Fix Debian tarball generation.
* Include COPYING and Changes in the tarball.
* Add a README.
* Document editing in the manpage (CLEAR and ).
-- Brice Goglin Fri, 12 Aug 2005 22:26:56 +0200
lltag (0.6.1)
* Guess by default.
* Fix wrong processing of return values when internal ou user parsing loops fail.
* Add clean target to the Makefile.
* A few typos.
-- Brice Goglin Sat, 30 Jul 2005 23:24:02 +0200
lltag (0.6)
* Allow to edit fields with 'e' during confirmation.
* Allow to see what would be done with 'v' during confirmation.
* Fix a few missing capitalization.
* Print "Nothing to do" when no field has to be tagged.
-- Brice Goglin Sat, 30 Jul 2005 21:36:27 +0200
lltag (0.5.5)
* Allow to pass multiple |-separated chars or strings to --sep.
* When a field appears multiple times in the format, lltag does not print all matched values.
It checks that they are identical, prints a warning if not, and keeps the first one.
* Do not tag when there's nothing to tag (fix bogus mp3info/vorbiscomment invocation).
* Add comments at the beginning of formats.
* Fix matching in man page.
-- Brice Goglin Sat, 30 Jul 2005 13:26:54 +0200
lltag (0.5.4)
* Allow to only set default values (no user formats given, no guess).
* Clean acceptable behavior, especially confirmation possibilities in various cases.
-- Brice Goglin Mon, 23 May 2005 00:35:26 +0200
lltag (0.5.3)
* Fix short and long option processing to set default field values.
* Add --list and -L to list internal formats.
* Add --version and -V to show version.
* Show version in usage.
* Automatically set version in the binary during install.
-- Brice Goglin Thu, 12 May 2005 21:27:15 +0200
lltag (0.5.2)
* "" means "yes" when confirming tagging.
* Use lltag.in to replace /etc/ directories during install.
* Add format file description to the manpage.
* Generate Gentoo tarball in the Makefile (thanks to David Baelde for the ebuild).
-- Brice Goglin Sun, 10 Apr 2005 00:41:08 +0200
lltag (0.5.1)
* Fix -G option for directory containing spaces.
* Add missing '%a - %A' path format.
-- Brice Goglin Wed, 30 Mar 2005 23:53:34 +0200
lltag (0.5)
* Add /etc/lltag/formats file to store formats.
* Move all internal formats to /etc/lltag/formats.
* Also read $HOME/.lltag/formats.
* Support --spaces option for user-specified formats.
* Add confirmation to manpage.
* Cleanup a few messages.
* Cleanup tag_file return values.
* A few other cleanups.
-- Brice Goglin Sun, 13 Mar 2005 20:24:22 +0100
lltag (0.4.2)
* Add -R|--recursive option.
* Check that files are really files.
* Fix path matching which could lead to parts of the path matched with
the filename.
-- Brice Goglin Mon, 7 Mar 2005 00:00:04 +0100
lltag (0.4.1)
* Add manpage.
* Add --sep option to ask replacement of a character by a space in tags.
* Do not accept multiple spaces by default.
* Add --spaces to accept multiple spaces.
* Accept spaces limiting path subpart.
* Add message when no format was found.
* Add the missing --format option equivalent to -F.
* Use GetOpt to handle options properly.
* Cleanup field showing.
* Cleanup internal structure names.
-- Brice Goglin Sun, 6 Mar 2005 22:15:45 +0100
lltag (0.4)
* Support guessing formats with -G.
- Internal filename parsers are (with variable whitespaces)
"%n - %a - %t", "%n - %t", "%n[.)] %t"
"%a - %n - %t", "%a - %t", "%t"
- Internal path parsers are (with variable whitespaces and
forgotten first directories)
"%a/%a - %A", "%a/%A", "%a", "%A"
* Add --yes to force tagging without confirmation when guessing.
* Add --ask to force confirmation when not guessing.
* Add an equivalent long option for each short option.
* Support mixing options and files on the command line.
* Add verbose message when setting default values.
* Show command line in verbose mode even if --dry-run wasn't passed.
* Cleanup command line showing.
* Cleanup wrong option detection.
* Fix format string matching to ensure the whole filename will be used.
* Change several ERROR messages into less noisy messages.
* Show usage on stdout instead of stderr.
* Fix usage.
-- Brice Goglin Sun, 6 Mar 2005 15:33:42 +0100
lltag (0.3.1)
* Add author and homepage to usage.
-- Brice Goglin Tue, 1 Mar 2005 02:14:44 +0100
lltag (0.3)
* Format must now be passed with -F.
* Multiple formats are allowed, the first that matches will be used.
* Extension is no-longer included in format.
* Support both ogg and mp3 tagging.
* --ogg and --mp3 options to force tagging instead of by-extension detection.
* Detect wrong %x code in format.
* Detect and warn about problematic regexps.
* Cleanup of messages.
* Large cleanup of the code.
* Split Debian and upstream changelogs.
* Add a Makefile.
-- Brice Goglin Sun, 27 Feb 2005 11:47:16 +0100
llmp3tag (0.2)
* Rewrite parsing of the format to create indexed regexp to fix some issues.
* %n now only matches numbers.
* Some cleanup in the code.
-- Brice Goglin Sun, 27 Feb 2005 02:14:50 +0100
llmp3tag (0.1)
* Initial release.
-- Brice Goglin Wed, 15 Dec 2004 19:47:00 +0200
lltag-0.14.4/COPYING 0000644 0001750 0000144 00000043076 11615760622 013316 0 ustar bgoglin users GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C) 19yy
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
lltag-0.14.4/lltag_config.5 0000644 0001750 0000144 00000010763 11615760622 014776 0 ustar bgoglin users .\" Process this file with
.\" groff -man -Tascii foo.1
.\"
.TH lltag_config 5 "NOVEMBER 2006"
.SH NAME
config \- Configuration file for lltag
.SH DESCRIPTION
The following options may be stored in
.I /etc/lltag/config
or the user's
.IR $HOME/.lltag/config ,
or in any file passed with
.IR --config .
Such a configuration file may also be generated with
.IR --gencfg .
.SH Obtaining tags
.I format = \fI"string"
.RS
Add a user-defined format
.RB [ -R ].
Might be used multiple times.
Default is to guess if no user-defined formats and no default field values are given.
.RE
.I guess = <0/1>
.RS
Try to guess if user-defined formats do not match
.RB [ -G ].
Default is
.BR 0 " (" disabled ") when no user-defined formats and no explicit values are given."
.RE
.I tag =
.RS
Add an explicit tag
.RB [ --tag ].
Might be used multiple times.
.RE
.SH Tweaking filename parsing
.I no_path = <0/1>
.RS
Do not use file path when matching filename
.RB [ -p ].
Default is
.BR 0 " (" disabled ")."
.RE
.I spaces = <0/1>
.RS
Allow no or multiple spaces
.RB [ --spaces ].
Default is
.BR 0 " (" disabled ")."
.RE
.SH Cleaning obtained tags
.I edit = <0/1>
.RS
Edit tags immediately
.RB [ --edit ].
Default is
.BR 0 " (" disabled ")."
.RE
.I maj = <0/1>
.RS
Upcase first letters of words in tags
.RB [ --maj ].
Default is
.BR 0 " (" disabled ")."
.RE
.I regexp = \fI"s/from/to/"
.RS
Replace \fIfrom\fR with \fIto\fR in all tags.
.I title,number:s/from/to/
replaces in title and number tags only.
Might be used multiple times
.RB [ --regexp ].
Default is to not apply any regexp.
.RE
.I sep = \fI"string"
.RS
Replace |-separated strings with space in tags.
Default is to not replace any separator.
.RE
.SH Configuration of tag application
.I type =
.RS
Force mp3, ogg of flac instead of by-extension detection
.RB [ --mp3 ", " --ogg " and " --flac ].
Default is
.BR none .
.RE
.I clear_tags = <0/1>
.RS
Clear all tags of audio files.
.BR [ --clear ].
Default is
.BR 0 " (" disabled ")."
.RE
.I append_tags = <0/1>
.RS
Append tags only instead of replacing old ones.
.RB [ --append ].
Default is
.BR 0 " (" disabled ")."
.RE
.I no_tagging = <0/1>
.RS
Do not actually tag files
.RB [ --no-tagging ].
Default is
.BR 0 " (" disabled ")."
.RE
.I preserve_time = <0/1>
.RS
Preserve file modification time during tagging
.RB [ --preserve-time ].
Default is
.BR 0 " (" disabled ")."
.RE
.SH Renaming
.I rename_format = \fI"string"
.RS
Rename file according to format
.RB [ --rename ].
Default is to not rename.
.RE
.I rename_min = <0/1>
.RS
Lowcase tags before renaming
.RB [ --rename-min ].
Default is
.BR 0 " (" disabled ")."
.RE
.I rename_regexp = \fI"s/from/to/"
.RS
Replace \fIfrom\fR with \fIto\fR in all tags before renaming.
.I title,number:s/from/to/
replaces in title and number tags only.
Might be used multiple times
.RB [ --rename-regexp ].
Default is to not apply any regexp.
.RE
.I rename_sep = \fI"string"
.RS
Replace spaces with a string in tags before renaming
.RB [ --rename-sep ].
Default is to not replace any separator.
.RE
.I rename_slash = \fI"string"
.RS
Replace slashes with a string in tags before renaming
.RB [ --rename-slash ].
Default is to replace with a dash.
.RE
.I rename_ext = <0/1>
.RS
Assume the rename format provides an extension
.RB [ --rename-ext ].
Default is
.BR 0 " (" disabled ")."
.RE
.SH Miscellaneous
.I dry_run = <0/1>
.RS
Do nothing but show what would have been done
.RB [ --dry-run ].
Default is
.BR 0 " (" disabled ")."
.RE
.I yes = <0/1>
.RS
Tag without asking for confirmation when guessing
and rename without asking for confirmation
.RB [ --yes ].
Default is
.BR 0 " (" disabled ")."
.RE
.I ask = <0/1>
.RS
Always ask for confirmation before tagging
.RB [ --ask ].
Default is
.BR 0 " (" disabled ")."
.RE
.I recursive = <0/1>
.RS
Recursively traverse all given subdirectories
.RB [ -R ].
Default is
.BR 0 " (" disabled ")."
.RE
.I verbose =
.RS
Message verbosity level
.RB [ -v " and " -q ].
Default is
.BR 0 " (" "only important messages" ")."
Other possible values are
.BR 1 " (" "show usage information when a menu is displayed for the first time" ")"
and
.BR 2 " (" "always show usage information before a menu appears" ")."
.RE
.SH CDDB configuration
.I cddb_server_name = "hostname"
.RS
Change the CDDB server name.
Default is
.BR www.freedb.org .
.RE
.I cddb_server_port =
.RS
Change the CDDB server port.
Default is
.BR 80 " (" HTTP ")."
.RE
.SH SEE ALSO
.PP
.BR lltag (1)
The
.I config
template file provided within the documentation directory.
.SH AUTHOR
Brice Goglin
lltag-0.14.4/lltag.1 0000644 0001750 0000144 00000053116 11615760622 013444 0 ustar bgoglin users .\" Process this file with
.\" groff -man -Tascii foo.1
.\"
.TH LLTAG 1 "NOVEMBER 2006"
.SH NAME
lltag - tag and rename mp3/ogg/flac music files automagically
.SH SYNOPSIS
.B lltag
.RB [ -C ]
.RB [ -E ]
.RB [ "-F " ]
.RB [ -G ]
.RB [ -p ]
.RB [ "-a " ]
.RB [ "-t " ]
.RB [ "-A " ]
.RB [ "-n " ]
.RB [ "-g " ]
.RB [ "-d " ]
.RB [ "-c " ]
.RB [ "--tag " ]
.RB [ --spaces ]
.RB [ --maj ]
.RB [ "--sep\ " ]
.RB [ "--regexp " ]
.RB [ --mp3/--ogg/--flac ]
.RB [ "--type " ]
.RB [ --clear ]
.RB [ --append ]
.RB [ --no-tagging ]
.RB [ --preserve-time ]
.RB [ "--rename " ]
.RB [ --rename-ext ]
.RB [ --rename-min ]
.RB [ "--rename-sep " ]
.RB [ "--rename-slash " ]
.RB [ "--rename-regexp " ]
.RB [ --dry-run ]
.RB [ --yes ]
.RB [ --ask ]
.RB [ "--cddb-query " ]
.RB [ "--cddb-server " ]
.RB [ -R ]
.RB [ -v ]
.RB [ -q ]
.RB [ "--config " ]
.RB [ "--gencfg " ]
.RB [ -S ]
.RB [ "--show-tags " ]
.RB [ -L ]
.RB [ -V ]
.RB [ -h ]
.RB files...
.\"
.SH DESCRIPTION
.B lltag
is a command-line tool to automagically set tags of MP3, OGG or FLAC
files. There are several ways to obtains the tags that will be set:
.TP
.B Parsing the filename
.B lltag
may either parse the filename using its own internal database
of commonly-used formats (default behavior, or when
.B -G
is passed), or some user-provided formats (when
.B -F
is passed).
.TP
.B Requesting from CDDB
.B lltag
may access an online CDDB database to extract tags from a track of a CD (when
.B -C
is passed).
.TP
.B Explicitly setting values
.B lltag
provides a set of command-line option to manually set various tags.
.TP
.B Manually editing values
.B lltag
provides an interactive interface to edit existing values
or any value provided by the above strategies.
.P
Each time, a new audio file is processed,
.B lltag
starts by trying to obtain new tags depending on the behavior options
given by the user.
First, if a preferred parser has been selected before, it is used to try
to parse the new filename.
Then, if editing is enabled
.RB ( -E ),
the user will be able to modify existing tag values.
Then, if CDDB is enabled
.RB ( -C ),
the user will be asked to request tags from the
online CDDB database.
Then, if the user provided any parsing format
.RB ( -F ),
or if guessing is enabled
.RB ( -G ),
.B lltag
will attempt to parse the filename.
Note that if no behavior is chosen at all on command-line, including no
renaming option, then parsing with the internal format database will be
used by default (as if
.B -G
had been passed).
As soon as one of the above strategies succeeds,
.B lltag
jumps to the main menu
where the user may either accept new tags or select another behavior (see
.B MAIN MENU
in
.B INTERACTIVE MENUS
below for details).
If
.B --yes
has been passed, or if automatic mode has been previously enabled in the menu,
it will proceed with tagging (and renaming if requested) and go on with the
next file.
The new tags that the selected strategy returns will be appended with
the explicit values given with
.BR " -a ", " -t ", " -A ", " -g ", " -n ", " -d ", " -c " or " --tag .
They will then either replace (default), clear and replace
.RB ( --clear )
or append to
.RB ( --append )
the existing tags in the target file.
Once the tags are known, a backend program or library is used to apply
them to the audio file (unless
.B --no-tagging
is passed).
.RB "The " MP3::Tag " Perl module or " mp3info
is used to tag
.B MP3
files while
.B vorbiscomment
is used for
.B OGG
files, and
.B metaflac
is used for
.B FLAC
files.
In the end, when called with
.BR --rename ,
the target file will also be renamed according to a user-provided format
filled with the tag values.
.SH OPTIONS
.TP
.BI "-A, --ALBUM" " "
Add a value for the \fIALBUM\fR tag.
.TP
.BI "-a, --ARTIST" " "
Add a value for the \fIARTIST\fR tag.
.TP
.BI "--append"
Force appending of ogg/flac tags
(instead of replacing existing tags).
The corresponding configuration file option is
.IR append_tags .
Since mp3 files may only get one tag of each type, appending
does nothing, the first occurence only is stored.
.TP
.B --ask
Always ask confirmation to the user before using a user-specified
parser. By default, all actions require confirmation, except when
a matching user-specified format is found.
The corresponding configuration file option is
.IR ask .
See
.B PARSING MENU
in
.B INTERACTIVE MENUS
below for details.
.TP
.B "-C, --cddb"
Try to find tags in the CDDB online database before trying to parse filenames.
The queries are sent using the HTTP interface, which means a HTTP proxy might
be used when required.
The corresponding configuration file option is
.IR cddb .
.TP
.BI "--cddb-query" " "
.TP
.BI "--cddb-query" " /"
Automatically search for CD matching or matching category
and id
as if the user passed
.B --cddb
and entered the query interactively in the module.
.TP
.BI "--cddb-server" " "
Change the CDDB server, and eventually its port.
The default is
.BR www.freedb.org:80 .
The corresponding configuration file options are
.IR cddb_server_name " and " cddb_server_port .
If a HTTP proxy is required to access the internet,
the environment variable
.B HTTP_PROXY
may be used (set to something like "http://my.proxy.com").
.TP
.BI "-c, --COMMENT" " "
Add a value for the \fICOMMENT\fR tag.
.TP
.B --clear
Force clearing of all tags before tagging
(instead of replacing existing tags).
The corresponding configuration file option is
.IR clear_tags .
.TP
.BI --config " "
Parse additional configuration file.
See
.B CONFIGURATION FILES
below for details.
.TP
.BI "-d, --DATE" " "
Add a value for the \fIDATE\fR tag.
Note that the ID3 date tag may only store 4 characters (for a year).
.TP
.B --dry-run
Do not really tag files, just show what would have been done.
The corresponding configuration file option is
.IR dry_run .
.TP
.B -E, --edit
Edit tags immediately.
.TP
.BI "-F, --format" " "
Add the specified format string to the list of user-supplied formats.
The corresponding configuration file option is
.IR format .
Might be used several times to try different formats.
See
.B FORMAT
below for details.
.TP
.B --flac
Tag all files as FLAC files, using the FLAC backend (based on \fBmetaflac\fR).
The corresponding configuration file option is
.IR type .
.TP
.B "-G, --guess"
Guess format using the internal database if no user-specified format
worked (default behavior).
The corresponding configuration file option is
.IR guess .
.TP
.BI "-g, --GENRE" " "
Add a value for the \fIGENRE\fR tag.
While some file types accept any string as a genre, some others
(especially ID3v1 tags in MP3 files) require the string to match
within a list of specified genres.
.TP
.BI --gencfg " "
Generate configuration file.
See
.B CONFIGURATION FILES
below for details.
.TP
.B "-h, --help"
Print a usage message and exit.
.TP
.B "-L, --list"
List internal formats.
.TP
.B --maj
Upcase the first letter of each word in tags.
The corresponding configuration file option is
.IR maj .
.TP
.B --mp3
Tag all files as MP3 files, using the MP3 backend
(based on either \fBmp3info\fR or \fBMP3::Tag\fR).
The corresponding configuration file option is
.IR type .
.TP
.B --mp3v2, --id3v2
Enable the experimental MP3 ID3v2-aware backend (based on \fRMP3::Tag\fR)
instead of the old ID3v1-only backend.
.TP
.B --mp3read=[1][2]
Configure how the MP3v2 backend reads and merges ID3v1 and v2 tags.
By default, v1 are appended to v2 (\fB21\fR).
If set to \fB1\fR, only v1 are read.
If set to \fB2\fR, only v2 are read.
If set to \fB12\fR, v2 are appended to v1.
Note that merging/appending takes care of removing duplicates.
.TP
.BI "-n, --NUMBER" " "
Add a value for the \fINUMBER\fR tag.
.TP
.B --no-tagging
Do not actually tag files. This might be used to rename files
without tagging.
The corresponding configuration file option is
.IR no_tagging .
.TP
.B -T, --preserve-time
Preserve file modification time during tagging.
The corresponding configuration file option is
.IR preserve_time .
.TP
.B --ogg
Tag all files as OGG files, using the OGG backend (based on \fBvorbiscomment\fR).
The corresponding configuration file option is
.IR type .
.TP
.B "-p, --no-path"
Do not consider the path of files when matching.
The corresponding configuration file option is
.IR no_path .
.TP
.B "-q, --quiet"
Decrease message verbosity.
The corresponding configuration file option is
.I verbose
which indicates the verbose level.
See
.BR -v
for details about the existing verbosity levels.
.TP
.B "-R, --recursive"
Recursively search for files in subdirectories that are given on
the command line.
The corresponding configuration file option is
.IR recursive .
.TP
.BI --regexp " <[tag,tag:]s/from/to/>"
Replace \fIfrom\fR with \fIto\fR in tags before tagging.
The corresponding configuration file option is
.IR regexp .
If several tags (comma-separated) prefix the regexp, replacement is
only applied to the corresponding fields.
This option might be used multiple times to specify multiple replacing.
.TP
.BI --rename " "
After tagging, rename the file according to the format.
The corresponding configuration file option is
.IR rename_format .
The format is filled using the first occurence of each tag that was
used to tag the file right before.
It means that an old existing tag may be used if no new one replaced
it and
.B --clear
was not passed.
By default, confirmation is asked before tagging.
See
.B RENAMING MENU
in
.B INTERACTIVE MENUS
below for details.
.TP
.B --rename-ext
Assume that the file extension is provided by the rename format
instead of automatically adding the extension corresponding to
the file type.
The corresponding configuration file option is
.IR rename_ext .
.TP
.B --rename-min
Lowcase all tags before renaming.
The corresponding configuration file option is
.IR rename_min .
.TP
.BI --rename-regexp " <[tag,tag:]s/from/to/>"
Replace \fIfrom\fR with \fIto\fR in tags before renaming.
If several tags (comma-separated) prefix the regexp, replacement is
only applied to the corresponding fields.
This option might be used multiple times to specify multiple replacing.
The corresponding configuration file option is
.IR rename_regexp .
.TP
.BI --rename-sep " "
Replace spaces with sep when renaming.
The corresponding configuration file option is
.IR rename_sep .
See
.B --rename-regexp
for a more general replace feature.
.TP
.BI --rename-slash " "
Replace slashes with char when renaming.
The corresponding configuration file option is
.IR rename_slash .
See
.B --rename-regexp
for a more general replace feature.
.TP
.B -S
Instead of tagging, lltag shows the tags that are currently set in
files.
See
.B --show-tags
to show only some tags.
.TP
.BI --sep " "
Replace the specified characters or strings with space in tags.
The corresponding configuration file option is
.IR sep .
They have to be |-separated.
See
.B --regexp
for a more general replace feature.
.TP
.BI --show-tags " "
Instead of tagging, lltag shows tags that are currently set in files.
The argument is a comma separated list of tag types
.RI ( artist ", " title ", " album ", " number ", "
.IR genre ", " date ", " comment " or " all ).
See also
.B -S
to show all tags.
.TP
.B --spaces
Allow multiple or no space instead of only one when matching.
Also allow spaces limiting path elements.
The corresponding configuration file option is
.IR spaces .
See also
.B INTERNAL FORMATS
to get the detailled impact of this option.
.TP
.BI "-t, --TITLE" " "
Add a value for the \fITITLE\fR tag.
.TP
.BI "--tag" " "
Add an explicit tag value.
The corresponding configuration file option is
.IR tag .
Might be used several times, even for the same tag.
When setting a common tag, it is similar to using
.BR -a ", " -A ", " -t ", " -n ", " -g ", " -d " or " -c .
Note that mp3 tags do not support whatever
.IR TAG .
.TP
.BI "--type" " "
Tag all files as
.B
files.
The corresponding configuration file option is
.IR type .
.TP
.B "-v, --verbose"
Increase message verbosity.
The corresponding configuration file option is
.I verbose
which indicates the verbose level.
The default verbosity level is 0 to show only important messages.
Other possible values are 1 to show usage information when a menu
is displayed for the first time, and 2 to always show usage
information before a menu appears.
See also
.BR -q .
.TP
.B "-V, --version"
Show the version.
.TP
.B --yes
Always accept tagging without asking the user.
The corresponding configuration file option is
.IR yes .
By default user-specified format matching is accepted
while guess format matching is asked for confirmation.
Also always accept renaming without asking the user.
.SH INTERACTIVE MENUS
When not running with
.BI --yes ,
the user has to tells lltag what to do.
Files are processed one after the other, with the following steps:
.TP
.B *
If the
.B preferred
parser exists, try to apply it.
.TP
.B *
If failed, if
.B --cddb
was passed, trying a CDDB query.
.TP
.B *
If failed, try the user-provided formats, if any.
.TP
.B *
If failed, if no user-format were passed, or if
.B -G
was passed, try the internal formats.
.TP
.B *
Then we have a list of tags to apply, we may apply them, edit them,
or go back to a CDDB query or trying to parse the filename again.
.TP
.B *
Then, if
.B --rename
was passed, the file is renamed.
When hitting
.B Ctrl-d
at the beginning of an empty line
.RB ( EOF ),
the general behavior is to cancel the current operation
without leaving.
We now describe all interactive menus in detail.
.SS MAIN MENU
Once some tags have been obtained by either CDDB, parsing or the explicit
values given on the command line, the main menu opens to either change the tags
or apply them:
.TP
.B y
Yes, use these tags (default)
.TP
.B a
Always yes, stop asking for a confirmation
.TP
.B P
Try to parse the file, see
.B PARSING MENU
.TP
.B C
Query CDDB, see
.B CDDB MENUS
.TP
.B E
Edit values, see
.B EDITING MENU
.TP
.B D
Only use explicit values, forget about CDDB or parsed tags
.TP
.B Z
Reset to no tag values at all
.TP
.B R
Revert to existing tag values from the current file
.TP
.B O
Display existing tag values in the current file
.TP
.B n
Do not tag this file, jump to renaming (or to the next file if renaming is disabled)
.TP
.BR q " (or " EOF )
Skip this file
.TP
.B Q
Quit without tagging anything anymore
.SS CDDB MENUS
When the CDDB opens for the first time, the user must enter a query
to choose a CD in the online database.
.TP
.B
CDDB query for CD matching the keywords.
Search in all CD categories within fields artist OR album.
.\" freedb.org specific manual, not used anymore
.\"Search in all CD categories within fields artist and title by default.
.\"If
.\".B cats=foo+bar
.\"is added, search in CD categories foo and bar only.
.\"If
.\".B fields=all
.\"is added, search keywords in all fields.
.\"If
.\".B fields=foo+bar
.\"is added, search keywords in fields foo and bar.
.\".TP
.\".B /
.\"CDDB query for CD matching category and id
.TP
.BR q " (or " EOF )
Quit CDDB query, see
.B MAIN MENU
.P
Once keywords have been passed as a query to CDDB, a list of matching
CD titles will be displayed. The user then needs to choose one:
.TP
.B
Choose a CD in the current keywords query results list
.TP
.B V
View the list of CD matching the keywords
.TP
.B k
Start again CDDB query with different keywords
.TP
.BR q " (or " EOF )
Quit CDDB query, see
.B MAIN MENU
.P
Once a CD have been chosen, the user needs to choose a track
.TP
.B
Choose a track of the current CD
.TP
.B a
Choose a track and do not ask for confirmation anymore
.TP
.B a
Use default track and do not ask for confirmation anymore
.TP
.B E
Edit current CD common tags, see
.B EDITING MENU
.TP
.B v
View the list of CD matching the keywords
.TP
.B c
Change the CD chosen in keywords query results list
.TP
.B k
Start again CDDB query with different keywords
.TP
.BR q " (or " EOF )
Quit CDDB query, see
.B MAIN MENU
.P
Note that entering the CDDB menus again will go back to the previous
CD instead of asking the user to query again, so that an entire CD
may be tagged easily.
.SS PARSING MENU
When
.B --ask
is passed or when guessing, each matching will lead to
a confirmation message before tagging.
Available behaviors are:
.TP
.B y
Tag current file with current format. This is the default.
.TP
.B u
Tag current file with current format.
Then use current format for all remaining matching files.
When a non-matching file is reached, stop using this
preferred format.
.TP
.B a
Tag current file with current format.
Then, never asking for a confirmation anymore.
.TP
.B n
Don't tag current file with this format.
Try the next matching format on the current file.
.TP
.B p
When matching is done through combination of a path parser
and a basename parser, keep the basename parser and try the
next path parser on the current file.
.TP
.BR q " (or " EOF )
Stop trying to parse this file.
.SS EDITING MENU
It is possible to edit tags, either before tagging or file, or before
choosing a track in a CD obtained by CDDB.
The current value of all regular fields is shown and may be modified
by entering another value, deleted by entering
.BR ,
or cleared.
The behavior depends on the installed readline library.
If it is smart, the current value may be edited inline and an
history is available.
If not, pressing
.I
will keep the current value while
.I CLEAR
will empty it.
.I EOF
while cancel the editing of this single value.
Each field may be selected for edition by pressing its corresponding
letter in the format (see \fBFORMAT\fR).
Since there might be some non-standard tag names, it is also possible
to enter \fItag FOO\fR to modify tag \fIFOO\fR.
Editing ends by tagging (if \fIE\fR is pressed)
or canceling and return to confirmation menu (if \fIC\fR is pressed).
The other options are:
.TP
.B V
View the current values of tags
.TP
.B y
End edition, save changes, and return to previous menu
.TP
.BR q " (or " EOF )
Cancel edition, forget about changes, and return to previous menu
.SS RENAMING MENU
By default, before renaming, a confirmation is asked to the user.
You may bypass it by passing
.B --yes
on the command line.
If the rename format uses a field that is not defined,
a warning is shown and confirmation is always asked.
Available behaviors when renaming are:
.TP
.B y
Rename current file with current new filename.
This is the default.
.TP
.B a
Rename current file with current new filename.
Then, never asking for a renaming confirmation anymore.
.TP
.B e
Edit current new filename before renaming.
The behavior depends on the installed readline library.
If it is smart, the current value may be edited inline
and an history is available.
.TP
.BR q " (or " EOF )
Don't rename current file.
.TP
.B h
Show help about confirmation.
.SH FORMAT
User-specified formats must be a string composed of any characters
and the following special codes:
.RS
.I "%a"
to match the author.
.I "%A"
to match the album.
.I "%g"
to match the genre.
.I "%n"
to match the track number.
.I "%t"
to match the title.
.I "%d"
to match the date.
.I "%c"
to match the comment.
.I "%i"
to match anything and ignore it.
.I "%%"
to match %.
.RE
Additionally, while renaming, the following codes are available:
.RS
.I "%F"
is replaced by the original basename of the file.
.I "%E"
is replaced by the original extension of the file.
.I "%P"
is replaced by the original path of the file.
.SH INTERNAL FORMATS
The internal format database is usually stored in
.IR /etc/lltag/formats .
The user may override this file by defining a
.IR $HOME/.lltag/formats .
If this file exists, the system-wide one is ignored.
See the manpage of
.I lltag_formats
or
.I /etc/lltag/formats
for details.
.SH CONFIGURATION FILES
lltag reads some configuration files before parsing command line options.
The system-wide configuration file is defined in
.I /etc/lltag/config
if it exists.
It also reads
.I $HOME/.lltag/config
if it exists.
The user may also add another configurable file with
.BR --config .
lltag may also generate a configuration with
.BR --gencfg .
See the manpage of
.I lltag_config
or the example of
.I config
file provided in the documentation for details.
.SH FILES
.RE
.I /etc/lltag/formats
.RS
System-wide internal format database.
See
.B INTERNAL FORMATS
for details.
.RE
.I $HOME/.lltag/formats
.RS
User internal format database. If it exists, the system-wide one is ignored.
.RE
.I $HOME/.lltag/edit_history
.RS
History of last entered values in the edition mode if the
.B Readline
library supports this feature.
.RE
.I /etc/lltag/config
.RS
System-wide configuration file, if it exists.
See
.B CONFIGURATION FILES
for details.
.RE
.I $HOME/.lltag/config
.RS
User configuration file.
.SH EXAMPLES
.RE
Show all tags for each OGG files in the current directory:
.RS
lltag \-S *.ogg
.RE
Show only a selected list of tags for all files in all subdirectories:
.RS
lltag \-\-show-tags artist,album,title,number \-R .
.RE
Set an arbitrary tag in a file (only works with OGG vorbis or FLAC files):
.RS
lltag \-\-tag foo=nil foo.ogg
.RE
Delete the foo tag from a file:
.RS
lltag \-\-tag foo= bar.ogg
.RE
Set the ALBUM, ARTIST and GENRE tag values of the MP3 files in the current directory:
.RS
lltag \-\-ARTIST "Queen" \-\-ALBUM "Innunendo" \-\-GENRE "rock" \-\-COMMENT="very cool" *.mp3
.RE
Rename a file by assembling its current NUMBER, ARTIST and TITLE tag values:
.RS
lltag \-\-no\-tagging \-\-rename "%n - %a - %t" foobar.ogg
.RE
Clear all tags in all FLAC files:
.RS
lltag \-\-clear *.flac
.SH SEE ALSO
.PP
.BR lltag_config "(5), " lltag_formats (5)
The
.I howto.html
file provided within the documentation.
.SH AUTHOR
Brice Goglin
lltag-0.14.4/formats 0000644 0001750 0000144 00000003741 11615760622 013654 0 ustar bgoglin users # lltag internal format database
# each entry is composed of:
# [natural format]
# format will be shown when matching
# type = basename or path
# does this format apply to the wall path or only the basename ?
# regexp =
# internal regexp with %L for a delimiter (empty by default, multiple spaces if --spaces was passed)
# %S for a space (or multiple spaces if --spaces was passed)
# %N for a numeric string
# %A for an alphanumeric string without /
# %P for any path (alphanumeric string with /)
# %% for %
# any other character will remain unchanged
# indices = list of comma-separed tag name indicating the corresponding
# %N or %A means in the regexp.
# the field name may be replaced by the corresponding letter:
# a for ARTIST
# t for TITLE
# A for ALBUM
# g for GENRE
# n for NUMBER
# d for DATE
# c for COMMENT
# i for IGNORE
[%n - %a - %t]
type = basename
regexp = %L%N%S-%S%A%S-%S%A%L
indices = NUMBER,ARTIST,TITLE
[%n) %a - %t]
type = basename
regexp = %L%N)%S%A%S-%S%A%L
indices = NUMBER,ARTIST,TITLE
[%n - %t]
type = basename
regexp = %L%N%S-%S%A%L
indices = NUMBER,TITLE
[%n. %t]
type = basename
regexp = %L%N.%S%A%L
indices = NUMBER,TITLE
[%n) %t]
type = basename
regexp = %L%N)%S%A%L
indices = NUMBER,TITLE
[%a - %n - %t]
type = basename
regexp = %L%A%S-%S%N%S-%S%A%L
indices = ARTIST,NUMBER,TITLE
[%a - %t]
type = basename
regexp = %L%A%S-%S%A%L
indices = ARTIST,TITLE
[%t]
type = basename
regexp = %L%A%L
indices = TITLE
[%a/%a - %A]
type = path
regexp = %P%L%A%L/%L%A%S-%S%A%L
indices = ARTIST,ARTIST,ALBUM
[%a/%A (%d)]
type = path
regexp = %P%L%A%L/%L%A%L%S(%N)%L
indices = ARTIST,ALBUM,DATE
[%a/%A [%d]]
type = path
regexp = %P%L%A%L/%L%A%L%S[%N]%L
indices = ARTIST,ALBUM,DATE
[%a/%A]
type = path
regexp = %P%L%A%L/%L%A%L
indices = ARTIST,ALBUM
[%a - %A]
type = path
regexp = %P%L%A%S-%S%A%L
indices = ARTIST,ALBUM
[%a]
type = path
regexp = %P%L%A%L
indices = ARTIST
[%A]
type = path
regexp = %P%L%A%L
indices = ALBUM
lltag-0.14.4/lltag_formats.5 0000644 0001750 0000144 00000003502 11615760622 015175 0 ustar bgoglin users .\" Process this file with
.\" groff -man -Tascii foo.1
.\"
.TH lltag_formats 5 "NOVEMBER 2006"
.SH NAME
formats \- Internal formats database file for lltag
.SH DESCRIPTION
The internal format database is usually stored in
.IR /etc/lltag/formats .
The user may override this file by defining a
.IR $HOME/.lltag/formats .
If this file exists, the system-wide one is ignored.
These files contain entries starting with a line such as:
.I [%n - %a - %t]
.RS
A title between bracket that will be displayed at runtime.
.RE
Then, the following 3 lines must be given to explain how the format
is actually used to parse filenames:
.I type = basename
.RS
The type is either
.I basename
(to parse the last part of the path to a file)
or
.I path
(to parse the directory part of the path to a file).
When actually parsing the path to target files,
.I basename
and
.I path
parsers will be assembled.
All possible combination will be tried.
.RE
.I regexp = %L%N%S-%S%A%S-%S%A%L
.RS
A string composed of any characters, with the following special fields:
.I %L
for delimiter (empty by default, multiple spaces if
.I --spaces
was given)
.I %S
for a space (or multiple spaces if
.I --spaces
was given)
.I %N
for numbers
.I %A
for an alphanumeric string without /
.I %P
for any path (alphanumeric string with /)
.I %%
for %
.RE
.I indices = NUMBER,ARTIST,TITLE
.RS
A list of fields to match (either given by their full name or associated letter)
corresponding to each %N or %A field in the previous format.
It may be
.BR AUTHOR " (or " a "), "
.BR ALBUM " (" A "), "
.BR GENRE " (" g "), "
.BR NUMBER " (" n "), "
.BR TITLE " (" t "), "
.BR DATE " (" d "), "
.BR COMMENT " (" c ") or "
.BR IGNORE " (" i ")."
See also
.B FORMAT
in the manpage of
.I lltag
for details about these fields.
.SH SEE ALSO
.PP
.BR lltag (1)
.SH AUTHOR
Brice Goglin
lltag-0.14.4/VERSION 0000644 0001750 0000144 00000000007 11615760622 013316 0 ustar bgoglin users 0.14.4