|
typeset_audio_dir - produce B |
typeset_audio_dir - produce TeX listing of directories with audio files.
# E.g.: current directory contains 1 subdirectory-per-performer. # Inside each directory the structure is # Composer/single*.mp3 (output <title> field) # and # Composer/MultiPart/part*.mp3 (output <album> field) # Emit year and duration info typeset_audio_dir -y -T -B Quartets *
# Likewise, but this directory structure is w.r.t. current directory; # Do not emit year and duration typeset_audio_dir . typeset_audio_dir
# Use artist as toplevel heading, album as the 2nd level; use track numbers; # name is based on title for any depth in directory hierarchy; # likewise for generation of 2nd level heading. Mark pieces with lyrics typeset_audio_dir -@ -ynTL -1 "@a" -2 "@l" -t 1000 -a 1000 -B All .
# Likewise, but the name is based on the album; ignore comments typeset_audio_dir -yTn -1 "" -2 "" -c -t -1e100 -a -1e100 -B All_short .
Scans directory (or directories), using the MP3::Tag manpage to obtain information about audio files (currently only MP3s). Produces (one or more) TeX files with the listing.
The intent is to support many different layouts of directories with
audio files with as little tinkering with command-line options as
possible; thus type_audio_dir tries to do as much as possible by
guestimates. Similtaneously, one should be able to tune the script to
handle the layout they have.
The script emits headers for several levels of ``grouping''. The ``toplevel'' group header is emited once for every ``toplevel'' directory (with audio files), further headers are emited based on changes in descriptors of the audio files during scan.
basename_text.tex basename_cdcover.tex basename_cdbooklet.tex basename_backcover.tex basename_list.tex
The last file contains the information about audio files encountered. The others files contain frameworks to typeset this information.
The first four files are supposed to be human-editable; they will not be overwritten by a following rerun with the same basename given to the script. By editing these files, one can choose between several encodings, languages, multicolumn output, font size, interline spacing, margins, page size etc.
Empty string disables generation.
Performer/Composer/Collection/part1.mp3 Performer/Composer/Collection/part2.mp3 Performer/Composer/single1.mp3 Performer/Composer/single2.mp3
if the toplevel directory is Performer, then changes of the second-level header in single*.mp3 would create a new second-level heading. However, similar changes in part*.mp3 will not create a new heading.
NOTE: maybe this default if 2 is not very intuitive. It is
recommended to explicitely set this option to the value you feel
appropriate (1e100 would play role of infinity).
%l is used as the name;
otherwise the title %t of the audio file is used.
Set to -1e100 to always use %l, and to 1e100 to always use %a.
@ by % in options. Very useful with DOSISH shells
to include %-escapes necessary for the MP3::Tag manpage's interpolate().
TARGET_LETTERS:encoding. Target letters are o, d, and h
correspondingly. Use 0 instead of an encoding to do byte-oriented read/write.
TXXX[add-to:file-by-person,l,t,n] will be
inspected, and used as a ``comment'' for a record.
The following files are used to give hints to typeset_audio_dir:
Otherwise the content of this file is used as a toplevel heading for this directory.
Running this script will only generate necessary TeX files, but will not typeset them (they will look much better if you first edit the files to suit your needs). Recall how to typeset TeX documents (here we assume PDF target):
latex document.tex && dvips document.dvi && ps2pdf document
(a lot of temporary files are going to be generated too). Some of the files (e.g., ..._cdcover.tex) assume work better with landscape orientation; one needs
latex document.tex && dvips -t landscape document.dvi && ps2pdf document
With ..._cdbooklet.tex, for best result, one better should rearrange pages for booklet 2up 2-pages-per-side printing:
latex document.tex
&& dvips -t landscape -f < document.dvi | psbook | pstops "2:0(0,-6cm)+1(0,6cm)" > document.ps
&& ps2pdf document
(more details on running dvips is put in the beginning of this TeX file).
Do not forget that if you can't describe a complicated layout by
command-line options, you still have a possibility to run this script
many times (once per directory with ``handable layout'', using -B and
other options suitable for this subdirectory). Then you can use
LaTeX \input directives to include the generated files into the
toplevel LaTeX file.
You can also redefine \preDir * \posDir to do nothing, and put the
necessary code to generate the headers into the top-level file.
Modify the formatting macros to suit your needs.
One can combine two (or more) lists (e.g., with the short style, and
the long style) into one output file; the generated files
..._cdbooklet.tex and ..._text.tex already have a necessary
template (disabled) at the end. For example, with two lists created in
SYNOPSIS, All_list.tex, and All_short_list.tex, find
\iffalse near the end of All_short_cdbooklet.tex and change it
to \iftrue; then change the name in the directive
\input{another_list}
to All_long_list
This will make the ``short'' cdbooklet become a kind of ``table of
contents'' for the combined ``short+long'' cdbooklet. (Of course, one
can change the values of macros \dirSIZE, \COLUMNS, size of
skips and of type [as \scriptsize above] to suit your needs - the
point is that they should not be necessarily the same for the second list.)
|
typeset_audio_dir - produce B |