Warning, /multimedia/kid3/doc/en/index.docbook is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" ?> 0002 <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [ 0003 <!ENTITY kid3 '<application>Kid3</application>'> 0004 <!ENTITY doublehyphen '--'> 0005 <!ENTITY % addindex "IGNORE"> 0006 <!ENTITY % English "INCLUDE"><!-- change language only here --> 0007 ]> 0008 <book lang="&language;" id="kid3-handbook"> 0009 0010 <bookinfo> 0011 <title>The &kid3; Handbook</title> 0012 0013 <authorgroup> 0014 <author> 0015 <firstname>Urs</firstname> 0016 <surname>Fleisch</surname> 0017 <affiliation> 0018 <address><email>ufleisch@users.sourceforge.net</email></address> 0019 </affiliation> 0020 <contrib>Software development</contrib> 0021 </author> 0022 0023 <!-- TRANS:ROLES_OF_TRANSLATORS --> 0024 </authorgroup> 0025 0026 <copyright> 0027 <year>2024</year> 0028 <holder>Urs Fleisch</holder> 0029 </copyright> 0030 <legalnotice id="fdl-notice">&FDLNotice;</legalnotice> 0031 0032 <date>2024-02-24</date> 0033 <releaseinfo>3.9.5</releaseinfo> 0034 0035 <abstract> 0036 <para> 0037 &kid3; is an application to edit the ID3v1 and ID3v2 tags in MP3 files in 0038 an efficient way. Also tags in Ogg/Vorbis, Opus, DSF, FLAC, MPC, APE, MP4/AAC, MP2, Speex, 0039 TrueAudio, WavPack, WMA, WAV, AIFF files and tracker modules (MOD, S3M, IT, XM) are supported. 0040 It is easy to set tags of multiple files to the same 0041 values (<abbrev>e.g.</abbrev> album, artist, year and genre in all files of the same album) and 0042 generate the tags from the file name or vice versa. 0043 </para> 0044 </abstract> 0045 0046 <keywordset> 0047 <keyword>KDE</keyword> 0048 <keyword>kdemultimedia</keyword> 0049 <keyword>MP3</keyword> 0050 <keyword>ID3</keyword> 0051 <keyword>ID3v1</keyword> 0052 <keyword>ID3v2</keyword> 0053 <keyword>Ogg</keyword> 0054 <keyword>Vorbis</keyword> 0055 <keyword>FLAC</keyword> 0056 <keyword>MPC</keyword> 0057 <keyword>APE</keyword> 0058 <keyword>Musepack</keyword> 0059 <keyword>MP4</keyword> 0060 <keyword>M4A</keyword> 0061 <keyword>MP2</keyword> 0062 <keyword>Speex</keyword> 0063 <keyword>TrueAudio</keyword> 0064 <keyword>WavPack</keyword> 0065 <keyword>WMA</keyword> 0066 <keyword>WAV</keyword> 0067 <keyword>AIFF</keyword> 0068 <keyword>MOD</keyword> 0069 <keyword>S3M</keyword> 0070 <keyword>IT</keyword> 0071 <keyword>XM</keyword> 0072 <keyword>Opus</keyword> 0073 <keyword>DSF</keyword> 0074 </keywordset> 0075 0076 </bookinfo> 0077 0078 <!--begin manpage include 0079 <refmeta> 0080 <refentrytitle>kid3</refentrytitle> 0081 <manvolnum>1</manvolnum> 0082 </refmeta> 0083 0084 <refnamediv> 0085 <refname>kid3</refname> 0086 <refname>kid3-qt</refname> 0087 <refname>kid3-cli</refname> 0088 <refpurpose>Kid3 ID3 Tagger</refpurpose> 0089 </refnamediv> 0090 end manpage include--> 0091 0092 <!--change manpage<refsynopsisdiv>--><preface id="synopsis"><title>Synopsis</title> 0093 <cmdsynopsis> 0094 <command>kid3</command> 0095 <group> 0096 <arg choice="plain"><option>&doublehyphen;help</option></arg> 0097 <arg choice="plain"><option>&doublehyphen;author</option></arg> 0098 <arg choice="plain"><option>&doublehyphen;version</option></arg> 0099 <arg choice="plain"><option>&doublehyphen;license</option></arg> 0100 <arg choice="plain"><option>&doublehyphen;desktopfile 0101 <filename>FILE</filename></option></arg> 0102 </group> 0103 <arg rep="repeat"><replaceable>FILE</replaceable></arg> 0104 </cmdsynopsis> 0105 <cmdsynopsis> 0106 <command>kid3-qt</command> 0107 <arg><option>&doublehyphen;portable</option></arg> 0108 <arg><option>Qt-options</option></arg> 0109 <arg rep="repeat"><replaceable>FILE</replaceable></arg> 0110 </cmdsynopsis> 0111 <cmdsynopsis> 0112 <command>kid3-cli</command> 0113 <arg><option>&doublehyphen;portable</option></arg> 0114 <arg><option>&doublehyphen;dbus</option></arg> 0115 <group> 0116 <arg choice="plain"><option>-h</option></arg> 0117 <arg choice="plain"><option>&doublehyphen;help</option></arg> 0118 </group> 0119 <arg><option>-c COMMAND1</option></arg> 0120 <arg rep="repeat"><option>-c COMMAND2</option></arg> 0121 <arg rep="repeat"><replaceable>FILE</replaceable></arg> 0122 </cmdsynopsis> 0123 <!--change manpage</refsynopsisdiv>--></preface> 0124 0125 <preface id="options"><title>Options</title> 0126 0127 <variablelist> 0128 <varlistentry> 0129 <term><option>&doublehyphen;portable</option></term> 0130 <listitem><para>Store configuration in file <filename>kid3.ini</filename> 0131 inside application folder.</para></listitem> 0132 </varlistentry> 0133 <varlistentry> 0134 <term><replaceable>FILE</replaceable></term> 0135 <listitem><para>If <filename><replaceable>FILE</replaceable></filename> is the 0136 path to a folder, it will be opened. If one or more file paths are given, 0137 their common folder is opened and the files are selected. 0138 </para></listitem> 0139 </varlistentry> 0140 </variablelist> 0141 0142 <sect1 id="options-kid3"><title>kid3</title> 0143 <variablelist> 0144 <varlistentry> 0145 <term><option>&doublehyphen;help</option></term> 0146 <listitem><para>Show help about options.</para></listitem> 0147 </varlistentry> 0148 <varlistentry> 0149 <term><option>&doublehyphen;author</option></term> 0150 <listitem><para>Show author information.</para></listitem> 0151 </varlistentry> 0152 <varlistentry> 0153 <term><option>&doublehyphen;version</option></term> 0154 <listitem><para>Show version information.</para></listitem> 0155 </varlistentry> 0156 <varlistentry> 0157 <term><option>&doublehyphen;license</option></term> 0158 <listitem><para>Show license information.</para></listitem> 0159 </varlistentry> 0160 <varlistentry> 0161 <term><option>&doublehyphen;desktopfile 0162 <filename>FILE</filename></option></term> 0163 <listitem><para>The base file name of the desktop entry for this 0164 application.</para></listitem> 0165 </varlistentry> 0166 </variablelist> 0167 </sect1> 0168 0169 <sect1 id="options-kid3-qt"><title>kid3-qt</title> 0170 <variablelist> 0171 <varlistentry> 0172 <term><option>Qt-options</option></term> 0173 <listitem><para>See <citerefentry><refentrytitle>qt5options</refentrytitle> 0174 <manvolnum>7</manvolnum></citerefentry>.</para></listitem> 0175 </varlistentry> 0176 </variablelist> 0177 </sect1> 0178 0179 <sect1 id="options-kid3-cli"><title>kid3-cli</title> 0180 <variablelist> 0181 0182 <varlistentry> 0183 <term><option>&doublehyphen;dbus</option></term> 0184 <listitem><para>Activate the &DBus; interface.</para></listitem> 0185 </varlistentry> 0186 0187 <varlistentry> 0188 <term><option>-c</option></term> 0189 <listitem><para>Execute a command. Multiple <option>-c</option> options are 0190 possible, they are executed in sequence. See the section about 0191 <link linkend="kid3-cli">kid3-cli</link> for a description of the available 0192 commands.</para></listitem> 0193 </varlistentry> 0194 0195 <varlistentry> 0196 <term><option>-h</option>|<option>&doublehyphen;help</option></term> 0197 <listitem><para>Show help about options and commands.</para></listitem> 0198 </varlistentry> 0199 0200 </variablelist> 0201 </sect1> 0202 0203 </preface> 0204 0205 <chapter id="introduction"> 0206 <title>Introduction</title> 0207 0208 <para> 0209 &kid3; is an application to edit the ID3v1 and ID3v2 tags in MP3 files in 0210 an efficient way. These tags can be edited by most MP3 players, but not in 0211 a very comfortable and efficient way. Moreover the tags in Ogg/Vorbis, Opus, DSF, FLAC, 0212 MPC, APE, MP4/AAC, MP2, Speex, TrueAudio, WavPack, WMA, WAV, AIFF files and 0213 tracker modules (MOD, S3M, IT, XM) are supported too. 0214 </para> 0215 <para> 0216 &kid3; does not grab nor encode 0217 MP3 files, but it is targeted to edit the ID3 tags of all files of an album 0218 in an efficient way, <abbrev>i.e.</abbrev> with as few mouse clicks and key strokes as 0219 possible. Where most other programs can edit either ID3v1 or ID3v2 tags, 0220 &kid3; has full control over both versions, can convert tags between the 0221 two formats and has access to all ID3v2 tags. Tags of multiple files can be 0222 set to the same value, <abbrev>e.g.</abbrev> the artist, album, year and genre of all files 0223 of an album typically have the same values and can be set together. If the 0224 information for the tags is contained in the file name, the tags can be 0225 automatically set from the file name. It is also possible to set the file 0226 name according to the tags found in the file in arbitrary formats. 0227 </para> 0228 <para> 0229 The editing task is further supported by automatic replacement of characters 0230 or substrings, for instance to remove illegal characters from 0231 filenames. Automatic control of upper and lower case characters makes it easy 0232 to use a consistent naming scheme in all tags. 0233 </para> 0234 <para> 0235 The tag information for full albums can be taken from 0236 <ulink url="http://gnudb.org">gnudb.org</ulink>, <ulink 0237 url="http://musicbrainz.org">MusicBrainz</ulink>, <ulink 0238 url="http://discogs.com">Discogs</ulink>, <ulink 0239 url="http://www.amazon.com">Amazon</ulink> or other sources of 0240 track lists. The import format is freely configurable by regular expressions. 0241 </para> 0242 <para> 0243 Please report any problems or feature requests to the author. 0244 </para> 0245 </chapter> 0246 0247 <chapter id="using-kid3"> 0248 <title>Using &kid3;</title> 0249 0250 <sect1 id="kid3-features"> 0251 <title>&kid3; features</title> 0252 <itemizedlist> 0253 <listitem><para>Edit ID3v1.1 tags</para></listitem> 0254 <listitem><para>Edit all ID3v2.3 and ID3v2.4 frames</para></listitem> 0255 <listitem><para>Edit tags of multiple files</para></listitem> 0256 <listitem><para>Convert between ID3v1 and ID3v2 tags</para></listitem> 0257 <listitem><para>Edit MP3, Ogg/Vorbis, Opus, DSF, FLAC, MPC, APE, MP4/AAC, MP2, Speex, 0258 TrueAudio, WavPack, WMA, WAV and AIFF tags</para></listitem> 0259 <listitem><para>Generate tags from filename</para></listitem> 0260 <listitem><para>Generate tags from the contents of tag fields</para></listitem> 0261 <listitem><para>Generate filename from tags</para></listitem> 0262 <listitem><para>Generate and change folder names from tags</para></listitem> 0263 <listitem><para>Generate playlist file</para></listitem> 0264 <listitem><para>Automatic case conversion and string translation</para></listitem> 0265 <listitem><para>Import from <ulink url="http://gnudb.org">gnudb.org</ulink>, 0266 <ulink url="http://musicbrainz.org">MusicBrainz</ulink>, 0267 <ulink url="http://discogs.com">Discogs</ulink>, 0268 <ulink url="http://www.amazon.com">Amazon</ulink> 0269 and other data sources</para></listitem> 0270 <listitem><para>Export as CSV, &HTML;, playlist, Kover &XML; and other 0271 formats. Exported CSV files can be imported again.</para></listitem> 0272 </itemizedlist> 0273 </sect1> 0274 0275 <sect1 id="example-usage"> 0276 <title>Example Usage</title> 0277 <para> 0278 This section describes a typical session with &kid3;. 0279 Let's assume we have a folder containing MP3 files with the tracks from 0280 the album "Let's Tag" from the band "One Hit Wonder". The folder is 0281 named in the "artist - album" format, in our case <filename>One Hit Wonder - Let's 0282 Tag</filename>. The folder contains the tracks in the "track title.mp3" 0283 format, which I think is useful because the filenames are short 0284 (important when using mobile MP3 players with small displays) and in the 0285 correct order when sorted alphabetically (important when using hardware MP3 0286 players which play the tracks in alphabetical order or in the order in 0287 which they are burnt on &CD; and that order is alphabetical when using 0288 <command>mkisofs</command>). Besides this, the artist and album information 0289 is already in the folder name and does not have to be repeated in the filename. 0290 But back to our example, the folder listing looks like this: 0291 </para> 0292 <para><filename>01 Intro.mp3</filename></para> 0293 <para><filename>02 We Only Got This One.mp3</filename></para> 0294 <para><filename>03 Outro.mp3</filename></para> 0295 <para> 0296 These files have no tags yet and we want to generate them using &kid3;. We use 0297 <menuchoice><guimenu>File</guimenu><guimenuitem>Open</guimenuitem></menuchoice> 0298 menu item (or toolbar button) and select one of the files in this folder. All 0299 files will be displayed in the file listbox. Lazy as we are, we want to use the 0300 information in the folder and file names to generate tags. Therefore we select 0301 all files, then click the <guilabel>To:</guilabel> <guibutton>Tag 1</guibutton> 0302 button in the <guilabel>File</guilabel> section. This will set the title, artist, 0303 album and track values in all files. To set the year and genre values of all 0304 files, we keep all files selected and type in "2002" for the <guilabel>Date</guilabel> 0305 and select "Pop" from the <guilabel>Genre</guilabel> combobox. To set only these 0306 two values, their check boxes are automatically checked and all other check boxes 0307 are left unchecked. Now we change the selection by only selecting the first file 0308 and we see that all tags contain the correct values. The tags of the other files 0309 can be verified too by selecting them one by one. When we are satisfied with the 0310 tags, we use <menuchoice><guimenu>File</guimenu><guimenuitem>Save</guimenuitem></menuchoice> 0311 menu item (or toolbar button). Selecting <menuchoice><guimenu>File</guimenu><guimenuitem> 0312 Create Playlist</guimenuitem></menuchoice> menu item (or toolbar button) will 0313 generate a file <filename>One Hit Wonder - Let's Tag.m3u</filename> in the folder. 0314 </para> 0315 </sect1> 0316 0317 </chapter> 0318 0319 <chapter id="commands"> 0320 <title>Command Reference</title> 0321 0322 <sect1 id="gui-elements"> 0323 <title>The &GUI; Elements</title> 0324 <para> 0325 The &kid3; &GUI; is separated in six sections: At the left are the file 0326 and folder listboxes, the right side contains the <guilabel>File</guilabel>, 0327 <guilabel>Tag 1</guilabel>, <guilabel>Tag 2</guilabel> and <guilabel>Tag 3 0328 </guilabel> sections. 0329 </para> 0330 0331 <para> 0332 To navigate between the different sections using the keyboard, several keyboard 0333 shortcuts are supported. In the tag sections, the shortcuts are active while 0334 not editing text or when being in the first column. 0335 0336 <itemizedlist> 0337 <listitem><para> 0338 <keycombo>&Alt;<keycap>Left</keycap></keycombo>: Go to previous section 0339 (<keycombo><keycap>Command</keycap><keycap>[</keycap></keycombo> on &macOS;) 0340 </para></listitem> 0341 <listitem><para> 0342 <keycombo>&Alt;<keycap>Right</keycap></keycombo>: Go to next section 0343 (<keycombo><keycap>Command</keycap><keycap>]</keycap></keycombo> on &macOS;) 0344 </para></listitem> 0345 <listitem><para> 0346 <keycombo>&Ctrl;<keycap>Shift</keycap><keycap>V</keycap></keycombo>: From 0347 other tag 0348 </para></listitem> 0349 <listitem><para> 0350 <keycombo>&Ctrl;<keycap>C</keycap></keycombo>: Copy 0351 </para></listitem> 0352 <listitem><para> 0353 <keycombo>&Ctrl;<keycap>V</keycap></keycombo>: Paste 0354 </para></listitem> 0355 <listitem><para> 0356 <keycombo><keycap>Shift</keycap><keycap>Delete</keycap></keycombo>: Remove 0357 </para></listitem> 0358 <listitem><para> 0359 <keycombo><keycap>F2</keycap></keycombo>: Edit 0360 </para></listitem> 0361 <listitem><para> 0362 <keycombo><keycap>Insert</keycap></keycombo>: Add 0363 </para></listitem> 0364 <listitem><para> 0365 <keycombo><keycap>Delete</keycap></keycombo>: Delete 0366 </para></listitem> 0367 </itemizedlist> 0368 </para> 0369 0370 <sect2 id="file-list"> 0371 <title>File List</title> 0372 0373 <para> 0374 The file list contains the names of all the files in the opened 0375 folder which match the selected file name filter (typically 0376 <filename class="extension">*.mp3 *.ogg *.opus *.dsf *.flac *.mpc *.aac *.m4a 0377 *.m4b *.m4p *.mp4 *.mp2 *.spx *.tta *.wv *.wma *.wav *.aiff *.ape</filename>). 0378 A single or multiple files can be selected. To select no file, click into the 0379 empty area after the listbox entries. The selection determines the files which 0380 are affected by the operations which are available by using the buttons described 0381 below. 0382 </para> 0383 <para> 0384 Besides <guilabel>Name</guilabel>, also other columns 0385 <guilabel>Size</guilabel>, <guilabel>Type</guilabel>, <guilabel>Date 0386 Modified</guilabel> with file details can be displayed. Columns can be hidden 0387 by unchecking their name in the context menu of the list header. The order of 0388 the columns can be changed by drag and drop. The sort order can be toggled by 0389 clicking on the column header. 0390 </para> 0391 <para> 0392 The values of the standard tags can also be displayed and edited in columns of 0393 the file list. 0394 </para> 0395 <para> 0396 At the left of the names an icon can be displayed: a disc to show that the 0397 file has been modified or information about which tags are present (V1, V2, 0398 V1V2 or NO TAG, no icon is displayed if the file has not been read in yet). 0399 </para> 0400 <para> 0401 Folders are displayed with a folder icon. If a folder is opened, its 0402 files are displayed in a hierarchical tree. By selecting files from 0403 subfolders, operations can be executed on files in different folders, 0404 which is useful if the music collection is organized with a folder for each 0405 artist containing folders for albums of this artist. 0406 </para> 0407 <para> 0408 Clicking the <mousebutton>right</mousebutton> mouse button inside the file list opens a context menu with 0409 the following commands: 0410 <itemizedlist> 0411 <listitem><para> 0412 <guimenuitem>Expand all</guimenuitem>: Expands all folder trees (only the 0413 current tree if the <keycap>Shift</keycap> key is pressed) 0414 </para></listitem> 0415 <listitem><para> 0416 <guimenuitem>Collapse all</guimenuitem>: Collapses all folder trees 0417 </para></listitem> 0418 <listitem><para> 0419 <guimenuitem>Rename</guimenuitem>: Changes the name of a file 0420 </para></listitem> 0421 <listitem><para> 0422 <guimenuitem>Move to Trash</guimenuitem>: Moves a file to the trash 0423 </para></listitem> 0424 <listitem><para> 0425 <guimenuitem>Play</guimenuitem>: Plays a file, 0426 see <link linkend="play">Play</link>. If the selected file is a playlist, the 0427 files of the playlist will be played. 0428 </para></listitem> 0429 <listitem><para> 0430 <guimenuitem>Edit</guimenuitem>: Edit a playlist, 0431 see <link linkend="edit-playlist">Edit Playlist</link>. 0432 </para></listitem> 0433 <listitem><para>The subsequent entries are user commands, which can be defined 0434 in the <guilabel>User Actions</guilabel> tab of 0435 <link linkend="configure-kid3">Configure &kid3;</link>. The playback on double 0436 click can also be activated there. 0437 </para><para> 0438 When <guilabel>Select file on play</guilabel> is activated, the currently 0439 played track is automatically selected in the file list. 0440 </para></listitem> 0441 </itemizedlist> 0442 </para> 0443 </sect2> 0444 0445 <sect2 id="edit-playlist"> 0446 <title>Edit Playlist</title> 0447 0448 <para> 0449 A playlist can be created empty or containing the tracks of a folder, see <link 0450 linkend="create-playlist">Create Playlist</link>. The playlist file created in 0451 such a way can be edited by double click or using <guilabel>Edit</guilabel> 0452 from the file list context menu. A dialog with the entries of the playlist is 0453 shown. It is possible to open multiple playlists simultaneously. 0454 </para> 0455 <para> 0456 New entries can be added by drag and drop from the file list, a file manager or 0457 another playlist. If an entry is dragged from another playlist, it will be 0458 moved or copied depending on the system. To invoke the other 0459 operation, respectively, the <keycap>Shift</keycap>, &Ctrl; or &Alt; (to copy instead of move on 0460 &macOS;) key has to be pressed. Reordering entries within the playlist is also 0461 possible via drag and drop. Alternatively, entries can be moved using the keyboard 0462 shortcuts <keycombo>&Ctrl;<keycap>Shift</keycap><keycap>Up</keycap></keycombo> and 0463 <keycombo>&Ctrl;<keycap>Shift</keycap><keycap>Down</keycap></keycombo> (on &macOS; <keycap>Command</keycap> has 0464 to be pressed instead of &Ctrl;). An entry can be removed using the <keycap>Delete</keycap> key. 0465 </para> 0466 <para> 0467 Please note the following: To drag entries from the file list, they have to be 0468 held at the left side (near the icons), the same gesture at the right side 0469 will perform a multi selection, such an action is hereby still easily possible. 0470 </para> 0471 <para> 0472 When a playlist has been modified, the changes can be stored using 0473 <guibutton>Save</guibutton> or discarded using 0474 <guibutton>Cancel</guibutton>. When the window is closed, a confirmation 0475 prompt is shown if there are unsaved changes. 0476 </para> 0477 <para> 0478 Tracks selected in a playlist will be automatically selected in the file list, 0479 thereby making it possible to edit their tags. 0480 </para> 0481 <para> 0482 To execute actions on a playlist, its file must be selected in the file 0483 list. <guimenuitem>Edit</guimenuitem> from the context menu will lead to the 0484 dialog described in this section, and <guimenuitem>Play</guimenuitem> will 0485 start the media player with the tracks from the playlist. User actions can act 0486 on playlists, for <link linkend="qml-examples">example</link> <guilabel>Export 0487 Playlist Folder</guilabel>, which copies the files from a playlist into a 0488 folder. 0489 </para> 0490 </sect2> 0491 0492 <sect2 id="directory-list"> 0493 <title>Folder List</title> 0494 0495 <para> 0496 The folder list contains the names of the folders in the opened 0497 folder, as well as the current (<filename class="directory">.</filename>) and 0498 the parent (<filename class="directory">..</filename>) folder. It allows one 0499 to quickly change the folder without using the <guimenuitem>Open</guimenuitem> 0500 command or drag and drop. 0501 </para> 0502 <para> 0503 Column visibility, order and sorting can be configured as described in the 0504 section about the <link linkend="file-list">file list</link>. 0505 </para> 0506 </sect2> 0507 0508 <sect2 id="file"> 0509 <title>File</title> 0510 0511 <para> 0512 Shows information about the encoding 0513 (MP3, Ogg, Opus, DSF, FLAC, MPC, APE, MP2, MP4, AAC, Speex, TrueAudio, WavPack, WMA, WAV, AIFF), 0514 bit rate, sample rate, channels and the length of the file. 0515 </para> 0516 <para> 0517 The <guilabel>Name</guilabel> line edit contains the name of the file 0518 (if only a single file is selected). If this name is changed, the file will 0519 be renamed when the Save command is used. 0520 </para> 0521 <para> 0522 The <guilabel>Format</guilabel> combo box and line edit contains the format 0523 to be used when the filename is generated from the first or the second tag. 0524 The filename can contain arbitrary characters, even a folder part separated 0525 by a slash from the file name, but that folder must already exist for the 0526 renaming to succeed. The following special codes are used to insert tag values 0527 into the filename: 0528 </para> 0529 0530 <itemizedlist> 0531 <listitem><para>%s %{title} Title (Song)</para></listitem> 0532 <listitem><para>%a %{artist} Artist</para></listitem> 0533 <listitem><para>%l %{album} Album</para></listitem> 0534 <listitem><para>%c %{comment} Comment</para></listitem> 0535 <listitem><para>%y %{year} Year</para></listitem> 0536 <listitem><para>%t %{track} Track (<abbrev>e.g.</abbrev> 01)</para></listitem> 0537 <listitem><para>%t %{track.n} Track with field width n (<abbrev>e.g.</abbrev> 001 for %{track.3})</para></listitem> 0538 <listitem><para>%T %{tracknumber} Track (without leading zeros, <abbrev>e.g.</abbrev> 1)</para></listitem> 0539 <listitem><para>%g %{genre} Genre</para></listitem> 0540 <listitem><para> %{ignore} Ignored when generating tags from the file name</para></listitem> 0541 </itemizedlist> 0542 0543 <para> 0544 The format codes are not restricted to the examples given above. Any frame 0545 name can be used, for instance unified frame names 0546 like <userinput>%{albumartist}</userinput>, 0547 <userinput>%{discnumber.1}</userinput>, <userinput>%{bpm}</userinput> or 0548 format specific names like <userinput>%{popm}</userinput>. 0549 </para> 0550 0551 <para> 0552 It is possible to prepend and append strings to the replacement for a format 0553 code by adding them in double quotes inside the curly braces of a format 0554 code. These strings will only be put into the resulting string if the format 0555 code yields a nonempty value. For example, if the file name shall 0556 both contain the title and the subtitle, one could use 0557 <userinput>%{title} [%{subtitle}]</userinput> in the format string. But this 0558 would result in a string ending with <computeroutput> []</computeroutput> if 0559 no subtitle frame exists for a file. In order to omit the brackets if no 0560 subtitle is present, <userinput>%{title}%{" ["subtitle"]"}</userinput> shall 0561 be used instead. This will omit the brackets, the leading space and the 0562 subtitle if not subtitle exists. 0563 </para> 0564 0565 <para> 0566 The list of available formats can be edited in the dialog which appears when 0567 clicking the <guibutton>Filename from tag</guibutton> button in the 0568 <guilabel>File</guilabel> tab of the 0569 <link linkend="configure-kid3">settings</link>. 0570 </para> 0571 0572 <para> 0573 A second <guilabel>Format</guilabel> combo box (with arrow down) is used 0574 to generate the tags from the filename. If the format 0575 of the filename does not match this pattern, a few other commonly used formats 0576 are tried. 0577 </para> 0578 0579 <para> 0580 Some commonly used filename formats are already available in the combo box, 0581 but it is also possible to type in some special format into the line edit. 0582 </para> 0583 0584 <para> 0585 The list of available formats can be edited in the dialog which appears when 0586 clicking the <guibutton>Tag from filename</guibutton> button in the 0587 <guilabel>File</guilabel> tab of the 0588 <link linkend="configure-kid3">settings</link>. 0589 </para> 0590 0591 <para> 0592 Internally, a regular expression is built from the format codes. If advanced 0593 regular expressions are required, the format to generate the tags from the 0594 filenames can be given as a complete regular expression with captures which 0595 are preceded by the format codes, <abbrev>e.g.</abbrev> to extract the track numbers without 0596 removal of leading zeros, a format like "<userinput>/%{track}(\d+) 0597 %{title}(.*)</userinput>" could be used. 0598 </para> 0599 <para> 0600 <guilabel>From:</guilabel> <guibutton>Tag 1</guibutton>, 0601 <guibutton>Tag 2</guibutton>: Sets the filename using the selected format 0602 and the first tag or the second tag, respectively. 0603 </para> 0604 <para> 0605 <guilabel>To:</guilabel> <guibutton>Tag 1</guibutton>, 0606 <guibutton>Tag 2</guibutton>: The tags are set from the filename. 0607 First, the format specified in <guilabel>Format</guilabel> is used. If the 0608 existing filename does not match this format, the following formats 0609 are tried: 0610 </para> 0611 <itemizedlist> 0612 <listitem><para><filename>Artist - Album/Track Song</filename></para></listitem> 0613 <listitem><para><filename>Album/Track - Artist - Song</filename></para></listitem> 0614 <listitem><para><filename>/Artist - Album - Track - Song</filename></para></listitem> 0615 <listitem><para><filename>Album/Artist - Track - Song</filename></para></listitem> 0616 <listitem><para><filename>Album/Artist - Song</filename></para></listitem> 0617 <listitem><para><filename>Artist/Album/Track Song</filename></para></listitem> 0618 </itemizedlist> 0619 <para> 0620 If a single file is selected, the &GUI; controls are filled with the values 0621 extracted from the filename. If multiple files are selected, the tags of the 0622 files are directly set according to the filenames. 0623 </para> 0624 </sect2> 0625 0626 <sect2 id="tag1"> 0627 <title>Tag 1</title> 0628 0629 <para> 0630 The line edit widgets for <guilabel>Title</guilabel>, 0631 <guilabel>Artist</guilabel>, 0632 <guilabel>Album</guilabel>, <guilabel>Comment</guilabel>, 0633 <guilabel>Date</guilabel>, <guilabel>Track Number</guilabel> and 0634 <guilabel>Genre</guilabel> are used to edit the corresponding value in the 0635 first tag of the selected files. The value will be changed when the file 0636 selection is altered or before operations like <guimenuitem>Save</guimenuitem> 0637 and <guimenuitem>Quit</guimenuitem> and when the corresponding 0638 check box at the left of the field name is checked. This is useful to 0639 change only some values and leave the other values unchanged. 0640 </para> 0641 <para> 0642 If a single file is selected, all check boxes are checked and the line edit 0643 widgets contain the values found in the tags of this file. If a tag is not 0644 found in the file, the corresponding empty value is displayed, which is an 0645 empty string for the <guilabel>Title</guilabel>, <guilabel>Artist</guilabel>, 0646 <guilabel>Album</guilabel> and <guilabel>Comment</guilabel> line edits, 0 for the 0647 numerical <guilabel>Date</guilabel> and <guilabel>Track Number</guilabel> edits and 0648 an empty selected value for the <guilabel>Genre</guilabel> 0649 combo box. The values can be changed and if the corresponding check box is 0650 checked, they will be set for the selected file after the selection is 0651 changed. The file is then marked as modified by a disk symbol in the file 0652 listbox but remains unchanged until the <guimenuitem>Save</guimenuitem> 0653 command is used. 0654 </para> 0655 <para> 0656 If multiple files are selected, only the values which are identical in all 0657 selected files are displayed. In all other controls, the empty values as 0658 described above are displayed. All check boxes are unchecked to avoid 0659 unwanted changes. If a value has to be set for all selected files, it can 0660 be edited and the check box has to be set. The values will be set for all 0661 selected files when the selection is changed and can be saved using the 0662 <guimenuitem>Save</guimenuitem> command. 0663 </para> 0664 <para> 0665 The check boxes also control the operation of most commands affecting the 0666 tags, such as copy, paste and transfer between tags 1 and 2. To make it 0667 easier to use with multiple files where all check boxes are unchecked, these 0668 commands behave in the same way when all check boxes are checked and when all 0669 check boxes are unchecked. 0670 </para> 0671 <para> 0672 <guibutton>From Tag 2</guibutton>: The tag 1 fields are set from the 0673 corresponding values in tag 2. 0674 If a single file is selected, the &GUI; controls are filled with the values 0675 from tag 2. If multiple files are selected, the tags of the 0676 files are directly set. 0677 </para> 0678 <para> 0679 <guibutton>Copy</guibutton>: The copy buffer is filled with the Tag 1 values. 0680 Only values with checked check box will be used in subsequent Paste commands. 0681 </para> 0682 <para> 0683 <guibutton>Paste</guibutton>: Pastes the values from the copy buffer into the 0684 &GUI; controls. 0685 </para> 0686 <para> 0687 <guibutton>Remove</guibutton>: This will set all &GUI; controls to their empty 0688 values which results in removing all values. The saved file will then contain 0689 no tag 1. 0690 </para> 0691 </sect2> 0692 0693 <sect2 id="tag2"> 0694 <title>Tag 2</title> 0695 0696 <para> 0697 The &GUI; controls function in the same way as described for the 0698 <guilabel>Tag 1</guilabel> section, but the size of the strings is not limited. 0699 </para> 0700 <para> 0701 For the tag 2 <guilabel>Genre</guilabel> you can also use your own names 0702 besides the genres listed in the combo box, just type the name into the line 0703 edit. 0704 </para> 0705 <para> 0706 The tag 2 cannot only contain the same values 0707 as the tag 1, the format is built in a flexible way from several frames 0708 which are themselves composed of several fields. The tag 2 table shows 0709 all the frames which are available in the selected file. 0710 </para> 0711 <para> 0712 <guibutton>Edit</guibutton>: This will open a window which allows one to edit all fields 0713 of the selected frame. 0714 If multiple files are selected, the edited fields are applied to all selected files 0715 which contain such a frame. 0716 </para> 0717 <para> 0718 <guibutton>Add</guibutton>: A requester to select the frame type will appear 0719 and a frame of the selected type can be edited and added to the file. This 0720 works also to add a frame to multiple selected files. 0721 </para> 0722 <para> 0723 <guibutton>Delete</guibutton>: Deletes the selected frame in the selected files. 0724 </para> 0725 <para> 0726 <guilabel>Drag album artwork here</guilabel> is shown if the file does not 0727 contain embedded cover art. A picture can be added using drag and drop from a 0728 browser or file manager and will be displayed here. Picture frames can be 0729 edited or added by double clicking on this control. 0730 </para> 0731 0732 </sect2> 0733 0734 <sect2 id="tag3"> 0735 <title>Tag 3</title> 0736 0737 <para> 0738 Some files can have more than two tags, and a third tag section is visible. 0739 The following file types can have such a <guilabel>Tag 3</guilabel> section: 0740 </para> 0741 <itemizedlist> 0742 <listitem><para> 0743 MP3 files can have an ID3v1.1 tag, an ID3v2 (2.3.0 or 2.4.0) tag and in the 0744 third section an APE tag. Such APE tags are used for replay gain 0745 information. In the <guilabel>Tag 3</guilabel> section, this information is 0746 visible, and the APE tag can be removed with the <guibutton>Remove</guibutton> 0747 button. 0748 </para></listitem> 0749 <listitem><para> 0750 The RIFF INFO chunk of WAV files is available in the <guilabel>Tag 3 0751 </guilabel> section because the <guilabel>Tag 1</guilabel> section is 0752 dedicated to ID3v1.1 tags and handles their restrictions. The 0753 <guilabel>Tag 2</guilabel> is still used for ID3v2.4.0 tags, which are also 0754 supported for WAV files, but RIFF INFO chunks seem to be supported better. 0755 </para></listitem> 0756 <listitem><para> 0757 FLAC files normally use a Vorbis comment for their meta data. However, there 0758 are FLAC files which have ID3v1 and ID3v2 tags, which can be found in the 0759 <guilabel>Tag 1</guilabel> and <guilabel>Tag 3</guilabel> sections. 0760 ID3 tags in FLAC files are only supported by TagLib, therefore the 0761 OggFlacMetadata plugin has to be disabled in the <guilabel>Plugins</guilabel> 0762 tab of the <link linkend="configure-kid3">settings</link>. 0763 </para></listitem> 0764 </itemizedlist> 0765 <para> 0766 The &GUI; controls work in the same way as in the <guilabel>Tag 2</guilabel> 0767 section. 0768 </para> 0769 0770 </sect2> 0771 0772 <!--begin manpage ignore--> 0773 <sect2 id="frame-list"> 0774 <title>Frame List</title> 0775 0776 <para> 0777 &kid3; can edit most of the frames for all of the supported file types. Some 0778 frames are accessed using unified names, so that they can be exchanged 0779 between files with different formats. Frames which are not unified can be accessed as 0780 format specific frames. 0781 </para> 0782 0783 <table id="table-frame-list"> 0784 <title>Mapping of Unified Frame Types to Various Formats</title> 0785 <tgroup cols="7"> 0786 <thead> 0787 <row><entry>Unified</entry> <entry>ID3v2.3</entry> <entry>ID3v2.4</entry> <entry>MP4</entry> <entry>ASF</entry> <entry>Vorbis</entry> <entry>RIFF</entry></row> 0788 </thead> 0789 <tbody> 0790 <row><entry>Title</entry> <entry><literal>TIT2</literal></entry> <entry><literal>TIT2</literal></entry> <entry><literal>©nam</literal></entry> <entry><literal>Title</literal></entry> <entry><literal>TITLE</literal></entry> <entry><literal>INAM</literal></entry></row> 0791 <row><entry>Artist</entry> <entry><literal>TPE1</literal></entry> <entry><literal>TPE1</literal></entry> <entry><literal>©ART</literal></entry> <entry><literal>Author</literal></entry> <entry><literal>ARTIST</literal></entry> <entry><literal>IART</literal></entry></row> 0792 <row><entry>Album</entry> <entry><literal>TALB</literal></entry> <entry><literal>TALB</literal></entry> <entry><literal>©alb</literal></entry> <entry><literal>WM/AlbumTitle</literal></entry> <entry><literal>ALBUM</literal></entry> <entry><literal>IPRD</literal></entry></row> 0793 <row><entry>Comment</entry> <entry><literal>COMM</literal></entry> <entry><literal>COMM</literal></entry> <entry><literal>©cmt</literal></entry> <entry><literal>Description</literal></entry> <entry><literal>COMMENT</literal></entry> <entry><literal>ICMT</literal></entry></row> 0794 <row><entry>Date</entry> <entry><literal>TYER</literal></entry> <entry><literal>TDRC</literal></entry> <entry><literal>©day</literal></entry> <entry><literal>WM/Year</literal></entry> <entry><literal>DATE</literal></entry> <entry><literal>ICRD</literal></entry></row> 0795 <row><entry>Track Number</entry> <entry><literal>TRCK</literal></entry> <entry><literal>TRCK</literal></entry> <entry><literal>trkn</literal></entry> <entry><literal>WM/TrackNumber</literal></entry> <entry><literal>TRACKNUMBER</literal></entry> <entry><literal>IPRT</literal> or <literal>ITRK</literal></entry></row> 0796 <row><entry>Genre</entry> <entry><literal>TCON</literal></entry> <entry><literal>TCON</literal></entry> <entry><literal>©gen</literal></entry> <entry><literal>WM/Genre</literal></entry> <entry><literal>GENRE</literal></entry> <entry><literal>IGNR</literal></entry></row> 0797 <row><entry>Album Artist</entry> <entry><literal>TPE2</literal></entry> <entry><literal>TPE2</literal></entry> <entry><literal>aART</literal></entry> <entry><literal>WM/AlbumArtist</literal></entry> <entry><literal>ALBUMARTIST</literal></entry> <entry></entry></row> 0798 <row><entry>Arranger</entry> <entry><literal>IPLS</literal></entry> <entry><literal>TIPL</literal></entry> <entry><literal>ARRANGER</literal></entry> <entry><literal>WM/Producer</literal></entry> <entry><literal>ARRANGER</literal></entry> <entry><literal>IENG</literal></entry></row> 0799 <row><entry>Author</entry> <entry><literal>TOLY</literal></entry> <entry><literal>TOLY</literal></entry> <entry><literal>AUTHOR</literal></entry> <entry></entry> <entry><literal>AUTHOR</literal></entry> <entry></entry></row> 0800 <row><entry>BPM</entry> <entry><literal>TBPM</literal></entry> <entry><literal>TBPM</literal></entry> <entry><literal>tmpo</literal></entry> <entry><literal>WM/BeatsPerMinute</literal></entry> <entry><literal>BPM</literal></entry> <entry><literal>IBPM</literal></entry></row> 0801 <row><entry>Catalog Number</entry> <entry><literal>TXXX:CATALOGNUMBER</literal></entry> <entry><literal>TXXX:CATALOGNUMBER</literal></entry> <entry></entry> <entry></entry> <entry><literal>CATALOGNUMBER</literal></entry> <entry></entry></row> 0802 <row><entry>Compilation</entry> <entry><literal>TCMP</literal></entry> <entry><literal>TCMP</literal></entry> <entry><literal>cpil</literal></entry> <entry></entry> <entry><literal>COMPILATION</literal></entry> <entry></entry></row> 0803 <row><entry>Composer</entry> <entry><literal>TCOM</literal></entry> <entry><literal>TCOM</literal></entry> <entry><literal>©wrt</literal></entry> <entry><literal>WM/Composer</literal></entry> <entry><literal>COMPOSER</literal></entry> <entry><literal>IMUS</literal></entry></row> 0804 <row><entry>Conductor</entry> <entry><literal>TPE3</literal></entry> <entry><literal>TPE3</literal></entry> <entry><literal>CONDUCTOR</literal></entry> <entry><literal>WM/Conductor</literal></entry> <entry><literal>CONDUCTOR</literal></entry> <entry></entry></row> 0805 <row><entry>Copyright</entry> <entry><literal>TCOP</literal></entry> <entry><literal>TCOP</literal></entry> <entry><literal>cprt</literal></entry> <entry><literal>Copyright</literal></entry> <entry><literal>COPYRIGHT</literal></entry> <entry><literal>ICOP</literal></entry></row> 0806 <row><entry>Description</entry> <entry><literal>TIT3</literal></entry> <entry><literal>TIT3</literal></entry> <entry><literal>desc</literal></entry> <entry><literal>WM/SubTitleDescription</literal></entry> <entry><literal>DESCRIPTION</literal></entry> <entry></entry></row> 0807 <row><entry>Disc Number</entry> <entry><literal>TPOS</literal></entry> <entry><literal>TPOS</literal></entry> <entry><literal>disk</literal></entry> <entry><literal>WM/PartOfSet</literal></entry> <entry><literal>DISCNUMBER</literal></entry> <entry></entry></row> 0808 <row><entry>Encoded-by</entry> <entry><literal>TENC</literal></entry> <entry><literal>TENC</literal></entry> <entry><literal>©enc</literal></entry> <entry><literal>WM/EncodedBy</literal></entry> <entry><literal>ENCODED-BY</literal></entry> <entry><literal>ITCH</literal></entry></row> 0809 <row><entry>Encoder Settings</entry> <entry><literal>TSSE</literal></entry> <entry><literal>TSSE</literal></entry> <entry><literal>©too</literal></entry> <entry><literal>WM/EncodingSettings</literal></entry> <entry><literal>ENCODERSETTINGS</literal></entry> <entry><literal>ISFT</literal></entry></row> 0810 <row><entry>Encoding Time</entry> <entry></entry> <entry><literal>TDEN</literal></entry> <entry></entry> <entry><literal>WM/EncodingTime</literal></entry> <entry><literal>ENCODINGTIME</literal></entry> <entry><literal>IDIT</literal></entry></row> 0811 <row><entry>Grouping</entry> <entry><literal>GRP1</literal></entry> <entry><literal>GRP1</literal></entry> <entry><literal>©grp</literal></entry> <entry></entry> <entry><literal>GROUPING</literal></entry> <entry></entry></row> 0812 <row><entry>Initial Key</entry> <entry><literal>TKEY</literal></entry> <entry><literal>TKEY</literal></entry> <entry></entry> <entry><literal>WM/InitialKey</literal></entry> <entry><literal>INITIALKEY</literal></entry> <entry></entry></row> 0813 <row><entry>ISRC</entry> <entry><literal>TSRC</literal></entry> <entry><literal>TSRC</literal></entry> <entry><literal>ISRC</literal></entry> <entry><literal>WM/ISRC</literal></entry> <entry><literal>ISRC</literal></entry> <entry><literal>ISRC</literal></entry></row> 0814 <row><entry>Language</entry> <entry><literal>TLAN</literal></entry> <entry><literal>TLAN</literal></entry> <entry><literal>LANGUAGE</literal></entry> <entry><literal>WM/Language</literal></entry> <entry><literal>LANGUAGE</literal></entry> <entry><literal>ILNG</literal></entry></row> 0815 <row><entry>Lyricist</entry> <entry><literal>TEXT</literal></entry> <entry><literal>TEXT</literal></entry> <entry><literal>LYRICIST</literal></entry> <entry><literal>WM/Writer</literal></entry> <entry><literal>LYRICIST</literal></entry> <entry><literal>IWRI</literal></entry></row> 0816 <row><entry>Lyrics</entry> <entry><literal>USLT</literal></entry> <entry><literal>USLT</literal></entry> <entry><literal>©lyr</literal></entry> <entry><literal>WM/Lyrics</literal></entry> <entry><literal>LYRICS</literal></entry> <entry></entry></row> 0817 <row><entry>Media</entry> <entry><literal>TMED</literal></entry> <entry><literal>TMED</literal></entry> <entry><literal>SOURCEMEDIA</literal></entry> <entry></entry> <entry><literal>SOURCEMEDIA</literal></entry> <entry><literal>IMED</literal></entry></row> 0818 <row><entry>Mood</entry> <entry></entry> <entry><literal>TMOO</literal></entry> <entry></entry> <entry><literal>WM/Mood</literal></entry> <entry><literal>MOOD</literal></entry> <entry></entry></row> 0819 <row><entry>Original Album</entry> <entry><literal>TOAL</literal></entry> <entry><literal>TOAL</literal></entry> <entry><literal>ORIGINALALBUM</literal></entry> <entry><literal>WM/OriginalAlbumTitle</literal></entry> <entry><literal>ORIGINALALBUM</literal></entry> <entry></entry></row> 0820 <row><entry>Original Artist</entry> <entry><literal>TOPE</literal></entry> <entry><literal>TOPE</literal></entry> <entry><literal>ORIGINALARTIST</literal></entry> <entry><literal>WM/OriginalArtist</literal></entry> <entry><literal>ORIGINALARTIST</literal></entry> <entry></entry></row> 0821 <row><entry>Original Date</entry> <entry><literal>TORY</literal></entry> <entry><literal>TDOR</literal></entry> <entry><literal>ORIGINALDATE</literal></entry> <entry><literal>WM/OriginalReleaseYear</literal></entry> <entry><literal>ORIGINALDATE</literal></entry> <entry></entry></row> 0822 <row><entry>Performer</entry> <entry><literal>IPLS</literal></entry> <entry><literal>TMCL</literal></entry> <entry><literal>PERFORMER</literal></entry> <entry></entry> <entry><literal>PERFORMER</literal></entry> <entry><literal>ISTR</literal></entry></row> 0823 <row><entry>Picture</entry> <entry><literal>APIC</literal></entry> <entry><literal>APIC</literal></entry> <entry><literal>covr</literal></entry> <entry><literal>WM/Picture</literal></entry> <entry><literal>METADATA_BLOCK_PICTURE</literal></entry> <entry></entry></row> 0824 <row><entry>Publisher</entry> <entry><literal>TPUB</literal></entry> <entry><literal>TPUB</literal></entry> <entry><literal>PUBLISHER</literal></entry> <entry><literal>WM/Publisher</literal></entry> <entry><literal>PUBLISHER</literal></entry> <entry><literal>IPUB</literal></entry></row> 0825 <row><entry>Rating</entry> <entry><literal>POPM</literal></entry> <entry><literal>POPM</literal></entry> <entry><literal>rate</literal></entry> <entry><literal>WM/SharedUserRating</literal></entry> <entry><literal>RATING</literal></entry> <entry><literal>IRTD</literal></entry></row> 0826 <row><entry>Release Country</entry> <entry><literal>TXXX:RELEASECOUNTRY</literal></entry> <entry><literal>TXXX:RELEASECOUNTRY</literal></entry> <entry></entry> <entry></entry> <entry><literal>RELEASECOUNTRY</literal></entry> <entry><literal>ICNT</literal></entry></row> 0827 <row><entry>Release Date</entry> <entry></entry> <entry><literal>TDRL</literal></entry> <entry><literal>RELEASEDATE</literal></entry> <entry></entry> <entry><literal>RELEASEDATE</literal></entry> <entry></entry></row> 0828 <row><entry>Remixer</entry> <entry><literal>TPE4</literal></entry> <entry><literal>TPE4</literal></entry> <entry><literal>REMIXER</literal></entry> <entry><literal>WM/ModifiedBy</literal></entry> <entry><literal>REMIXER</literal></entry> <entry><literal>IEDT</literal></entry></row> 0829 <row><entry>Sort Album</entry> <entry><literal>TSOA</literal></entry> <entry><literal>TSOA</literal></entry> <entry><literal>soal</literal></entry> <entry><literal>WM/AlbumSortOrder</literal></entry> <entry><literal>ALBUMSORT</literal></entry> <entry></entry></row> 0830 <row><entry>Sort Album Artist</entry> <entry><literal>TSO2</literal></entry> <entry><literal>TSO2</literal></entry> <entry><literal>soaa</literal></entry> <entry></entry> <entry><literal>ALBUMARTISTSORT</literal></entry> <entry></entry></row> 0831 <row><entry>Sort Artist</entry> <entry><literal>TSOP</literal></entry> <entry><literal>TSOP</literal></entry> <entry><literal>soar</literal></entry> <entry><literal>WM/ArtistSortOrder</literal></entry> <entry><literal>ARTISTSORT</literal></entry> <entry></entry></row> 0832 <row><entry>Sort Composer</entry> <entry><literal>TSOC</literal></entry> <entry><literal>TSOC</literal></entry> <entry><literal>soco</literal></entry> <entry></entry> <entry><literal>COMPOSERSORT</literal></entry> <entry></entry></row> 0833 <row><entry>Sort Name</entry> <entry><literal>TSOT</literal></entry> <entry><literal>TSOT</literal></entry> <entry><literal>sonm</literal></entry> <entry><literal>WM/TitleSortOrder</literal></entry> <entry><literal>TITLESORT</literal></entry> <entry></entry></row> 0834 <row><entry>Subtitle</entry> <entry></entry> <entry><literal>TSST</literal></entry> <entry><literal>SUBTITLE</literal></entry> <entry><literal>WM/SubTitle</literal></entry> <entry><literal>SUBTITLE</literal></entry> <entry><literal>PRT1</literal></entry></row> 0835 <row><entry>Website</entry> <entry><literal>WOAR</literal></entry> <entry><literal>WOAR</literal></entry> <entry><literal>WEBSITE</literal></entry> <entry><literal>WM/AuthorURL</literal></entry> <entry><literal>WEBSITE</literal></entry> <entry><literal>IBSU</literal></entry></row> 0836 <row><entry>Work</entry> <entry><literal>TIT1</literal></entry> <entry><literal>TIT1</literal></entry> <entry><literal>©wrk</literal></entry> <entry><literal>WM/ContentGroupDescription</literal></entry> <entry><literal>WORK</literal></entry> <entry></entry></row> 0837 <row><entry>WWW Audio File</entry> <entry><literal>WOAF</literal></entry> <entry><literal>WOAF</literal></entry> <entry></entry> <entry><literal>WM/AudioFileURL</literal></entry> <entry><literal>WWWAUDIOFILE</literal></entry> <entry></entry></row> 0838 <row><entry>WWW Audio Source</entry> <entry><literal>WOAS</literal></entry> <entry><literal>WOAS</literal></entry> <entry></entry> <entry><literal>WM/AudioSourceURL</literal></entry> <entry><literal>WWWAUDIOSOURCE</literal></entry> <entry></entry></row> 0839 </tbody> 0840 </tgroup> 0841 </table> 0842 0843 <para> 0844 Remarks concerning the mappings to unified frame names: 0845 <itemizedlist> 0846 <listitem><para> 0847 The number of unified frame names is limited by the fact that a sensible 0848 mapping shall be possible for all supported file formats. Most tags support 0849 frames with arbitrary names; these will be used if no specific frame is 0850 available (<abbrev>e.g.</abbrev> the names in uppercase in the column MP4). If no such 0851 possibility exists, some frame types may not be supported for the format, 0852 <abbrev>e.g.</abbrev> Author and Performer for ASF (WMA). 0853 </para></listitem> 0854 <listitem><para> 0855 The mappings are not chosen arbitrarily, they are geared to the usage of the 0856 frames in other applications and devices. Thus the ID3v2 frame "TPE2 - 0857 Band/orchestra/accompaniment" does not suggest its usage as Album Artist, but 0858 this is commonly used. The actual meaning for ID3v2 on the other hand is the 0859 reason why this frame is used for the orchestra when importing (<abbrev>e.g.</abbrev> from 0860 Discogs), although this may seem a bit strange for other tag formats. 0861 </para></listitem> 0862 <listitem><para> 0863 The mappings are not always bijective. So ID3v2.3 uses an IPLS frame for both 0864 Arranger and Performer. When reading back, both frames are displayed as 0865 "Arranger". 0866 </para></listitem> 0867 <listitem><para> 0868 The frames Arranger and Performer use a particular format for their contents: 0869 "involvement 1|involvee 1|involvement 2|involvee 2|...", for 0870 instance "Chorus Master|Ernst Dunshirn|Soprano Vocals|Anna Netrebko". This 0871 will create IPLS (ID3v2.3) or TIPL/TMCL (ID3v2.4) frames with a string list in 0872 the specified format (the "|" is used as a separator between the strings). 0873 Values in this format are also set when importing data from servers which 0874 offer this information. 0875 </para></listitem> 0876 <listitem><para> 0877 To explicitly use a specific frame name which conflicts with a unified frame 0878 name, prepend an exclamation mark. For example, adding a frame of type 0879 "<replaceable>Media</replaceable>" to a Vorbis comment will create a frame with 0880 name "<literal>SOURCEMEDIA</literal>" because of the unified type mapping. In 0881 order to add a frame with name "<literal>MEDIA</literal>" and not 0882 "<literal>SOURCEMEDIA</literal>", use "<literal>!MEDIA</literal>" to force the 0883 explicit name. 0884 </para></listitem> 0885 <listitem><para> 0886 If you need a frame which is not in this list, you still have the possibility 0887 to enter arbitrary names using the <guibutton>Add</guibutton> button. Often 0888 used frame names can be added to the <guilabel>Custom Frames</guilabel> in the 0889 <guilabel>Tags</guilabel> configuration, and will then be available in the 0890 <guilabel>Quick Access Frames</guilabel>. 0891 </para></listitem> 0892 </itemizedlist> 0893 </para> 0894 0895 </sect2> 0896 <!--end manpage ignore--> 0897 0898 <sect2 id="synchronized-lyrics"> 0899 <title>Synchronized Lyrics and Event Timing Codes</title> 0900 0901 <para> 0902 For information synchronized with the audio data, a specific editor is 0903 available. These frames are supported for ID3v2.3.0 and ID3v2.4.0 tags. To add 0904 such a frame, the specific frame name has to be selected in the list which 0905 appears when the <guibutton>Add</guibutton> button is clicked - 0906 <guilabel>Synchronized Lyrics</guilabel> or <guilabel>Event Timing 0907 Codes</guilabel>, respectively. The editor is the same for both types, for the 0908 event timing codes, only a predefined set of events is available whereas for 0909 the synchronized lyrics, text has to be entered. In the following, editing 0910 synchronized lyrics is explained. 0911 </para> 0912 <para> 0913 A file having an ID3v2 tag is selected, the lyrics editor is entered using 0914 <guibutton>Add</guibutton> and selecting <guilabel>Synchronized 0915 Lyrics</guilabel>. For an existing Synchronized Lyrics frame, it is selected and 0916 <guibutton>Edit</guibutton> is clicked. The player is automatically opened 0917 with the current file so that the file can be played and paused to synchronize 0918 lyrics. 0919 </para> 0920 <para> 0921 The settings at the top of the SYLT editor normally do not have to be 0922 changed. If the lyrics contains characters which are not present in the Latin 1 0923 character set, changing the text encoding to UTF16 (or UTF8 for ID3v2.4.0) is 0924 advisable. For English lyrics and maximum compatibility, ISO-8859-1 should be 0925 used. 0926 </para> 0927 <para> 0928 The <guilabel>Lyrics</guilabel> section has five buttons at the 0929 top. <guibutton>Add</guibutton> will add a new time event in the table. The 0930 time is taken from the position of the player, thus adding an entry while 0931 playing the track will add a line for the currently played position. The 0932 events in the table have to be chronologically ordered, therefore the row will 0933 be inserted accordingly. Entries with an invalid time are treated specially: 0934 If the currently selected row has an invalid time, its time stamp will be 0935 replaced by the current time instead of adding a new row. If the current time 0936 is not invalid, the first row with an invalid time will be used if 0937 present. This behavior should facilitate adding time stamps if the lyrics text 0938 is already in the table but the time stamps are missing (which is the case 0939 when importing unsynchronized lyrics). Note that the invalid time is 0940 represented as 00:00.00, <abbrev>i.e.</abbrev> the same as the time at the absolute beginning 0941 of the track, which is not invalid. To make a time invalid, press the 0942 <keycap>Delete</keycap> key, or use <guimenu>Clear</guimenu> from the context menu. New rows 0943 inserted using <guimenu>Insert row</guimenu> from the context menu or created 0944 when importing unsynchronized lyrics with <guibutton>From Clipboard</guibutton> 0945 or <guibutton>Import</guibutton> also contain invalid time stamps. Rows in the 0946 table can be deleted by clicking the <guibutton>Delete</guibutton> button or 0947 using <guimenu>Delete rows</guimenu> from the context menu. 0948 </para> 0949 <para> 0950 Synchronized lyrics can be imported from a file using 0951 <guibutton>Import</guibutton>. The expected format is simple or enhanced 0952 LRC. If the selected file does not contain a square bracket in the first line, 0953 it is supposed to be a simple text file with unsynchronized lyrics. The lines 0954 from such a file are then imported having invalid time stamps. The time 0955 information can be added using the <guibutton>Add</guibutton> button or 0956 by manual entry. It is also possible to import lyrics via copy-paste using 0957 <guilabel>From Clipboard</guilabel>. Synchronized lyrics can be written to LRC 0958 files using <guibutton>Export</guibutton>. Note that only entries with valid 0959 time stamps will be exported and that the entries will be sorted by 0960 time. Entries with invalid time won't be stored in the SYLT frame either, so 0961 make sure to include all timing information before leaving the dialog. 0962 </para> 0963 <para> 0964 The <ulink url="http://id3.org/id3v2.4.0-frames">ID3 specification</ulink> 0965 suggests a time stamp for each syllable. However most players only support the 0966 granularity of a line or sentence. To support both use cases, &kid3; follows 0967 the same conventions as <ulink 0968 url="http://www.compuphase.com/software_sylteditor.htm">SYLT 0969 Editor</ulink>. Text which is entered into the table is assumed to start a new 0970 line unless it starts with a space or a hyphen. Exceptions to this rule are 0971 possible by starting a line with an underscore ('_') to force continuation or 0972 a hash mark ('#') to force a new line. These escape characters are not stored 0973 inside the SYLT frame. Inside the SYLT frame, new lines start with a line feed 0974 character (hex 0A) whereas continuations do not. When reading SYLT frames, 0975 &kid3; checks if the first entry starts with a line feed. If this is not the 0976 case, it is assumed that all entries are new lines and that no syllable 0977 continuations are used. 0978 </para> 0979 <para> 0980 While the track is played, the row associated with the current playing 0981 position is highlighted, so that the correctness of the synchronization 0982 information can be verified. If an offset has to be added to one or more time 0983 stamps, this can be accomplished with the <guimenu>Add offset</guimenu> 0984 context menu. Negative values can be used to reduce the time. Using 0985 <guimenu>Seek to position</guimenu> in the context menu, it is possible to set 0986 the playing position to the time of the selected row. 0987 </para> 0988 <para> 0989 <emphasis>Recommended procedure to add new synchronized lyrics</emphasis> 0990 <itemizedlist> 0991 <listitem><para>Get the unsynchronized lyrics, <abbrev>e.g.</abbrev> using 0992 <menuchoice><guimenu>Lyrics</guimenu><guimenuitem>Embed 0993 Lyrics</guimenuitem></menuchoice> from the file list context 0994 menu.</para></listitem> 0995 <listitem><para>Copy the unsynchronized lyrics to the clipboard, just go to 0996 the <guilabel>Lyrics</guilabel> row in the frame table and press 0997 <keycombo>&Ctrl;<keycap>C</keycap></keycombo>.</para></listitem> 0998 <listitem><para>Add a synchronized lyrics frame 0999 (<guibutton>Add...</guibutton>, <guilabel>Synchronized 1000 Lyrics</guilabel>, <guibutton>OK</guibutton>), click 1001 <guibutton>From Clipboard</guibutton>.</para></listitem> 1002 <listitem><para>Now all lines from the unsynchronized lyrics are in the table, 1003 all time stamps are invalid (0:0:0.00). You can delete empty entries 1004 beforehand.</para></listitem> 1005 <listitem><para>Start playing the song by clicking the play button 1006 <guibutton>►</guibutton> in the play toolbar at the bottom of the main 1007 window.</para></listitem> 1008 <listitem><para>When the next lyrics line with invalid timestamp comes, click 1009 <guibutton>Add</guibutton> or press 1010 <keycombo>&Alt;<keycap>A</keycap></keycombo>, the timestamp 1011 will be updated.</para></listitem> 1012 <listitem><para>Continue like this until all timestamps are set. If you missed 1013 something, stop playback and clear the timestamps using the <keycap>Delete</keycap> key or by 1014 selecting them and using <guimenuitem>Clear</guimenuitem> from the context 1015 menu. To restart playback from a given timestamp, use <guimenuitem>Seek to 1016 position</guimenuitem> from the context menu. 1017 </para></listitem> 1018 </itemizedlist> 1019 </para> 1020 </sect2> 1021 1022 <sect2 id="mp4-chapters"> 1023 <title>Chapters in MP4 Files</title> 1024 1025 <para> 1026 MP4 audiobooks typically have a <filename class="extension">.m4b</filename> 1027 extension and are rather large because they contain all chapters in a single 1028 file. To navigate in such files, they can contain chapter marks, which can be 1029 edited in &kid3; in a pseudo "Chapters" frame using the same editor which is 1030 used for <link linkend="synchronized-lyrics">synchronized lyrics</link>. Note, 1031 however, that this feature is only available with the 1032 <guilabel>Mp4v2Metadata</guilabel> plugin, so make sure that it is activated 1033 and above the <guilabel>TaglibMetadata</guilabel> plugin in the 1034 <guilabel>Plugins</guilabel> tab of the settings if you have to edit MP4 1035 chapters. 1036 </para> 1037 </sect2> 1038 1039 </sect1> 1040 1041 <sect1 id="file-menu"> 1042 <title>The File Menu</title> 1043 <para> 1044 <variablelist> 1045 1046 <varlistentry> 1047 <term><menuchoice> 1048 <shortcut> 1049 <keycombo>&Ctrl;<keycap>O</keycap></keycombo> 1050 </shortcut> 1051 <guimenu>File</guimenu> 1052 <guimenuitem>Open...</guimenuitem> 1053 </menuchoice></term> 1054 <listitem><para><action>Opens a folder.</action> All files matching the selected 1055 file name filter will be displayed in the file listbox 1056 and the chosen file is selected.</para></listitem> 1057 </varlistentry> 1058 1059 <varlistentry> 1060 <term><menuchoice> 1061 <guimenu>File</guimenu> 1062 <guimenuitem>Open Recent</guimenuitem> 1063 </menuchoice></term> 1064 <listitem><para><action>Opens a recently opened folder.</action></para></listitem> 1065 </varlistentry> 1066 1067 <varlistentry> 1068 <term><menuchoice> 1069 <shortcut> 1070 <keycombo>&Ctrl;<keycap>D</keycap></keycombo> 1071 </shortcut> 1072 <guimenu>File</guimenu> 1073 <guimenuitem>Open Folder...</guimenuitem> 1074 </menuchoice></term> 1075 <listitem><para><action>Opens a folder.</action> All files matching the selected 1076 file name filter will be displayed in the file listbox.</para></listitem> 1077 </varlistentry> 1078 1079 <varlistentry> 1080 <term><menuchoice> 1081 <shortcut> 1082 <keycap>F5</keycap> 1083 </shortcut> 1084 <guimenu>File</guimenu> 1085 <guimenuitem>Reload</guimenuitem> 1086 </menuchoice></term> 1087 <listitem><para><action>Reload folder.</action> Modified files have to be 1088 saved before. Expanded subfolders will be collapsed.</para></listitem> 1089 </varlistentry> 1090 1091 <varlistentry> 1092 <term><menuchoice> 1093 <shortcut> 1094 <keycombo>&Ctrl;<keycap>S</keycap></keycombo> 1095 </shortcut> 1096 <guimenu>File</guimenu> 1097 <guimenuitem>Save</guimenuitem> 1098 </menuchoice></term> 1099 <listitem><para><action>Saves all changed files in the folder.</action> The 1100 changed files are marked with a disk symbol in the file listbox. If any file 1101 names have been changed, those files will be renamed.</para></listitem> 1102 </varlistentry> 1103 1104 <varlistentry> 1105 <term><menuchoice> 1106 <guimenu>File</guimenu> 1107 <guimenuitem>Revert</guimenuitem> 1108 </menuchoice></term> 1109 <listitem><para><action>Reverts the changes of one or multiple files.</action> If no 1110 files are selected in the file listbox, the changes of all files will be 1111 reverted, else only the changes of the selected files are reverted. 1112 </para></listitem> 1113 </varlistentry> 1114 1115 <varlistentry id="import"> 1116 <term><menuchoice> 1117 <guimenu>File</guimenu> 1118 <guimenuitem>Import...</guimenuitem> 1119 </menuchoice></term> 1120 <listitem><para>The <action>Import dialog</action> can be used to import data 1121 directly from a freedb.org server, from a MusicBrainz server, from 1122 Discogs, Amazon or other sources of album track lists in textual format. 1123 </para> 1124 <para id="import-freedb"> 1125 Import from a freedb.org server is possible using a dialog which appears when 1126 <guibutton>From Server:</guibutton> 1127 <guibutton>gnudb.org</guibutton> 1128 is selected. The artist and album name 1129 to search for can be entered in the two topmost fields, 1130 the albums which match the 1131 query will be displayed when <guibutton>Find</guibutton> is clicked and the 1132 results from <ulink url="http://www.gnudb.org">www.gnudb.org</ulink> are 1133 received. Importing the track data for an album is 1134 done by double-clicking the album in the list. The freedb.org server to import 1135 from can be selected as well as the CGI path. The 1136 imported data is displayed in the preview table of the import dialog. 1137 When satisfied with the displayed tracks, they 1138 can be imported by terminating the import dialog with 1139 <guibutton>OK</guibutton>. 1140 </para> 1141 <para> 1142 If you already have a search result open in the web browser, you can enter the 1143 URL into the first search field. The result will then appear in the album list 1144 and can be directly imported into &kid3;. 1145 </para> 1146 <para id="import-discogs"> 1147 A search on the Discogs server can be performed using 1148 <guibutton>Discogs</guibutton>. As in the <guibutton>gnudb.org</guibutton> dialog, 1149 you can enter artist and album and then choose from a list of releases. 1150 A <guilabel>Token</guilabel> can be entered to use the RESTful Discogs API 1151 instead of their web interface, which is often changed, thereby breaking the 1152 import parser. You have to register for an account on 1153 <ulink url="https://www.discogs.com/">Discogs</ulink> and then generate a token 1154 on their web site (Settings/Developers, Generate new token). Don't forget to 1155 <guibutton>Save Settings</guibutton> after entering the token in order to use 1156 it in subsequent requests too. 1157 If <guilabel>Standard Tags</guilabel> is marked, the standard information is 1158 imported, <abbrev>e.g.</abbrev> artist, album, and title. 1159 If <guilabel>Additional Tags</guilabel> is marked, more information is 1160 imported if available, <abbrev>e.g.</abbrev> performers, arrangers, or the publisher. 1161 If <guilabel>Cover Art</guilabel> is marked, cover art will be downloaded if 1162 available. 1163 </para> 1164 <para id="import-amazon"> 1165 A search on Amazon can be performed using 1166 <guibutton>Amazon</guibutton>. As in the <guibutton>gnudb.org</guibutton> dialog, 1167 you can enter artist and album and then choose from a list of releases. 1168 If <guilabel>Additional Tags</guilabel> is marked, more information is 1169 imported if available, <abbrev>e.g.</abbrev> performers, arrangers, or the publisher. 1170 If <guilabel>Cover Art</guilabel> is marked, cover art will be downloaded if 1171 available. 1172 </para> 1173 <para id="import-musicbrainzrelease"> 1174 You can search in the same way in the release database of MusicBrainz 1175 using <guibutton>From MusicBrainz Release</guibutton>. 1176 The workflow is the same as described for <guibutton>From 1177 gnudb.org</guibutton>. 1178 </para> 1179 <para id="import-musicbrainz"> 1180 Import from a MusicBrainz server is possible using the dialog which appears when 1181 <guibutton>From MusicBrainz Fingerprint</guibutton> is selected. The Server can be 1182 selected as in the freedb import dialog. Below is a table displaying the 1183 imported track data. The right column shows the state of the MusicBrainz 1184 query, which starts with "Pending" when the dialog is opened. Then the 1185 fingerprint is looked up and if it does not yield a result, another lookup 1186 using the tags in the file is tried. Thus it can be helpful for a successful 1187 MusicBrainz query to store known information (<abbrev>e.g.</abbrev> artist and album) in the 1188 tags before the import. If a result was found, the search ends in the state 1189 "Recognized", otherwise nothing was found or multiple ambiguous results and one 1190 of them has to be selected by the user. 1191 <guibutton>OK</guibutton> and <guibutton>Apply</guibutton> use the imported 1192 data, <guibutton>Cancel</guibutton> closes the dialog. The closing can take a 1193 while since the whole MusicBrainz machinery has to be shut down. 1194 </para> 1195 1196 <para id="import-text"> 1197 For the import of textual data, <guibutton>From File/Clipboard</guibutton> 1198 opens a subdialog, where several preconfigured import formats are 1199 available. The first two, "CSV unquoted" and "CSV quoted" can be used to 1200 import data which was exported by the Export dialog. The CSV data can be 1201 edited with a spreadsheet, and shall be written using tabs as 1202 delimiters. Import should then be possible using "CSV quoted", which is more 1203 flexible than "CSV unquoted". However, its fields cannot contain any double 1204 quotes. If you only export from &kid3; and import later, "CSV unquoted" can be 1205 used as a simple format for this purpose. Note that there are also "Export 1206 CSV" and "Import CSV" commands in the context menu of the file list, which use 1207 scripts to export and import CSV data in a more complete, powerful and 1208 flexible way. 1209 </para> 1210 1211 <para> 1212 The next format, "freedb &HTML; 1213 text", can be used to copy information from an &HTML; page of 1214 <ulink url="http://freedb.org">freedb.org</ulink>. Search an album in freedb 1215 and if the desired information is displayed in the web browser, copy the 1216 contents to the clipboard. Then click the <guibutton>From 1217 Clipboard</guibutton> button and the imported tracks will be displayed in the 1218 preview table at the top of the dialog. If you are satisfied with the imported 1219 data, terminate the dialog with <guibutton>OK</guibutton>, which will insert 1220 the data into the tags of the current folder. The destination 1221 (<guilabel>Tag 1</guilabel>, <guilabel>Tag 2</guilabel> or 1222 <guilabel>Tag 1 and Tag 2</guilabel>) can be selected 1223 with a combo box. The files in the current folder should be in the correct 1224 track order to get their tags assigned. This is the case if they are numbered. 1225 </para> 1226 <para> 1227 The next preconfigured import format, "freedb &HTML; source", can be used, if 1228 the data is available as an &HTML; document. Import is possible using the 1229 <guibutton>From File</guibutton> button, which opens a file selector, or 1230 copying its contents from an editor and then importing from clipboard. This 1231 format can be useful for offline import, although the &HTML; document could also 1232 be opened in a browser and then be imported in the first format via the clipboard. 1233 </para> 1234 <para> 1235 More preconfigured formats, <abbrev>e.g.</abbrev> "Track Title Time", are available. An empty 1236 custom format can be created with <guibutton>Add</guibutton> to be set by the 1237 user. Two lines below the format name can be 1238 set with a regular expression to capture the fields from the import text. The 1239 first regular expression will be parsed once per document to gather per-album 1240 data such as artist, album, year and genre. The second line is tried to match 1241 from the start of the document to the end to get track data, usually number 1242 and title. The regular expressions include all the features offered by &Qt;, 1243 which is most of the what Perl offers. Bracketing constructs "(..)" create 1244 capture buffers for the fields to import and are preceded by &kid3; specific 1245 codes to specify which field to capture. The codes are the same as used for 1246 the filename format, besides the codes listed below, any frame name is 1247 possible: 1248 </para> 1249 1250 <para id="format-codes"> 1251 <itemizedlist> 1252 <listitem><para>%s %{title} Title (Song)</para></listitem> 1253 <listitem><para>%a %{artist} Artist</para></listitem> 1254 <listitem><para>%l %{album} Album</para></listitem> 1255 <listitem><para>%c %{comment} Comment</para></listitem> 1256 <listitem><para>%y %{year} Year</para></listitem> 1257 <listitem><para>%t %{track} Track</para></listitem> 1258 <listitem><para>%g %{genre} Genre</para></listitem> 1259 <listitem><para>%d %{duration} Duration</para></listitem> 1260 </itemizedlist> 1261 </para> 1262 1263 <para> 1264 For example, a track regular expression (second line) to import from an 1265 <filename class="extension">.m3u</filename> playlist could be 1266 "<literal>%{track}(\d+)\s+%{title}(\S[^\r\n]*)\.mp3[\r\n]</literal>". All formats 1267 can be changed by editing the regular expressions and the name and then clicking 1268 <guibutton>Save Settings</guibutton>. They will be stored in the <filename>kid3rc</filename> 1269 file in the configuration folder. This file can be directly edited to have more 1270 import formats or it can be deleted to revert to the default formats. Formats 1271 can be deleted using <guibutton>Remove</guibutton>. 1272 </para> 1273 <para> 1274 <guilabel>Accuracy</guilabel> shows an estimation of how good the 1275 imported information matches the given tracks. It uses track durations or 1276 file names to calculate the level of similarity in percent. 1277 <guilabel>Cover Art</guilabel> shows the &URL; of the album cover image 1278 which will be downloaded. 1279 </para> 1280 <para> 1281 To check whether the imported tracks match the current set of files, the 1282 duration of the imported tracks can be compared with the duration of the 1283 files. This option can be enabled with the check box <guibutton>Check maximum 1284 allowable time difference (sec):</guibutton> and the maximum tolerated difference in 1285 time can be set in seconds. If a mismatch in a length is detected, the length 1286 is displayed with a red background in the preview table. 1287 </para> 1288 <para> 1289 If the files are ordered differently than the imported tracks, their assigned 1290 tracks have to be changed. This task can be facilitated using the <guilabel>Match 1291 with</guilabel> option with the buttons <guibutton>Length</guibutton>, 1292 <guibutton>Track</guibutton>, and <guibutton>Title</guibutton>, which will reorder 1293 the tracks according to the corresponding field. To correct the assignments 1294 manually, a track can be dragged with the <mousebutton>left</mousebutton> mouse button and the &Ctrl; key hold down, 1295 and then dropped at the new location. 1296 </para> 1297 <para> 1298 When the import dialog is opened, it contains the actual contents of the 1299 tags. The tag type (Tag 1, Tag 2, Tag 1 and Tag 2) can be selected using the 1300 <guilabel>Destination</guilabel> combo box. The button on the right of this 1301 combo box can be used to revert the table to the current contents of the 1302 tags. The check boxes in the first table column can be used to select the 1303 tracks which are imported. This can be useful if a folder contains the tracks 1304 of both &CD;s of a double &CD; and only the tracks of the second &CD; have to be 1305 imported. 1306 </para> 1307 <para> 1308 To identify the tracks which are imported, it is possible to display the file 1309 names or the full paths to the files using the context menu of the table 1310 header. The values in the import table can be edited. The revert-button to 1311 the right of the <guilabel>Destination</guilabel> combo box can be used to 1312 restore the contents of the tags, which can also be useful after changing the 1313 <guilabel>Destination</guilabel>. 1314 </para> 1315 <para> 1316 Almost all dialogs feature a <guibutton>Save Settings</guibutton> button, 1317 which can be used to store the dialog specific settings and the window size 1318 persistently. 1319 </para> 1320 1321 <para id="import-tags"> 1322 <guibutton>From Tags</guibutton> leads to a subdialog to set tag frames from 1323 the contents of other tag frames. This can be used to simply copy information 1324 between tags or extract a part from one frame and insert it in another. 1325 </para> 1326 <para> 1327 As in the <link linkend="import-text">import from file/clipboard</link> dialog, 1328 there are freely configurable formats to perform different operations. Already 1329 preconfigured are formats to copy the Album value to Album Artist, Composer or 1330 Conductor, and to extract the Track Number from Title fields which contain a 1331 number. There is also a format to extract a Subtitle from a Title field. 1332 </para> 1333 <para> 1334 The following example explains how to add a custom format, which sets the 1335 information from the Subtitle field also in the Comment field. Create a new 1336 format using <guibutton>Add</guibutton> button and set a new name, <abbrev>e.g.</abbrev> 1337 "Subtitle to Comment". Then enter "<userinput>%{subtitle}</userinput>" in 1338 <guilabel>Source</guilabel> and "<userinput>%{comment}(.*)</userinput>" for 1339 <guilabel>Extraction</guilabel> and click <guibutton>Save 1340 Settings</guibutton>. 1341 </para> 1342 <para> 1343 The expression in <guilabel>Source</guilabel> can contain 1344 <link linkend="format-codes">format codes</link> for arbitrary tag frames, 1345 multiple codes can be used to combine the contents from different frames. For 1346 each track, a text is generated from its tags using the <guilabel>Source 1347 </guilabel> format, and the regular expression from 1348 <guilabel>Extraction</guilabel> is applied to this text to set new values for 1349 the tags. Format codes are used before the capturing parentheses to specify 1350 the tag frame where the captured text shall be stored. It works in the same 1351 way as for the <link linkend="import-text">import from file/clipboard</link>. 1352 </para> 1353 <para> 1354 <guimenuitem>Import from Tags...</guimenuitem> is also directly available from 1355 the <guimenu>File</guimenu> menu. The difference between these two functions 1356 is that the import dialog subdialog operates on all files of the current 1357 folder whereas the menu function operates on the selected files (which can 1358 be in different folders). The menu function supports an additional code 1359 "<literal>%{__return}</literal>" to return the extracted value, which can be 1360 useful with the CLI and QML interfaces. 1361 </para> 1362 </listitem> 1363 </varlistentry> 1364 1365 <varlistentry> 1366 <term><menuchoice> 1367 <guimenu>File</guimenu> 1368 <guimenuitem>Import from gnudb.org...</guimenuitem> 1369 </menuchoice></term> 1370 <listitem><para><action>Import from a freedb.org server 1371 using gnudb.org album search.</action> This menu 1372 item opens the same import dialog as <guimenuitem>Import...</guimenuitem>, but 1373 opens directly the <guibutton>gnudb.org</guibutton> 1374 dialog.</para></listitem> 1375 </varlistentry> 1376 1377 <varlistentry> 1378 <term><menuchoice> 1379 <guimenu>File</guimenu> 1380 <guimenuitem>Import from Discogs...</guimenuitem> 1381 </menuchoice></term> 1382 <listitem><para><action>Import from the Discogs server.</action> 1383 This menu item opens the same import dialog as 1384 <guimenuitem>Import...</guimenuitem>, but 1385 opens directly the <guibutton>From Discogs</guibutton> 1386 dialog.</para></listitem> 1387 </varlistentry> 1388 1389 <varlistentry> 1390 <term><menuchoice> 1391 <guimenu>File</guimenu> 1392 <guimenuitem>Import from Amazon...</guimenuitem> 1393 </menuchoice></term> 1394 <listitem><para><action>Import from Amazon.</action> 1395 This menu item opens the same import dialog as 1396 <guimenuitem>Import...</guimenuitem>, but 1397 opens directly the <guibutton>From Amazon</guibutton> 1398 dialog.</para></listitem> 1399 </varlistentry> 1400 1401 <varlistentry> 1402 <term><menuchoice> 1403 <guimenu>File</guimenu> 1404 <guimenuitem>Import from MusicBrainz Release...</guimenuitem> 1405 </menuchoice></term> 1406 <listitem><para><action>Import from the MusicBrainz release database.</action> 1407 This menu item opens the same import dialog as 1408 <guimenuitem>Import...</guimenuitem>, but 1409 opens directly the <guibutton>From MusicBrainz Release</guibutton> 1410 dialog.</para></listitem> 1411 </varlistentry> 1412 1413 <varlistentry> 1414 <term><menuchoice> 1415 <guimenu>File</guimenu> 1416 <guimenuitem>Import from MusicBrainz Fingerprint...</guimenuitem> 1417 </menuchoice></term> 1418 <listitem><para><action>Import from a MusicBrainz server.</action> This menu 1419 item opens the same import dialog as <guimenuitem>Import...</guimenuitem>, but 1420 opens directly the <guibutton>From MusicBrainz Fingerprint</guibutton> 1421 dialog.</para></listitem> 1422 </varlistentry> 1423 1424 <varlistentry> 1425 <term><menuchoice> 1426 <guimenu>File</guimenu> 1427 <guimenuitem>Import from Tags...</guimenuitem> 1428 </menuchoice></term> 1429 <listitem><para>Like <link linkend="import-tags">From Tags</link>, but the 1430 import is applied to the selected files.</para></listitem> 1431 </varlistentry> 1432 1433 <varlistentry id="batch-import"> 1434 <term><menuchoice> 1435 <guimenu>File</guimenu> 1436 <guimenuitem>Automatic Import...</guimenuitem> 1437 </menuchoice></term> 1438 <listitem><para> 1439 <action>Automatic Import</action> allows one to import information for multiple 1440 albums from various web services. If folders are selected in the file 1441 list, track data for the selected folders will be imported. If no 1442 folder is selected, all folders in the file list will be imported. 1443 </para> 1444 <para> 1445 The tag type (Tag 1, Tag 2, Tag 1 and Tag 2) can be selected using the 1446 <guilabel>Destination</guilabel> combo box. 1447 </para> 1448 <para> 1449 Profiles determine which servers will be contacted to fetch album 1450 information. Some profiles are predefined (All, MusicBrainz, Discogs, 1451 Cover Art), custom profiles can be added using the 1452 <guibutton>Add</guibutton> button at the right of the 1453 <guilabel>Profile</guilabel> combo box. 1454 </para> 1455 <para> 1456 The table below shows the servers which will be used when importing album 1457 information using the selected profile. The import process for an album is 1458 finished if all required information has been found, so the order of the 1459 rows in the table is important. It can be changed using the 1460 <guibutton>Move Up</guibutton> and <guibutton>Move Down</guibutton> buttons. 1461 <guibutton>Edit</guibutton> can be used to change an existing entry. The 1462 <guibutton>Server</guibutton> selection offers the same servers as can be 1463 used in the import functions. <guilabel>Standard Tags</guilabel>, 1464 <guilabel>Additional Tags</guilabel>, <guilabel>Cover Art</guilabel> 1465 determine the information which shall be fetched from the server. Finally, 1466 <guilabel>Accuracy</guilabel> is the minimum accuracy which must be 1467 achieved to accept the imported data. If the accuracy is insufficient, the 1468 next server in the list will be tried. The same dialog containing the server 1469 properties appears when <guibutton>Add</guibutton> is clicked to add a new 1470 server entry. Existing entries can be deleted using 1471 <guibutton>Remove</guibutton>. 1472 </para> 1473 <para> 1474 To launch an automatic batch import with the selected profile, click 1475 <guibutton>Start</guibutton>. Details about the running import are displayed 1476 at the top of the dialog. The process can be aborted with the 1477 <guibutton>Abort</guibutton> button. 1478 </para> 1479 <para> 1480 </para></listitem> 1481 </varlistentry> 1482 1483 <varlistentry id="browse_pictures"> 1484 <term><menuchoice> 1485 <guimenu>File</guimenu> 1486 <guimenuitem>Browse Cover Art...</guimenuitem> 1487 </menuchoice></term> 1488 <listitem><para> 1489 The <action>Browse Cover Art</action> dialog helps to find album cover 1490 art. <guilabel>Artist/Album</guilabel> is filled from the tags if 1491 possible. <guilabel>Source</guilabel> offers a variety of websites with album 1492 cover art. The &URL; with artist and album as parameters can be found beneath 1493 the name. &URL;-encoded values for artist and album can be inserted using 1494 "<userinput>%u{artist}</userinput>" and "<userinput>%u{album}</userinput>", 1495 other values from the tags are possible too, as described in 1496 <link linkend="configure-kid3">Configure &kid3;</link>, <guilabel>User 1497 Actions</guilabel>. More sources can be entered after the entry "Custom 1498 Source" by replacing "Custom Source" with the source's name, pressing <keycap>Enter</keycap>, 1499 then inserting the &URL; and finally pressing <guibutton>Save 1500 Settings</guibutton>. The resulting browser command is displayed at the top of 1501 the dialog and can be started by clicking <guibutton>Browse</guibutton>. The 1502 browser, which can be configured in the settings, is started with the selected 1503 source. A cover image can then be dragged from the browser into the &kid3; 1504 window and will be set in the picture frame of the selected files. 1505 </para> 1506 <para> 1507 Because not all browsers support drag and drop of images and the pictures on 1508 websites often have a &URL;, in such cases &kid3; will receive the &URL; and not 1509 the picture. If the &URL; points to a picture, it will be downloaded. However, 1510 if the &URL; refers to some other web resource, it has to be translated to the 1511 corresponding picture. Such mappings are defined in the table <guilabel>&URL; 1512 extraction</guilabel>. The left column <guilabel>Match</guilabel> contains a 1513 regular expression which is compared with the &URL;. If it matches, the captured 1514 expressions in parentheses are inserted into the pattern of the 1515 right <guilabel>Picture &URL;</guilabel> column (at the positions marked with \1 1516 <abbrev>etc.</abbrev>). The replaced regular expression contains the &URL; of the picture. By 1517 this means cover art can be imported from Amazon, Google Images, <abbrev>etc.</abbrev> using 1518 drag and drop. It is also possible to define your own mappings. 1519 </para> 1520 </listitem> 1521 </varlistentry> 1522 1523 <varlistentry id="export"> 1524 <term><menuchoice> 1525 <guimenu>File</guimenu> 1526 <guimenuitem>Export...</guimenuitem> 1527 </menuchoice></term> 1528 <listitem><para> 1529 The <action>Export Dialog</action> is used to store data from the tags in a 1530 file or the clipboard. The editor at the top shows a preview of the data to 1531 export. If the export data contain tabulator characters, the export is 1532 displayed in a table. The data will be generated from the tags 1533 in the current folder according to the configured format. 1534 </para> 1535 <para> 1536 The format settings are similar as in the Import dialog: The topmost field 1537 contains the title (<abbrev>e.g.</abbrev> "CSV unquoted"), followed by the header, which will 1538 be generated at the begin of the file. The track data follows; it is used for 1539 every track. Finally, the trailer can be used to generate some finishing 1540 text. 1541 </para> 1542 <para> 1543 The format fields do not contain regular expressions as in the Import dialog, 1544 but only output format expressions with special %-expressions, which will be 1545 replaced by values from the tags. The whole thing works like the file name 1546 format, and the same codes are used plus some additional codes. Not only the 1547 codes listed below but all tag frame names can be used. 1548 </para> 1549 1550 <itemizedlist> 1551 <listitem><para>%s %{title} Title (Song)</para></listitem> 1552 <listitem><para>%a %{artist} Artist</para></listitem> 1553 <listitem><para>%l %{album} Album</para></listitem> 1554 <listitem><para>%c %{comment} Comment</para></listitem> 1555 <listitem><para>%y %{year} Year</para></listitem> 1556 <listitem><para>%t %{track} Track (<abbrev>e.g.</abbrev> 01)</para></listitem> 1557 <listitem><para>%t %{track.n} Track with field width n (<abbrev>e.g.</abbrev> 001 for %{track.3})</para></listitem> 1558 <listitem><para>%T %{tracknumber} Track (without leading zeros, <abbrev>e.g.</abbrev> 1)</para></listitem> 1559 <listitem><para>%g %{genre} Genre</para></listitem> 1560 <listitem><para>%f %{file} File name</para></listitem> 1561 <listitem><para>%p %{filepath} Path</para></listitem> 1562 <listitem><para>%{modificationdate} Modification date</para></listitem> 1563 <listitem><para>%{creationdate} Creation date</para></listitem> 1564 <listitem><para>%u %{url} &URL;</para></listitem> 1565 <listitem><para>%{dirname} Folder name</para></listitem> 1566 <listitem><para>%d %{duration} Duration in minutes:seconds</para></listitem> 1567 <listitem><para>%D %{seconds} Duration in seconds</para></listitem> 1568 <listitem><para>%n %{tracks} Number of tracks of the album</para></listitem> 1569 <listitem><para>%e %{extension} File extension</para></listitem> 1570 <listitem><para>%O %{tag1} The format of tag 1 (ID3v1.1 or empty if not 1571 existing)</para></listitem> 1572 <listitem><para>%o %{tag2} The format of tag 2 (ID3v2.3.0, ID3v2.4.0, 1573 ID3v2.2.0, ID3v2.2.1, Vorbis, APE, MP4, ASF, or empty if not existing)</para></listitem> 1574 <listitem><para>%b %{bitrate} Bit rate in kbit/s</para></listitem> 1575 <listitem><para>%v %{vbr} VBR or empty (only for ID3v2.3 with 1576 id3lib)</para></listitem> 1577 <listitem><para>%r %{samplerate} Sample rate in Hz</para></listitem> 1578 <listitem><para>%m %{mode} Channel mode (Stereo or Joint Stereo)</para></listitem> 1579 <listitem><para>%h %{channels} Number of channels (1 or 2)</para></listitem> 1580 <listitem><para>%k %{codec} Codec (<abbrev>e.g.</abbrev> MPEG 1 Layer 3, MP4, Ogg Vorbis, FLAC, 1581 MPC, APE, ASF, AIFF, WAV)</para></listitem> 1582 </itemizedlist> 1583 1584 <para> 1585 A few formats are predefined. "CSV unquoted" separates the fields by 1586 tabs. Data in this format can be imported again into &kid3; using the import 1587 format with the same name. "CSV quoted" additionally encloses the fields by 1588 double quotes, which eases the import into spreadsheet applications. However, 1589 the fields shall not contain any double quotes when this format is used. 1590 "Extended M3U" and "Extended PLS" generate playlists with extended attributes 1591 and absolute path names. "HTML" can be used to generate an &HTML; page with 1592 hyperlinks to the tracks. "Kover &XML;" creates a file which can be imported by 1593 the cover printing program Kover. "Technical Details" provides information 1594 about bit rate, sample rate, channels, <abbrev>etc.</abbrev> Finally, "Custom Format" is left empty for 1595 definition of a custom format. You can define more formats of your own by 1596 adding lines in the file <filename>kid3rc</filename> in the configuration 1597 folder. The other formats can be adapted to your needs. 1598 </para> 1599 <para> 1600 The <guilabel>Source</guilabel> of the tags to generate the export data 1601 (<guilabel>Tag 1</guilabel> or <guilabel>Tag 2</guilabel>) can be selected 1602 with a combo box. Pushing <guibutton>To File</guibutton> or <guibutton>To 1603 Clipboard</guibutton> stores the data in a file or on the clipboard. 1604 <guibutton>OK</guibutton> and <guibutton>Cancel</guibutton> close the dialog, 1605 whereas <guibutton>OK</guibutton> accepts the current dialog settings. 1606 </para></listitem> 1607 </varlistentry> 1608 1609 <varlistentry id="create-playlist"> 1610 <term><menuchoice> 1611 <guimenu>File</guimenu> 1612 <guimenuitem>Create Playlist...</guimenuitem> 1613 </menuchoice></term> 1614 <listitem><para> 1615 <action>Creates a playlist.</action> The format and contents of the playlist 1616 can be set by various options.</para> 1617 <para> 1618 The name of the playlist can be the <guibutton>Same as folder name</guibutton> 1619 or use a <guibutton>Format</guibutton> with values from the tags, <abbrev>e.g.</abbrev> 1620 "<userinput>%{artist} - %{album}</userinput>" to have the artist and album 1621 name in the playlist file name. The format codes are the same as for 1622 <link linkend="export">Export</link>. 1623 The list of available formats can be edited in the <guilabel>Format</guilabel> 1624 section of the <guilabel>Files</guilabel> tab in the 1625 <link linkend="configure-kid3">settings</link>. 1626 <guibutton>Create new empty playlist</guibutton> will make an empty playlist 1627 with the given name. 1628 The extension depends on the playlist format. 1629 </para> 1630 <para> 1631 The location of the generated playlist is determined by the selection of 1632 the <guilabel>Create in</guilabel> combo box. 1633 <variablelist> 1634 <varlistentry><term>Current folder</term> 1635 <listitem><para>The playlist is created in the current folder and contains 1636 only files of the current folder. The current folder is the folder 1637 where the current file is located. If multiple files are selected, the current 1638 file is probably the last selected file.</para></listitem></varlistentry> 1639 <varlistentry><term>Every folder</term> 1640 <listitem><para>A playlist is created in every folder which contains 1641 listed files, and each playlist contains the files of that folder. 1642 </para></listitem></varlistentry> 1643 <varlistentry><term>Top-level folder</term> 1644 <listitem><para>Only one playlist is created in the top-level 1645 folder (<abbrev>i.e.</abbrev> the folder of the file list) and it contains the listed 1646 files of the top-level folder and all of its sub-folders. 1647 </para></listitem></varlistentry> 1648 </variablelist> 1649 </para> 1650 <para> 1651 The <guilabel>Format</guilabel> of the playlist can 1652 be <guilabel>M3U</guilabel>, <guilabel>PLS</guilabel> or 1653 <guilabel>XSPF</guilabel>. 1654 </para> 1655 <para> 1656 If <guibutton>Include only the selected files</guibutton> is checked, only the 1657 selected files will be included in the playlist. If a folder is selected, 1658 all of its files are selected. If this check box is not activated, all audio 1659 files are included in the playlist. 1660 </para> 1661 <para> 1662 <guibutton>Sort by file name</guibutton> selects the usual case where the 1663 files are ordered by file name. With <guibutton>Sort by tag field</guibutton>, 1664 it is possible to sort by a format string with values from tag fields. For 1665 instance, "<userinput>%{track.3}</userinput>" can be used to sort by track 1666 number (the "<userinput>.3</userinput>" is used to get three digits with 1667 leading zeros because strings are used for sorting). It is also possible to 1668 use multiple fields, <abbrev>e.g.</abbrev> "<userinput>%{genre}%{year}</userinput>" to sort 1669 using a string composed of genre and year. 1670 </para> 1671 <para> 1672 The playlist entries will have relative or absolute file paths depending on 1673 whether <guibutton>Use relative path for files in playlist</guibutton> or 1674 <guibutton>Use full path for files in playlist</guibutton> is set. 1675 </para> 1676 <para> 1677 When <guibutton>Write only list of files</guibutton> is set, the playlist 1678 will only contain the paths to the files. To generate an extended playlist 1679 with additional information, a format string can be set using 1680 the <guibutton>Write info using</guibutton> control. 1681 </para> 1682 </listitem> 1683 </varlistentry> 1684 1685 <varlistentry> 1686 <term><menuchoice> 1687 <shortcut> 1688 <keycombo>&Ctrl;<keycap>Q</keycap></keycombo> 1689 </shortcut> 1690 <guimenu>File</guimenu> 1691 <guimenuitem>Quit</guimenuitem> 1692 </menuchoice></term> 1693 <listitem><para><action>Quits the application.</action></para></listitem> 1694 </varlistentry> 1695 1696 </variablelist> 1697 </para> 1698 1699 </sect1> 1700 1701 <sect1 id="edit-menu"> 1702 <title>The Edit Menu</title> 1703 <para> 1704 <variablelist> 1705 1706 <varlistentry> 1707 <term><menuchoice> 1708 <shortcut> 1709 <keycombo>&Alt;<keycap>A</keycap></keycombo> 1710 </shortcut> 1711 <guimenu>Edit</guimenu> 1712 <guimenuitem>Select All</guimenuitem> 1713 </menuchoice></term> 1714 <listitem><para>Selects all files.</para></listitem> 1715 </varlistentry> 1716 1717 <varlistentry> 1718 <term><menuchoice> 1719 <shortcut> 1720 <keycombo>&Ctrl;<keycap>Shift</keycap><keycap>A</keycap></keycombo> 1721 </shortcut> 1722 <guimenu>Edit</guimenu> 1723 <guimenuitem>Deselect</guimenuitem> 1724 </menuchoice></term> 1725 <listitem><para>Deselects all files.</para></listitem> 1726 </varlistentry> 1727 1728 <varlistentry> 1729 <term><menuchoice> 1730 <guimenu>Edit</guimenu> 1731 <guimenuitem>Select All in Folder</guimenuitem> 1732 </menuchoice></term> 1733 <listitem><para>Selects all files of the current folder.</para></listitem> 1734 </varlistentry> 1735 1736 <varlistentry> 1737 <term><menuchoice> 1738 <shortcut> 1739 <keycombo>&Alt;<keycap>Up</keycap></keycombo> 1740 </shortcut> 1741 <guimenu>Edit</guimenu> 1742 <guimenuitem>Previous File</guimenuitem> 1743 </menuchoice></term> 1744 <listitem><para>Selects the previous file.</para></listitem> 1745 </varlistentry> 1746 1747 <varlistentry> 1748 <term><menuchoice> 1749 <shortcut> 1750 <keycombo>&Alt;<keycap>Down</keycap></keycombo> 1751 </shortcut> 1752 <guimenu>Edit</guimenu> 1753 <guimenuitem>Next File</guimenuitem> 1754 </menuchoice></term> 1755 <listitem><para>Selects the next file.</para></listitem> 1756 </varlistentry> 1757 1758 <varlistentry> 1759 <term><menuchoice> 1760 <shortcut> 1761 <keycombo>&Ctrl;<keycap>F</keycap></keycombo> 1762 </shortcut> 1763 <guimenu>Edit</guimenu> 1764 <guimenuitem>Find...</guimenuitem> 1765 </menuchoice></term> 1766 <listitem><para>Find strings in the file names and the tags. The 1767 <guilabel>Find</guilabel> dialog is a subset of the 1768 <guilabel>Replace</guilabel> dialog, which is described below. 1769 </para></listitem> 1770 </varlistentry> 1771 1772 <varlistentry id="find-replace"> 1773 <term><menuchoice> 1774 <shortcut> 1775 <keycombo>&Ctrl;<keycap>R</keycap></keycombo> 1776 </shortcut> 1777 <guimenu>Edit</guimenu> 1778 <guimenuitem>Replace...</guimenuitem> 1779 </menuchoice></term> 1780 <listitem><para>This function opens a dialog to find and replace strings in the 1781 file names and the tags. The set of frames where the search is performed can 1782 be restricted by deactivating the <guilabel>Select all</guilabel> check box and 1783 selecting the frames which shall be searched. There are also search options 1784 available to search backwards, case sensitively, and to use regular 1785 expressions.</para> 1786 <para>Depending on the number of files, the search might take some 1787 time, therefore it can be aborted by closing the dialog.</para></listitem> 1788 </varlistentry> 1789 1790 </variablelist> 1791 </para> 1792 </sect1> 1793 1794 <sect1 id="tools-menu"> 1795 <title>The Tools Menu</title> 1796 <para> 1797 <variablelist> 1798 1799 <varlistentry id="apply-filename-format"> 1800 <term><menuchoice> 1801 <guimenu>Tools</guimenu> 1802 <guimenuitem>Apply Filename Format</guimenuitem> 1803 </menuchoice></term> 1804 <listitem><para>When <guilabel>Automatically apply format</guilabel> is switched off 1805 for the filename format in the configuration dialog, this menu item can be used to <action>apply 1806 the configured format to the names of the selected files</action>. This can also be used 1807 to check whether the file names conform with the configured format 1808 by applying the format to all saved files and then checking if any files were 1809 changed (and therefore marked with a disk symbol in the file listbox). 1810 </para></listitem> 1811 </varlistentry> 1812 1813 <varlistentry id="apply-tag-format"> 1814 <term><menuchoice> 1815 <guimenu>Tools</guimenu> 1816 <guimenuitem>Apply Tag Format</guimenuitem> 1817 </menuchoice></term> 1818 <listitem><para>When <guilabel>Automatically apply format</guilabel> is switched off 1819 for the tag format in the configuration dialog, this menu item can be used to <action>apply 1820 the configured format to the tags of the selected files</action>. This can also be used 1821 to check whether the tags conform with the configured format 1822 by applying the format to all saved files and then checking if any files were 1823 changed (and therefore marked with a disk symbol in the file listbox). 1824 </para></listitem> 1825 </varlistentry> 1826 1827 <varlistentry id="apply-text-encoding"> 1828 <term><menuchoice> 1829 <guimenu>Tools</guimenu> 1830 <guimenuitem>Apply Text Encoding</guimenuitem> 1831 </menuchoice></term> 1832 <listitem><para>Sets the <guilabel>Text encoding</guilabel> selected in 1833 <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure &kid3;... 1834 </guimenuitem><guimenuitem>Tags section</guimenuitem><guimenuitem>Tag 2 1835 tab</guimenuitem></menuchoice> for all selected files. If UTF8 is selected, 1836 UTF16 will be used for ID3v2.3.0 tags because UTF8 is not supported for 1837 this format.</para></listitem> 1838 </varlistentry> 1839 1840 <varlistentry id="rename-directory"> 1841 <term><menuchoice> 1842 <guimenu>Tools</guimenu> 1843 <guimenuitem>Rename Folder...</guimenuitem> 1844 </menuchoice></term> 1845 <listitem><para>This dialog offers the possibility to automatically rename the 1846 currently open folder according to the tags in the files. Several formats 1847 are preconfigured to include information about artist, album and year in the 1848 folder name. It is also possible to set a custom format and 1849 <guibutton>Edit</guibutton> the list of available formats. The following 1850 special codes are used to insert tag values into the folder name: 1851 </para> 1852 1853 <itemizedlist> 1854 <listitem><para>%s %{title} Title (Song)</para></listitem> 1855 <listitem><para>%a %{artist} Artist</para></listitem> 1856 <listitem><para>%l %{album} Album</para></listitem> 1857 <listitem><para>%c %{comment} Comment</para></listitem> 1858 <listitem><para>%y %{year} Year</para></listitem> 1859 <listitem><para>%t %{track} Track (<abbrev>e.g.</abbrev> 01)</para></listitem> 1860 <listitem><para>%t %{track.n} Track with field width n (<abbrev>e.g.</abbrev> 001 for %{track.3})</para></listitem> 1861 <listitem><para>%T %{tracknumber} Track (without leading zeros, <abbrev>e.g.</abbrev> 1)</para></listitem> 1862 <listitem><para>%g %{genre} Genre</para></listitem> 1863 <listitem><para>%{dirname} Folder name (<abbrev>e.g.</abbrev> %{year" "}%{dirname} 1864 will prepend the year to the current folder name)</para></listitem> 1865 <listitem><para>%{max-year} The maximum year value found for this folder, 1866 can also be used with other codes than "year"</para></listitem> 1867 <listitem><para>%{min-year} The minimum year value found for this 1868 folder</para></listitem> 1869 <listitem><para>%{unq-year} The unique year value found for this folder or 1870 empty if not unique</para></listitem> 1871 </itemizedlist> 1872 1873 <para> 1874 If a folder separator "/" is found in the format, multiple folders are 1875 created. If you want to create a new folder instead of renaming the current 1876 folder, in the <guilabel>Action</guilabel> combo box select <guilabel>Create 1877 Folder</guilabel> instead of <guilabel>Rename Folder</guilabel>. The 1878 <guilabel>Source</guilabel> of the tag information can be chosen between 1879 <guilabel>Tag 1 and Tag 2</guilabel>, <guilabel>Tag 1</guilabel> and 1880 <guilabel>Tag 2</guilabel>. A preview for the rename operation performed on 1881 the first file can be seen in the <guilabel>From</guilabel> 1882 and <guilabel>To</guilabel> sections of the dialog. 1883 </para> 1884 <para> 1885 Multiple folders can be renamed by selecting them. 1886 </para></listitem> 1887 </varlistentry> 1888 1889 <varlistentry id="number-tracks"> 1890 <term><menuchoice> 1891 <guimenu>Tools</guimenu> 1892 <guimenuitem>Number Tracks...</guimenuitem> 1893 </menuchoice></term> 1894 <listitem><para> 1895 If the track numbers in the tags are not set or have the wrong values, this 1896 function can <action>number the tracks automatically in ascending 1897 order</action>. The start number can be set in the dialog. If only part of the 1898 tracks have to be numbered, they must be selected. 1899 </para><para> 1900 When <guilabel>Total number of tracks</guilabel> is checked, the number 1901 of tracks will also be set in the tags. 1902 </para><para> 1903 It is possible to number the tracks over multiple folders. The folders 1904 have to be expanded and selected. 1905 </para><para> 1906 If <guilabel>Reset counter for each folder</guilabel> is checked, track 1907 numbering is restarted with the given number for each folder when multiple 1908 folders are selected. 1909 </para><para> 1910 The number tracks dialog can also be used to format existing track numbers 1911 without changing the values when the check box left to <guilabel>Start 1912 number</guilabel> is deactivated. The total number of tracks will be added if 1913 the corresponding check box is active, which can be used to set the total for 1914 all selected tracks. If only formatting of the existing numbers is desired, 1915 this check box has to be deactivated too. 1916 </para></listitem> 1917 </varlistentry> 1918 1919 <varlistentry id="filter"> 1920 <term><menuchoice> 1921 <guimenu>Tools</guimenu> 1922 <guimenuitem>Filter...</guimenuitem> 1923 </menuchoice></term> 1924 <listitem> 1925 <para> 1926 The filter can be used to display only those files which match certain 1927 criteria. This is helpful if you want to organize a large collection and only 1928 edit those files which are not in the desired scheme. The expression defining 1929 which files to display uses the same format codes which are used in the file 1930 name format, import and export. 1931 </para> 1932 1933 <itemizedlist> 1934 <listitem><para>%s %{title} Title (Song)</para></listitem> 1935 <listitem><para>%a %{artist} Artist</para></listitem> 1936 <listitem><para>%l %{album} Album</para></listitem> 1937 <listitem><para>%c %{comment} Comment</para></listitem> 1938 <listitem><para>%y %{year} Year</para></listitem> 1939 <listitem><para>%t %{track} Track (<abbrev>e.g.</abbrev> 01)</para></listitem> 1940 <listitem><para>%t %{track.n} Track with field width n (<abbrev>e.g.</abbrev> 001 for %{track.3})</para></listitem> 1941 <listitem><para>%T %{tracknumber} Track (without leading zeros, <abbrev>e.g.</abbrev> 1)</para></listitem> 1942 <listitem><para>%g %{genre} Genre</para></listitem> 1943 <listitem><para>%f %{file} File name</para></listitem> 1944 <listitem><para>%p %{filepath} Absolute path to file</para></listitem> 1945 <listitem><para>%e %{extension} File extension</para></listitem> 1946 <listitem><para>%O %{tag1} The format of tag 1 (ID3v1.1 or empty if not 1947 existing)</para></listitem> 1948 <listitem><para>%o %{tag2} The format of tag 2 (ID3v2.3.0, ID3v2.4.0, 1949 ID3v2.2.0, ID3v2.2.1, Vorbis, APE, MP4, ASF, or empty if not existing)</para></listitem> 1950 <listitem><para>%b %{bitrate} Bit rate in kbit/s</para></listitem> 1951 <listitem><para>%v %{vbr} VBR or empty (only for ID3v2.3 with 1952 id3lib)</para></listitem> 1953 <listitem><para>%r %{samplerate} Sample rate in Hz</para></listitem> 1954 <listitem><para>%m %{mode} Channel mode (Stereo or Joint Stereo)</para></listitem> 1955 <listitem><para>%h %{channels} Number of channels (1 or 2)</para></listitem> 1956 <listitem><para>%k %{codec} Codec (<abbrev>e.g.</abbrev> MPEG 1 Layer 3, MP4, Ogg Vorbis, FLAC, 1957 MPC, APE, ASF, AIFF, WAV)</para></listitem> 1958 <listitem><para>%w %{marked} Marked, is 1 if the file is marked (<abbrev>e.g.</abbrev> because 1959 of truncation or standard violation), empty otherwise</para></listitem> 1960 <listitem><para>%1a %1{artist}, ... Use the prefix 1 to get values of tag 1</para></listitem> 1961 <listitem><para>%2a %2{artist}, ... Use the prefix 2 to get values of tag 2</para></listitem> 1962 </itemizedlist> 1963 1964 <para> 1965 These codes are replaced with the values for 1966 the file, and the resulting strings can be compared with the following 1967 operations: 1968 </para> 1969 <itemizedlist> 1970 <listitem><para>s1 equals s2: true if s1 and s2 are equal.</para></listitem> 1971 <listitem><para>s1 contains s2: true if s1 contains s2, <abbrev>i.e.</abbrev> s2 is a 1972 substring of s1.</para></listitem> 1973 <listitem><para>s matches re: true if s matches the regular expression re.</para></listitem> 1974 </itemizedlist> 1975 <para> 1976 True expressions are replaced by 1, false by 0. True values are represented by 1977 1, true, on and yes, false values by 0, false, off and no. Boolean operations 1978 are not, and, or (in this order of precedence) and can be grouped by parentheses. 1979 </para> 1980 <para> 1981 Some filter rules are predefined and can serve as examples for your own 1982 expressions: 1983 </para> 1984 1985 <variablelist> 1986 <varlistentry><term>All</term><listitem> 1987 <para> 1988 When the file list is filtered - this is shown by "[filtered]" in the 1989 window title - and all files shall be displayed again, 1990 the filtering can be reverted using this filter. It uses an empty expression, 1991 but a true value would have the same effect. 1992 </para> 1993 </listitem></varlistentry> 1994 1995 <varlistentry><term>Filename Tag Mismatch</term><listitem> 1996 <para><userinput> 1997 not (%{filepath} contains "%{artist} - %{album}/%{track} %{title}") 1998 </userinput></para> 1999 <para> 2000 Tests if the file path conforms with the file name format. This 2001 rule is automatically adapted if the file name format changes. 2002 </para> 2003 </listitem></varlistentry> 2004 2005 <varlistentry><term>No Tag 1</term><listitem> 2006 <para><userinput> 2007 %{tag1} equals "" 2008 </userinput></para> 2009 <para>Displays only files which do not have a tag 1.</para> 2010 </listitem></varlistentry> 2011 2012 <varlistentry><term>No Tag 2</term><listitem> 2013 <para><userinput> 2014 %{tag2} equals "" 2015 </userinput></para> 2016 <para>Displays only files which do not have a tag 2.</para> 2017 </listitem></varlistentry> 2018 2019 <varlistentry><term>ID3v2.3.0 Tag</term><listitem> 2020 <para><userinput> 2021 %{tag2} equals "ID3v2.3.0" 2022 </userinput></para> 2023 <para>Displays only files which have an ID3v2.3.0 tag.</para> 2024 </listitem></varlistentry> 2025 2026 <varlistentry><term>ID3v2.4.0 Tag</term><listitem> 2027 <para><userinput> 2028 %{tag2} equals "ID3v2.4.0" 2029 </userinput></para> 2030 <para>Displays only files which have an ID3v2.4.0 tag.</para> 2031 </listitem></varlistentry> 2032 2033 <varlistentry><term>Tag 1 != Tag 2</term><listitem> 2034 <para><userinput> 2035 not (%1{title} equals %2{title} and %1{album} equals %2{album} and %1{artist} 2036 equals %2{artist} and %1{comment} equals %2{comment} and %1{year} equals 2037 %2{year} and %1{track} equals %2{track} and %1{genre} equals %2{genre}) 2038 </userinput></para> 2039 <para>Displays files with differences between tag 1 and tag2.</para> 2040 </listitem></varlistentry> 2041 2042 <varlistentry><term>Tag 1 == Tag 2</term><listitem> 2043 <para><userinput> 2044 %1{title} equals %2{title} and %1{album} equals %2{album} and %1{artist} 2045 equals %2{artist} and %1{comment} equals %2{comment} and %1{year} equals 2046 %2{year} and %1{track} equals %2{track} and %1{genre} equals %2{genre} 2047 </userinput></para> 2048 <para>Displays files with identical tag 1 and tag 2.</para> 2049 </listitem></varlistentry> 2050 2051 <varlistentry><term>Incomplete</term><listitem> 2052 <para><userinput> 2053 %{title} equals "" or %{artist} equals "" or %{album} equals "" or %{year} equals "" or %{tracknumber} equals "" or %{genre} equals "" 2054 </userinput></para> 2055 <para>Displays files with empty values in the standard tags (title, artist, 2056 album, date, track number, genre).</para> 2057 </listitem></varlistentry> 2058 2059 <varlistentry><term>No Picture</term><listitem> 2060 <para><userinput> 2061 %{picture} equals "" 2062 </userinput></para> 2063 <para>Displays only files which do not have a picture.</para> 2064 </listitem></varlistentry> 2065 2066 <varlistentry><term>Marked</term><listitem> 2067 <para><userinput> 2068 not (%{marked} equals "") 2069 </userinput></para> 2070 <para>Displays only files which are marked because they violate the ID3 2071 standard, are truncated or the picture is too large.</para> 2072 </listitem></varlistentry> 2073 2074 <varlistentry><term>Custom Filter</term><listitem> 2075 <para> 2076 To add your own filter, select this entry. For instance, if you want 2077 to have a filter for artists starting with "The", replace "Custom Filter" 2078 with the name "The Bands" and press <keycap>Enter</keycap>. Then insert the following 2079 expression into the line edit: 2080 </para> 2081 <para><userinput> 2082 %{artist} matches "The.*" 2083 </userinput></para> 2084 <para> 2085 Then click <guibutton>Save 2086 Settings</guibutton>. Click <guibutton>Apply</guibutton> to filter the 2087 files. All files processed are displayed in the text view, with a "+" for 2088 those who match the filter and a "-" for the others. When finished, only the 2089 files with an artist starting with "The" are displayed, and the window title 2090 is marked with "[filtered]". 2091 </para> 2092 </listitem></varlistentry> 2093 2094 </variablelist> 2095 </listitem> 2096 </varlistentry> 2097 2098 <varlistentry id="convert-to-id3v24"> 2099 <term><menuchoice> 2100 <guimenu>Tools</guimenu> 2101 <guimenuitem>Convert ID3v2.3 to ID3v2.4</guimenuitem> 2102 </menuchoice></term> 2103 <listitem><para> 2104 If there are any ID3v2.3 tags in the selected files, they will 2105 be <action>converted to ID3v2.4</action> tags. Frames which are not supported 2106 by TagLib will be discarded. Only files without unsaved changes will be converted. 2107 </para></listitem> 2108 </varlistentry> 2109 2110 <varlistentry id="convert-to-id3v23"> 2111 <term><menuchoice> 2112 <guimenu>Tools</guimenu> 2113 <guimenuitem>Convert ID3v2.4 to ID3v2.3</guimenuitem> 2114 </menuchoice></term> 2115 <listitem><para> 2116 If there are any ID3v2.4 tags in the selected files, they will 2117 be <action>converted to ID3v2.3</action> tags. Only files without 2118 unsaved changes will be converted. 2119 </para></listitem> 2120 </varlistentry> 2121 2122 <varlistentry id="play"> 2123 <term><menuchoice> 2124 <guimenu>Tools</guimenu> 2125 <guimenuitem>Play</guimenuitem> 2126 </menuchoice></term> 2127 <listitem><para> 2128 This opens a simple toolbar to play audio files. It contains buttons for the 2129 basic operations (<guibutton>Play/Pause</guibutton>, 2130 <guibutton>Stop playback</guibutton>, <guibutton>Previous Track</guibutton>, 2131 <guibutton>Next Track</guibutton>, <guibutton>Close</guibutton>), 2132 sliders for position and volume and a display of the current position. 2133 If multiple files are selected, the selected tracks are played, else all 2134 files will be played. 2135 </para><para> 2136 The time displayed can be toggled between elapsed and remaining time by 2137 clicking on the display. 2138 </para></listitem> 2139 </varlistentry> 2140 2141 </variablelist> 2142 </para> 2143 </sect1> 2144 2145 <sect1 id="settings-menu"> 2146 <title>The Settings Menu</title> 2147 <para> 2148 <variablelist> 2149 2150 <varlistentry> 2151 <term><menuchoice> 2152 <guimenu>Settings</guimenu> 2153 <guimenuitem>Show Toolbar</guimenuitem> 2154 </menuchoice></term> 2155 <listitem><para><action>Toggles displaying of the toolbar.</action></para></listitem> 2156 </varlistentry> 2157 2158 <varlistentry> 2159 <term><menuchoice> 2160 <guimenu>Settings</guimenu> 2161 <guimenuitem>Show Statusbar</guimenuitem> 2162 </menuchoice></term> 2163 <listitem><para><action>Toggles displaying of the statusbar</action>, which displays 2164 longer actions such as opening or saving a folder.</para></listitem> 2165 </varlistentry> 2166 2167 <varlistentry> 2168 <term><menuchoice> 2169 <guimenu>Settings</guimenu> 2170 <guimenuitem>Show Picture</guimenuitem> 2171 </menuchoice></term> 2172 <listitem><para><action>Toggles displaying of the album cover art preview 2173 picture.</action> 2174 </para></listitem> 2175 </varlistentry> 2176 2177 <varlistentry> 2178 <term><menuchoice> 2179 <guimenu>Settings</guimenu> 2180 <guimenuitem>Auto Hide Tags</guimenuitem> 2181 </menuchoice></term> 2182 <listitem><para> 2183 Empty tags are automatically hidden if this option is active. 2184 The <guilabel>File</guilabel>, <guilabel>Tag 1</guilabel> 2185 and <guilabel>Tag 2</guilabel> sections can be manually collapsed and expanded 2186 by clicking on the corresponding 2187 <guibutton>-</guibutton>/<guibutton>+</guibutton> buttons. 2188 </para></listitem> 2189 </varlistentry> 2190 2191 <varlistentry id="configure-shortcuts"> 2192 <term><menuchoice> 2193 <guimenu>Settings</guimenu> 2194 <guimenuitem>Configure Shortcut keys...</guimenuitem> 2195 </menuchoice></term> 2196 <listitem><para>Opens a dialog to assign keyboard shortcuts for most of the 2197 program functions. There are even functions without corresponding menu or 2198 button available, <abbrev>e.g.</abbrev> next file, previous file, select all. 2199 </para> 2200 <para> 2201 </para> 2202 </listitem> 2203 </varlistentry> 2204 2205 <varlistentry id="configure-kid3"> 2206 <term><menuchoice> 2207 <guimenu>Settings</guimenu> 2208 <guimenuitem>Configure &kid3;...</guimenuitem> 2209 </menuchoice></term> 2210 <listitem><para>Opens the <action>configuration dialog</action>, which 2211 consists of pages for tags, files, user actions, and network settings. 2212 </para> 2213 <para> 2214 Tag specific options can be found on the <guilabel>Tags</guilabel> page, 2215 which is itself separated into four tabs 2216 for <guilabel>Tag 1</guilabel>, <guilabel>Tag 2</guilabel>, <guilabel>Tag 2217 3</guilabel>, and <guilabel>All Tags</guilabel>. 2218 </para> 2219 <para> 2220 If <guilabel>Mark truncated fields</guilabel> is checked, truncated ID3v1.1 2221 fields will be marked red. The text fields of ID3v1.1 tags can only have 30 2222 characters, the comment only 28 characters. Also the genre and track numbers 2223 are restricted, so that fields can be truncated when imported or transferred 2224 from ID3v2. Truncated fields and the file will be marked red, and the mark 2225 will be removed after the field has been edited. 2226 </para> 2227 <para> 2228 With <guilabel>Text encoding</guilabel> for <guilabel>ID3v1</guilabel> it is 2229 possible to set the character set used in ID3v1 tags. This encoding is 2230 supposed to be ISO-8859-1, so it is recommended to keep this default 2231 value. However, there are tags around with different encoding, so it can be 2232 set here and the ID3v1 tags can then be copied to ID3v2 which supports Unicode. 2233 </para> 2234 <para> 2235 The check box <guilabel>Use track/total number of tracks 2236 format</guilabel> controls whether the track number field of ID3v2 tags 2237 contains simply the track number or additionally the total number of tracks in 2238 the folder. 2239 </para> 2240 <para> 2241 When <guilabel>Genre as text instead of numeric string</guilabel> is checked, 2242 all ID3v2 genres will be stored as a text string even if there is a 2243 corresponding code for ID3v1 genres. If this option is not set, genres for which 2244 an ID3v1 code exists are stored as the number of the genre code (in 2245 parentheses for ID3v2.3). Thus the genre Metal is stored as "Metal" or "(9)" 2246 depending on this option. Genres which are not in the list of ID3v1 genres are 2247 always stored as a text string. The purpose of this option is improved 2248 compatibility with devices which do not correctly interpret genre codes. 2249 </para> 2250 <para> 2251 When <guilabel>WAV files with lowercase id3 chunk</guilabel> is checked, the 2252 RIFF chunk used to store ID3v2 tags in WAV files will be named "id3 " instead 2253 of "ID3 ". By default, &kid3; and other applications using TagLib accept both 2254 the lowercase and the uppercase variant when reading WAV files, but they use 2255 "ID3 " when writing ID3v2 tags to WAV files. As there exist other applications 2256 which only accept "id3 " (<abbrev>e.g.</abbrev> JRiver Media Center and foobar2000), this 2257 option can be used to create tags which can be read by such applications. 2258 </para> 2259 <para> 2260 When <guilabel>Mark standard violations</guilabel> is checked, ID3v2 fields 2261 which violate the standard will be marked red. Details about the violation are 2262 shown in a tooltip: 2263 </para> 2264 <itemizedlist> 2265 <listitem><para>Must be unique</para></listitem> 2266 <listitem><para>New line is forbidden</para></listitem> 2267 <listitem><para>Carriage return is forbidden</para></listitem> 2268 <listitem><para>Owner must be non-empty</para></listitem> 2269 <listitem><para>Must be numeric</para></listitem> 2270 <listitem><para>Must be numeric or number/total</para></listitem> 2271 <listitem><para>Format is DDMM</para></listitem> 2272 <listitem><para>Format is HHMM</para></listitem> 2273 <listitem><para>Format is YYYY</para></listitem> 2274 <listitem><para>Must begin with a year and a space character</para></listitem> 2275 <listitem><para>Must be ISO 8601 date/time</para></listitem> 2276 <listitem><para>Must be musical key, 3 characters, A-G, b, #, m, o</para></listitem> 2277 <listitem><para>Must have ISO 639-2 language code, 3 lowercase characters</para></listitem> 2278 <listitem><para>Must be ISRC code, 12 characters</para></listitem> 2279 <listitem><para>Must be list of strings separated by '|'</para></listitem> 2280 <listitem><para>Has excess white space</para></listitem> 2281 </itemizedlist> 2282 <para> 2283 The ID3 standard documents are available online: 2284 </para> 2285 <itemizedlist> 2286 <listitem><para><ulink url="http://id3.org/id3v2.3.0">ID3 tag version 2.3.0</ulink></para></listitem> 2287 <listitem><para><ulink url="http://id3.org/id3v2.4.0-structure">ID3 tag version 2.4.0 - Main Structure</ulink></para></listitem> 2288 <listitem><para><ulink url="http://id3.org/id3v2.4.0-frames">ID3 tag version 2.4.0 - Native Frames</ulink></para></listitem> 2289 </itemizedlist> 2290 <para> 2291 <guilabel>Text encoding</guilabel> defines the default encoding used for ID3v2 2292 frames and can be set 2293 to <guilabel>ISO-8859-1</guilabel>, <guilabel>UTF16</guilabel>, 2294 or <guilabel>UTF8</guilabel>. <guilabel>UTF8</guilabel> is not valid for 2295 ID3v2.3.0 frames; if it is set, <guilabel>UTF16</guilabel> will be used 2296 instead. For ID3v2.4.0 frames, all three encodings are possible. 2297 </para> 2298 <para> 2299 <guilabel>Version used for new tags</guilabel> determines whether new ID3v2 2300 tags are created as version 2.3.0 or 2.4.0. 2301 </para> 2302 <para> 2303 <guilabel>Track number digits</guilabel> is the number of digits in Track 2304 Number fields. Leading zeros are used to pad. For instance, with a value of 2 2305 the track number 5 is set as "05". 2306 </para> 2307 <para> 2308 The combo box <guilabel>Comment field name</guilabel> is only 2309 relevant for Ogg/Vorbis and FLAC files and sets the name of the field used for 2310 comments. Different applications seem to use different names, 2311 "<literal>COMMENT</literal>" for instance is used by <application>XMMS</application>, 2312 whereas &amarok; uses "<literal>DESCRIPTION</literal>". 2313 </para> 2314 <para> 2315 The format of pictures in Ogg/Vorbis files is determined by 2316 <guilabel>Picture field name</guilabel>, which can be 2317 "<literal>METADATA_BLOCK_PICTURE</literal>" or "<literal>COVERART</literal>". 2318 The first is the official standard and uses the same format as pictures in FLAC 2319 tags. "<literal>COVERART</literal>" is an earlier unofficial way to include 2320 pictures in Vorbis comments. It can be used for compatibility with legacy players. 2321 </para> 2322 <para> 2323 If the <guilabel>Mark if larger than (bytes)</guilabel> check box is activated, 2324 files containing embedded album cover art exceeding the given size in bytes 2325 are marked red. This can be used to find files containing oversized pictures 2326 which are not accepted by some applications and players. The default value is 2327 131072 bytes (128 KB). 2328 </para> 2329 <para> 2330 <guilabel>Custom Genres</guilabel> can be used to define genres which are not 2331 available in the standard genre list, <abbrev>e.g.</abbrev> "Gothic Metal". Such custom genres 2332 will appear in the <guilabel>Genre</guilabel> combo box of 2333 <guilabel>Tag 2</guilabel>. For ID3v1.1 tags, only the predefined genres can 2334 be used. 2335 </para> 2336 <para> 2337 The list of custom genres can also be used to reduce the number of genres 2338 available in the <guilabel>Genre</guilabel> combo box to those typically used. 2339 If your collection mostly contains music in the genres Metal, Gothic Metal, 2340 Ancient and Hard Rock, you can enter those genres and mark 2341 <guilabel>Show only custom genres</guilabel>. The <guilabel>Tag 2</guilabel> 2342 <guilabel>Genre</guilabel> combo box will then only contain those four genres 2343 and you will not have to search through the complete genres list for them. 2344 In this example, only Metal and Hard Rock will be listed in the tag 1 genres 2345 list, because those two custom genres entries are standard genres. 2346 If <guilabel>Show only custom genres</guilabel> is not active, the custom 2347 genres can be found at the end of the genres list. 2348 </para> 2349 <para> 2350 In <guilabel>Custom Frames</guilabel>, up to eight custom frame names can be 2351 defined, which can then be used like the unified frames, for example as 2352 quick access frames. 2353 </para> 2354 <para> 2355 <guilabel>Quick Access Frames</guilabel> defines which frame types are always 2356 shown in the <link linkend="tag2">Tag 2</link> section. Such frames can 2357 then be added without first using the <guibutton>Add</guibutton> button. 2358 The order of these quick access frames can be changed by dragging and dropping 2359 items. 2360 </para> 2361 <para> 2362 The combo box <guilabel>Track number field name</guilabel> is only 2363 relevant for RIFF INFO and sets the name of the field used for 2364 track numbers. Track numbers are not specified in the original RIFF standard, 2365 there are applications which use "<literal>ITRK</literal>", others use 2366 "<literal>IPRT</literal>". 2367 </para> 2368 <para> 2369 <guilabel>Tag Format</guilabel> contains options for the format of the tags. 2370 When <guilabel>Automatically apply format</guilabel> is checked, the format 2371 configuration is automatically used while editing text in the line edits. 2372 <guilabel>Validation</guilabel> enables validators in the controls with 2373 track/total and date/time values. 2374 The <guilabel>Case conversion</guilabel> can be set to <guilabel>No 2375 changes</guilabel>, <guilabel>All lowercase</guilabel>, <guilabel>All 2376 uppercase</guilabel>, <guilabel>First letter uppercase</guilabel> or 2377 <guilabel>All first letters uppercase</guilabel>. To use locale-aware 2378 conversion between lowercase and uppercase characters, a locale can be 2379 selected in the combobox below. 2380 The string replacement list can be set to arbitrary string mappings. To add a 2381 new mapping, select the <guilabel>From</guilabel> cell of a row and insert the 2382 text to replace, then go to the <guilabel>To</guilabel> column and enter the 2383 replacement text. When the text to replace starts and ends with a slash ("/"), 2384 a regular expression is used. For regular expressions containing capturing 2385 groups, occurrences of \1, \2, ... in <guilabel>To</guilabel> are replaced 2386 with the string captured by the corresponding capturing group. 2387 To remove a mapping set the <guilabel>From</guilabel> cell 2388 to an empty value (<abbrev>e.g.</abbrev> by first typing space and then backspace). Inserting 2389 and deleting rows is also possible using a context menu which appears when the 2390 <mousebutton>right</mousebutton> mouse button is clicked. Replacement is only active, if the <guilabel>String 2391 replacement</guilabel> check box is checked. 2392 </para> 2393 2394 <para> 2395 The table in <guilabel>Rating</guilabel> contains the mapping of star ratings 2396 to the effective values stored in the tag. The frames with rating information 2397 are listed in the Rating row of the 2398 <!--change manpageframe list.--><link linkend="table-frame-list">frame list</link>. 2399 For these frames, the rating can be set by giving a number of 2400 stars out of five stars. Different tag formats and different applications use 2401 different values to map the star rating to the value stored in the tag. In 2402 order to display the correct number of stars, &kid3; will look up a map in 2403 this table. The key to look up the mapping is the frame name, for example 2404 "RATING" as used for Vorbis comments or "IRTD" for RIFF INFO. For ID3v2 tags, 2405 a combined key is used consisting of the frame ID "POPM" of the Popularimeter 2406 frame and its "Email" field, separated by a dot. Therefore, different keys for 2407 ID3v2 exist, <abbrev>e.g.</abbrev> "POPM.Windows Media Player 9 Series" for the mapping used by 2408 Windows Media Player and Explorer, and simply "POPM" for POPM frames with an 2409 empty "Email" field. As multiple entries for "POPM" can exist, their order is 2410 important. When &kid3; adds a new Popularimeter frame, it will use the first 2411 "POPM" entry to determine the value to be written into the "Email" field. This 2412 value will then specify the mapping to be used for star ratings. The first 2413 entry is also used if no key was found, it is therefore the default entry. 2414 </para> 2415 <para> 2416 Besides the <guilabel>Name</guilabel> column containing the keys, the table 2417 has columns <guilabel>1</guilabel> to <guilabel>5</guilabel> for the values to 2418 be stored when the corresponding number of stars is given. The other way 2419 round, the values determine the number of stars which are displayed for the 2420 value stored in the frame. For instance, the row in the table below contains 2421 the values 1, 64, 128, 196, 255. The thresholds for the number of stars to be 2422 displayed lay between these values and are compatible with what the &Windows; 2423 Explorer uses. 2424 </para> 2425 2426 <table id="table-rating"> 2427 <title>Entry in Rating Table</title> 2428 <tgroup cols="6"> 2429 <thead> 2430 <row><entry>Name</entry><entry>1</entry> <entry>2</entry> <entry>3</entry> <entry>4</entry> <entry>5</entry></row> 2431 </thead> 2432 <tbody> 2433 <row><entry>POPM</entry><entry>1</entry><entry>64</entry><entry>128</entry><entry>196</entry><entry>255</entry></row> 2434 <row><entry>Range</entry><entry>1-31</entry><entry>32-95</entry><entry>96-159</entry><entry>160-223</entry><entry>224-255</entry></row> 2435 </tbody> 2436 </tgroup> 2437 </table> 2438 2439 <para> 2440 On the page <guilabel>Files</guilabel> the check box <guilabel>Load 2441 last-opened files</guilabel> can be marked so that &kid3; will open and 2442 select the last selected file when it is started the next time. 2443 <guilabel>Preserve file timestamp</guilabel> can be checked to preserve 2444 the file modification time stamp. 2445 <guilabel>Filename for cover</guilabel> sets the name which is suggested 2446 when an embedded image is exported to a file. 2447 With <guilabel>Text encoding (Export, Playlist)</guilabel> the encoding used 2448 when writing files can be set. The default <guilabel>System</guilabel> can be 2449 changed for example if playlists have to be used on a different device. 2450 </para> 2451 <para> 2452 If <guilabel>Mark changes</guilabel> is active, changed fields are marked with 2453 a light gray label background. 2454 </para> 2455 <para> 2456 The section <guilabel>File List</guilabel> determines which files are 2457 displayed in the file list. A <guilabel>Filter</guilabel> can be used to 2458 restrict the items in this list to files with supported extensions. To 2459 explicitly specify which folders to display in the file list or exclude 2460 certain folders, the options <guilabel>Include folders</guilabel> and 2461 <guilabel>Exclude folders</guilabel> can be used. They can contain wildcard 2462 expressions, for instance <filename>*/Music/*</filename> to include only the 2463 <filename>Music</filename> folder, or <filename>*/iTunes/*</filename> to 2464 exclude the iTunes folder from the file list. If multiple such expressions 2465 have to be used, they can be separated by spaces or semicolons. 2466 </para> 2467 <para> 2468 The buttons <guibutton>Filename from tag</guibutton> and <guibutton>Tag from 2469 filename</guibutton> in section <guilabel>Format</guilabel> open dialogs to 2470 edit the formats which are available in the <guilabel>Format</guilabel> combo 2471 boxes (with arrows up and down), which can be found in the 2472 <link linkend="file">File</link> section of the main window. 2473 </para> 2474 <para> 2475 The <guibutton>Playlist</guibutton> button can be used to edit the file name 2476 formats available in the <link linkend="create-playlist">Create Playlist</link> 2477 dialog. 2478 </para> 2479 <para> 2480 <guilabel>Filename Format</guilabel> contains options for the format of the 2481 filenames. The same options as in <guilabel>Tag Format</guilabel> are available. 2482 </para> 2483 <para> 2484 Additionally, the <guilabel>Maximum length</guilabel> allowed for file names can 2485 be set. Most modern file systems have a limit of 255 characters, but if you want 2486 to burn the files to CD, you should set the limit to 64. 2487 If <guilabel>Use for playlist and folder names</guilabel> is checked, the 2488 file name format is also used when creating playlists and renaming folders. 2489 </para> 2490 <para> 2491 The <guilabel>User Actions</guilabel> page contains a table with the commands 2492 which are available in the context menu of the file list. For critical 2493 operations such as deleting files, it is advisable to mark 2494 <guilabel>Confirm</guilabel> to pop up a confirmation dialog before executing 2495 the command. 2496 <guilabel>Output</guilabel> can be marked to see the output written by console 2497 commands (standard output and standard error). <guilabel>Name</guilabel> is 2498 the name displayed in the context menu. <guilabel>Command</guilabel> is the 2499 command line to be executed. Arguments can be passed using the following 2500 codes: 2501 </para> 2502 2503 <itemizedlist> 2504 <listitem><para>%F %{files} File paths (a list if multiple files selected)</para></listitem> 2505 <listitem><para>%f %{file} File path to single file</para></listitem> 2506 <listitem><para>%uF %{urls} &URL;s (a list if multiple files selected)</para></listitem> 2507 <listitem><para>%uf %{url} &URL; to single file</para></listitem> 2508 <listitem><para>%d %{directory} Folder</para></listitem> 2509 <listitem><para>%s %{title} Title (Song)</para></listitem> 2510 <listitem><para>%a %{artist} Artist</para></listitem> 2511 <listitem><para>%l %{album} Album</para></listitem> 2512 <listitem><para>%c %{comment} Comment</para></listitem> 2513 <listitem><para>%y %{year} Year</para></listitem> 2514 <listitem><para>%t %{track} Track (<abbrev>e.g.</abbrev> 01)</para></listitem> 2515 <listitem><para>%t %{track.n} Track with field width n (<abbrev>e.g.</abbrev> 001 for %{track.3})</para></listitem> 2516 <listitem><para>%T %{tracknumber} Track (without leading zeros, <abbrev>e.g.</abbrev> 1)</para></listitem> 2517 <listitem><para>%g %{genre} Genre</para></listitem> 2518 <listitem><para>%b %{browser} Command to start the web browser</para></listitem> 2519 <listitem><para>%q %{qmlpath} Base folder of provided QML files</para></listitem> 2520 </itemizedlist> 2521 2522 <para> 2523 The special code <command>@separator</command> can be set as a command to 2524 insert a separator into the user actions context menu. Menu items can be put 2525 into a submenu by enclosing them with <command>@beginmenu</command> and 2526 <command>@endmenu</command> commands. The name of the submenu is determined by 2527 the <guilabel>Name</guilabel> column of the <command>@beginmenu</command> 2528 command. 2529 </para> 2530 2531 <para id="configure-user-actions-qml"> 2532 To execute QML scripts, <command>@qml</command> is used as a command name. The 2533 path to the QML script is passed as a parameter. The provided scripts can be 2534 found in the folder <filename>%{qmlpath}/script/</filename> (on 2535 &Linux; typically <filename>/usr/share/kid3/qml/script/</filename>, on 2536 Windows <filename>qml/script/</filename> inside the installation folder, 2537 and on &macOS; in the app folder 2538 <filename>kid3.app/Contents/Resources/qml/script/</filename>). Custom scripts 2539 can be stored in any folder. If the QML code uses &GUI; components, 2540 <command>@qmlview</command> shall be used instead of 2541 <command>@qml</command>. Additional parameters are passed to the QML script 2542 where they will be available via the <function>getArguments()</function> 2543 function. An overview of some functions and properties which are available in 2544 QML can be found in the appendix <link linkend="qml-interface">QML Interface</link>. 2545 </para> 2546 2547 <para> 2548 The command which will be inserted with %{browser} can be defined in the 2549 <guilabel>Web browser</guilabel> line edit above. Commands starting with %{browser} 2550 can be used to fetch information about the audio files from the web, 2551 for instance 2552 <screen width="40"> 2553 <userinput>%{browser} http://lyricwiki.org/%u{artist}:%u{title}</userinput> 2554 </screen> 2555 will query the lyrics for the current song in 2556 <ulink url="http://www.lyricwiki.org">LyricWiki</ulink>. The "u" in %u{artist} and %u{title} 2557 is used to &URL;-encode the artist %{artist} and song %{title} information. It is easy to 2558 define your own queries in the same way, <abbrev>e.g.</abbrev> an image search with 2559 <ulink url="http://www.google.com">Google</ulink>: 2560 <screen width="40"> 2561 <userinput>%{browser} http://images.google.com/images?q=%u{artist}%20%u{album}</userinput> 2562 </screen> 2563 </para> 2564 <para> 2565 To add album cover art to tag 2, you can search for images with Google or 2566 Amazon using the commands described above. The picture can be added to the tag 2567 with drag and drop. You can also add an image with <guibutton>Add</guibutton>, then select 2568 the Picture frame and import an image file or paste from the 2569 clipboard. Picture frames are supported for ID3v2, MP4, FLAC, Ogg and ASF tags. 2570 </para> 2571 <para> 2572 To add and delete entries in the table, a context menu can be 2573 used. 2574 </para> 2575 <para> 2576 The <guilabel>Network</guilabel> page contains only a field to insert the proxy 2577 address and optionally the port, separated by a colon. The proxy will be used 2578 when importing from an Internet server when the check box is checked. 2579 </para> 2580 <para> 2581 In the <guilabel>Plugins</guilabel> page, available plugins can be enabled or 2582 disabled. The plugins are separated into two sections. The <guilabel>Metadata 2583 Plugins & Priority</guilabel> list contains plugins which support audio 2584 file formats. The order of the plugins is important because they are tried from 2585 top to bottom. Some formats are supported by multiple plugins, so files will 2586 be opened with the first plugin supporting them. The 2587 <guilabel>TaglibMetadata</guilabel> supports most formats, if it is at the top 2588 of the list, it will open most of the files. If you want to use a different 2589 plugin for a file format, make sure that it is listed before the 2590 <guilabel>TaglibMetadata</guilabel> plugin. Details about the metadata plugin 2591 and why you may want to use them instead of TagLib are listed below. 2592 </para> 2593 <itemizedlist> 2594 <listitem><para><guilabel>Id3libMetadata</guilabel>: 2595 Uses <ulink url="http://id3lib.sourceforge.net">id3lib</ulink> for ID3v1.1 2596 and ID3v2.3 tags in MP3, MP2, AAC files. Supports a few more frame types 2597 than TagLib.</para></listitem> 2598 <listitem><para><guilabel>OggFlacMetadata</guilabel>: 2599 Uses <ulink url="http://xiph.org/ogg/">libogg</ulink>, 2600 <ulink url="http://xiph.org/vorbis/">libvorbis, libvorbisfile</ulink> for Ogg 2601 files, and additionally <ulink url="http://flac.sourceforge.net">libFLAC++ 2602 and libFLAC</ulink> for FLAC files. These are the official 2603 libraries for these formats.</para></listitem> 2604 <listitem><para><guilabel>TaglibMetadata</guilabel>: 2605 Uses <ulink url="http://taglib.github.io/">TagLib</ulink> which supports a 2606 lot of audio file formats. It can be used for all audio files supported by 2607 &kid3;.</para></listitem> 2608 <listitem><para><guilabel>Mp4v2Metadata</guilabel>: 2609 <ulink url="https://mp4v2.org/">mp4v2</ulink> was originally used 2610 by &kid3; to support M4A files. Can be used in case of problems with the M4A 2611 support of TagLib. 2612 </para></listitem> 2613 </itemizedlist> 2614 <para> 2615 The <guilabel>Available Plugins</guilabel> section lists the remaining 2616 plugins. Their order is not important, but they can be enabled or disabled 2617 using the check boxes. 2618 </para> 2619 <itemizedlist> 2620 <listitem><para><guilabel>AmazonImport</guilabel>: 2621 Used for the <guimenuitem>Import from Amazon...</guimenuitem> function. 2622 </para></listitem> 2623 <listitem><para><guilabel>DiscogsImport</guilabel>: 2624 Used for the <guimenuitem>Import from Discogs...</guimenuitem> function. 2625 </para></listitem> 2626 <listitem><para><guilabel>FreedbImport</guilabel>: 2627 Used for the <guimenuitem>Import from gnudb.org...</guimenuitem> 2628 function. 2629 </para></listitem> 2630 <listitem><para><guilabel>MusicBrainzImport</guilabel>: 2631 Used for the <guimenuitem>Import from MusicBrainz Release...</guimenuitem> 2632 function. 2633 </para></listitem> 2634 <listitem><para><guilabel>AcoustidImport</guilabel>: 2635 Used for the <guimenuitem>Import from MusicBrainz Fingerprint...</guimenuitem> 2636 function, which depends on 2637 the <ulink url="http://acoustid.org/chromaprint">Chromaprint</ulink> 2638 and <ulink url="http://libav.org/">libav</ulink> libraries. 2639 </para></listitem> 2640 </itemizedlist> 2641 <para> 2642 Plugins which are disabled will not be loaded. This can be used to optimize 2643 resource usage and startup time. The settings on this page take only effect 2644 after a restart of &kid3;. 2645 </para> 2646 </listitem> 2647 </varlistentry> 2648 2649 </variablelist> 2650 </para> 2651 2652 </sect1> 2653 2654 <sect1 id="help-menu"> 2655 <title>The Help Menu</title> 2656 <para> 2657 <variablelist> 2658 2659 <varlistentry> 2660 <term><menuchoice> 2661 <guimenu>Help</guimenu> 2662 <guimenuitem>&kid3; Handbook</guimenuitem> 2663 </menuchoice></term> 2664 <listitem><para><action>Opens this handbook.</action></para></listitem> 2665 </varlistentry> 2666 2667 <varlistentry> 2668 <term><menuchoice> 2669 <guimenu>Help</guimenu> 2670 <guimenuitem>About &kid3;</guimenuitem> 2671 </menuchoice></term> 2672 <listitem><para><action>Displays a short information about &kid3;. 2673 </action></para></listitem> 2674 </varlistentry> 2675 2676 2677 </variablelist> 2678 </para> 2679 2680 </sect1> 2681 2682 </chapter> 2683 2684 <chapter id="kid3-cli"> 2685 <title>kid3-cli</title> 2686 <sect1 id="kid3-cli-commands"> 2687 <title>Commands</title> 2688 <para> 2689 <command>kid3-cli</command> offers a command-line-interface for &kid3;. If a 2690 folder path is used, the folder is opened. If one or more file paths are 2691 given, the common folder is opened and the files are selected. Subsequent 2692 commands will then work on these files. Commands are specified using 2693 <option>-c</option> options. If multiple commands are passed, they are 2694 executed in the given order. If files are modified by the commands, they will 2695 be saved at the end. If no command options are passed, 2696 <command>kid3-cli</command> starts in interactive mode. Commands can be 2697 entered and will operate on the current selection. The following sections 2698 list all available commands. 2699 </para> 2700 2701 <sect2 id="cli-help"> 2702 <title>Help</title> 2703 <cmdsynopsis> 2704 <command>help</command> 2705 <arg><replaceable>COMMAND-NAME</replaceable></arg> 2706 </cmdsynopsis> 2707 <para>Displays help about the parameters of 2708 <replaceable>COMMAND-NAME</replaceable> or about all commands if no command 2709 name is given. 2710 </para> 2711 </sect2> 2712 2713 <sect2 id="cli-timeout"> 2714 <title>Timeout</title> 2715 <cmdsynopsis> 2716 <command>timeout</command> 2717 <group> 2718 <arg choice="plain">default</arg> 2719 <arg choice="plain">off</arg> 2720 <arg choice="plain"><replaceable>TIME</replaceable></arg> 2721 </group> 2722 </cmdsynopsis> 2723 <para>Overwrite the default command timeout. The CLI commands abort after a 2724 command specific timeout is expired. This timeout is 10 seconds for 2725 <command>ls</command> and <command>albumart</command>, 60 seconds for 2726 <command>autoimport</command> and <command>filter</command>, and 3 seconds for 2727 all other commands. If a huge number of files has to be processed, these 2728 timeouts may be too restrictive, thus the timeout for all commands can be set 2729 to <replaceable>TIME</replaceable> ms, switched off altogether or be left at 2730 the default values. 2731 </para> 2732 </sect2> 2733 2734 <sect2 id="cli-exit"> 2735 <title>Quit application</title> 2736 <cmdsynopsis> 2737 <command>exit</command> 2738 <arg>force</arg> 2739 </cmdsynopsis> 2740 <para>Exit application. If there are modified unsaved files, the <parameter 2741 class="command">force</parameter> parameter is required. 2742 </para> 2743 </sect2> 2744 2745 <sect2 id="cli-cd"> 2746 <title>Change folder</title> 2747 <cmdsynopsis> 2748 <command>cd</command> 2749 <arg><replaceable>FOLDER</replaceable></arg> 2750 </cmdsynopsis> 2751 <para>If no <replaceable>FOLDER</replaceable> is given, change to the home 2752 folder. If a folder is given, change into the folder. If one or more 2753 file paths are given, change to their common folder and select the files. 2754 </para> 2755 </sect2> 2756 2757 <sect2 id="cli-pwd"> 2758 <title>Print the filename of the current folder</title> 2759 <cmdsynopsis> 2760 <command>pwd</command> 2761 </cmdsynopsis> 2762 <para>Print the filename of the current working folder.</para> 2763 </sect2> 2764 2765 <sect2 id="cli-ls"> 2766 <title>Folder list</title> 2767 <cmdsynopsis> 2768 <command>ls</command> 2769 </cmdsynopsis> 2770 <para>List the contents of the current folder. This corresponds to the file 2771 list in the &kid3; &GUI;. Five characters before the file names show the state 2772 of the file. 2773 </para> 2774 2775 <itemizedlist> 2776 <listitem><para><computeroutput>></computeroutput> File is selected. 2777 </para></listitem> 2778 <listitem><para><computeroutput>*</computeroutput> File is modified. 2779 </para></listitem> 2780 <listitem><para><computeroutput>1</computeroutput> File has a tag 1, 2781 otherwise '<computeroutput>-</computeroutput>' is displayed.</para></listitem> 2782 <listitem><para><computeroutput>2</computeroutput> File has a tag 2, 2783 otherwise '<computeroutput>-</computeroutput>' is displayed.</para></listitem> 2784 <listitem><para><computeroutput>3</computeroutput> File has a tag 3, 2785 otherwise '<computeroutput>-</computeroutput>' is displayed.</para></listitem> 2786 </itemizedlist> 2787 2788 <screen width="65"><prompt>kid3-cli> </prompt><userinput>ls</userinput><computeroutput> 2789 1-- 01 Intro.mp3 2790 > 12- 02 We Only Got This One.mp3 2791 *1-- 03 Outro.mp3</computeroutput></screen> 2792 2793 <para>In this example, all files have a tag 1, the second file also has a tag 2794 2 and it is selected. The third file is modified. 2795 </para> 2796 </sect2> 2797 2798 <sect2 id="cli-save"> 2799 <title>Save the changed files</title> 2800 <cmdsynopsis> 2801 <command>save</command> 2802 </cmdsynopsis> 2803 <para> 2804 </para> 2805 </sect2> 2806 2807 <sect2 id="cli-select"> 2808 <title>Select file</title> 2809 <cmdsynopsis> 2810 <command>select</command> 2811 <group> 2812 <arg choice="plain">all</arg> 2813 <arg choice="plain">none</arg> 2814 <arg choice="plain">first</arg> 2815 <arg choice="plain">previous</arg> 2816 <arg choice="plain">next</arg> 2817 <arg choice="plain" rep="repeat"><replaceable>FILE</replaceable></arg> 2818 </group> 2819 </cmdsynopsis> 2820 <para>To select all files, enter <userinput>select all</userinput>, to 2821 deselect all files, enter <userinput>select none</userinput>. To traverse the 2822 files in the current folder start with <userinput>select first</userinput>, 2823 then go forward using <userinput>select next</userinput> or backward using 2824 <userinput>select previous</userinput>. Specific files can be added to the 2825 current selection by giving their file names. Wildcards are possible, so 2826 <userinput>select *.mp3</userinput> will select all MP3 files in the current 2827 folder. 2828 </para> 2829 2830 <screen width="65"><prompt>kid3-cli> </prompt><userinput>select first</userinput> 2831 <prompt>kid3-cli> </prompt><userinput>ls</userinput><computeroutput> 2832 > 1-- 01 Intro.mp3 2833 12- 02 We Only Got This One.mp3 2834 *1-- 03 Outro.mp3</computeroutput> 2835 <prompt>kid3-cli> </prompt><userinput>select next</userinput> 2836 <prompt>kid3-cli> </prompt><userinput>ls</userinput><computeroutput> 2837 1-- 01 Intro.mp3 2838 > 12- 02 We Only Got This One.mp3 2839 *1-- 03 Outro.mp3</computeroutput> 2840 <prompt>kid3-cli> </prompt><userinput>select *.mp3</userinput> 2841 <prompt>kid3-cli> </prompt><userinput>ls</userinput><computeroutput> 2842 > 1-- 01 Intro.mp3 2843 > 12- 02 We Only Got This One.mp3 2844 >*1-- 03 Outro.mp3</computeroutput></screen> 2845 </sect2> 2846 2847 <sect2 id="cli-tag"> 2848 <title>Select tag</title> 2849 <cmdsynopsis> 2850 <command>tag</command> 2851 <arg><replaceable>TAG-NUMBERS</replaceable></arg> 2852 </cmdsynopsis> 2853 <para>Many commands have an optional <replaceable>TAG-NUMBERS</replaceable> 2854 parameter, which specifies whether the command operates on tag 1, 2, or 3. If 2855 this parameter is omitted, the default tag numbers are used, which can be set 2856 by this command. At startup, it is set to <literal>12</literal> which means 2857 that information is read from tag 2 if available, else from tag 1; 2858 modifications are done on tag 2. The 2859 <option><replaceable>TAG-NUMBERS</replaceable></option> can be set to 2860 <userinput>1</userinput>, <userinput>2</userinput>, or 2861 <userinput>3</userinput> to operate only on the 2862 corresponding tag. If the parameter is omitted, the current setting is 2863 displayed. 2864 </para> 2865 </sect2> 2866 2867 <sect2 id="cli-get"> 2868 <title>Get tag frame</title> 2869 <cmdsynopsis> 2870 <command>get</command> 2871 <group> 2872 <arg choice="plain">all</arg> 2873 <arg choice="plain"><replaceable>FRAME-NAME</replaceable></arg> 2874 </group> 2875 <arg><replaceable>TAG-NUMBERS</replaceable></arg> 2876 </cmdsynopsis> 2877 <para>This command can be used to read the value of a specific tag frame or 2878 get information about all tag frames (if the argument is omitted or 2879 <option>all</option> is used). Modified frames are marked with a 2880 '<computeroutput>*</computeroutput>'. 2881 </para> 2882 2883 <screen width="65"><prompt>kid3-cli> </prompt><userinput>get</userinput><computeroutput> 2884 File: MPEG 1 Layer 3 192 kbps 44100 Hz Joint Stereo 2885 Name: 01 Intro.mp3 2886 Tag 1: ID3v1.1 2887 Title Intro 2888 Artist One Hit Wonder 2889 Album Let's Tag 2890 Date 2013 2891 Track Number 1 2892 Genre Pop</computeroutput> 2893 <prompt>kid3-cli> </prompt><userinput>get title</userinput><computeroutput> 2894 Intro</computeroutput></screen> 2895 <para>To save the contents of a picture frame to a file, use 2896 <screen width="65"><userinput>get picture:'/path/to/folder.jpg'</userinput></screen> 2897 </para> 2898 <para>To save synchronized lyrics to an LRC file, use 2899 <screen width="65"><userinput>get SYLT:'/path/to/lyrics.lrc'</userinput></screen> 2900 </para> 2901 <para>It is possible to get only a specific field from a frame, for example 2902 <userinput>get POPM.Email</userinput> for the Email field of a Popularimeter 2903 frame. If a file has multiple frames of the same kind, the different frames 2904 can be indexed with brackets, for example the first performer from a Vorbis 2905 comment can be retrieved using <userinput>get performer[0]</userinput>, 2906 the second using <userinput>get performer[1]</userinput>. 2907 </para> 2908 <para> 2909 The pseudo field name "selected" can be used to check if a frame is selected, 2910 for example <userinput>get artist.selected</userinput> will return 2911 <computeroutput>1</computeroutput> if the artist frame is selected, else 2912 <computeroutput>0</computeroutput>. 2913 </para> 2914 <para> 2915 The pseudo frame name "ratingstars" can be used to get the value of the 2916 "rating" frame as the format specific value corresponding to the number of 2917 stars (0 to 5). When using "rating", the internal value is returned. 2918 </para> 2919 </sect2> 2920 2921 <sect2 id="cli-set"> 2922 <title>Set tag frame</title> 2923 <cmdsynopsis> 2924 <command>set</command> 2925 <arg choice="req"><replaceable>FRAME-NAME</replaceable></arg> 2926 <arg choice="req"><replaceable>FRAME-VALUE</replaceable></arg> 2927 <arg><replaceable>TAG-NUMBERS</replaceable></arg> 2928 </cmdsynopsis> 2929 <para>This command sets the value of a specific tag frame. 2930 If <replaceable>FRAME-VALUE</replaceable> is empty, the frame is deleted. 2931 </para> 2932 <screen width="65"><prompt>kid3-cli> </prompt><userinput>set remixer 'O.H. Wonder'</userinput></screen> 2933 <para>To set the contents of a picture frame from a file, use 2934 <screen width="65"><userinput>set picture:'/path/to/folder.jpg' 'Picture Description'</userinput></screen> 2935 </para> 2936 <para>To set synchronized lyrics from an LRC file, use 2937 <screen width="65"><userinput>set SYLT:'/path/to/lyrics.lrc' 'Lyrics Description'</userinput></screen> 2938 </para> 2939 <para> 2940 To set a specific field of a frame, the field name can be given after a dot, 2941 <abbrev>e.g.</abbrev> to set the Counter field of a Popularimeter frame, use 2942 <screen width="65"><userinput>set POPM.Counter 5</userinput></screen> 2943 </para> 2944 <para> 2945 An application for field specifications is the case where you want a custom 2946 TXXX frame with "rating" description instead of a standard Popularimeter frame 2947 (this seems to be used by some plugins). You can create such a TXXX rating 2948 frame with <command>kid3-cli</command>, however, you have to first create a 2949 TXXX frame with description "rating" and then set the value of this frame to 2950 the rating value. 2951 <screen width="65"> 2952 <prompt>kid3-cli> </prompt><userinput>set rating ""</userinput> 2953 <prompt>kid3-cli> </prompt><userinput>set TXXX.Description rating</userinput> 2954 <prompt>kid3-cli> </prompt><userinput>set rating 5</userinput> 2955 </screen> 2956 The first command will delete an existing POPM frame, because if such a frame 2957 exists, <userinput>set rating 5</userinput> would set the POPM frame and not 2958 the TXXX frame. Another possibility would be to use <userinput>set TXXX.Text 2959 5</userinput>, but this would only work if there is no other TXXX frame 2960 present. 2961 </para> 2962 <para> 2963 To set multiple frames of the same kind, an index can be given in brackets, 2964 <abbrev>e.g.</abbrev> to set multiple performers in a Vorbis comment, use 2965 <screen width="65"> 2966 <prompt>kid3-cli> </prompt><userinput>set performer[0] 'Liza don Getti (soprano)'</userinput> 2967 <prompt>kid3-cli> </prompt><userinput>set performer[1] 'Joe Barr (piano)'</userinput> 2968 </screen> 2969 </para> 2970 <para> 2971 To select certain frames before a copy, paste or remove action, the pseudo 2972 field name "selected" can be used. Normally, all frames are selected, to 2973 deselect all, use <userinput>set '*.selected' 0</userinput>, then for example 2974 <userinput>set artist.selected 1</userinput> to select the artist frame. 2975 </para> 2976 <para> 2977 The pseudo frame name "ratingstars" can be used to set the value of the 2978 "rating" frame to the format specific value corresponding to the number of 2979 stars (0 to 5). The frame name "rating" can be used to set the internal 2980 value. 2981 </para> 2982 <para> 2983 Setting "ratingstars" on multiple files having different tag formats will not 2984 work because the frame with the value mapped from the star count is created 2985 for the first file and then used for all files. So instead of 2986 <userinput>kid3-cli -c "set ratingstars 2" *</userinput> you should rather use 2987 <userinput>for f in *; do kid3-cli -c "set ratingstars 2" "$f"; done</userinput>. 2988 </para> 2989 </sect2> 2990 2991 <sect2 id="cli-revert"> 2992 <title>Revert</title> 2993 <cmdsynopsis> 2994 <command>revert</command> 2995 </cmdsynopsis> 2996 <para>Revert all modifications in the selected files (or all files if no files 2997 are selected). 2998 </para> 2999 </sect2> 3000 3001 <sect2 id="cli-import"> 3002 <title>Import from file</title> 3003 <cmdsynopsis> 3004 <command>import</command> 3005 <arg choice="req"><replaceable>FILE</replaceable></arg> 3006 <arg choice="req"><replaceable>FORMAT-NAME</replaceable></arg> 3007 <arg><replaceable>TAG-NUMBERS</replaceable></arg> 3008 </cmdsynopsis> 3009 <para>Tags are imported from the file <replaceable>FILE</replaceable> 3010 in the format with the name 3011 <replaceable>FORMAT-NAME</replaceable> (<abbrev>e.g.</abbrev> <userinput>"CSV 3012 unquoted"</userinput>, see <link linkend="import-text">Import</link>). 3013 </para> 3014 <para>If <userinput>tags</userinput> is given for 3015 <replaceable>FILE</replaceable>, tags are imported from other tags. Instead of 3016 <replaceable>FORMAT-NAME</replaceable> parameters 3017 <replaceable>SOURCE</replaceable> and <replaceable>EXTRACTION</replaceable> 3018 are required, see <link linkend="import-tags">Import from Tags</link>. 3019 To apply the import from tags on the selected files, use 3020 <userinput>tagsel</userinput> instead of <userinput>tags</userinput>. 3021 This function also supports output of the extracted value by using an 3022 <replaceable>EXTRACTION</replaceable> with the value 3023 <userinput>%{__return}(.+)</userinput>. 3024 </para> 3025 </sect2> 3026 3027 <sect2 id="cli-autoimport"> 3028 <title>Automatic import</title> 3029 <cmdsynopsis> 3030 <command>autoimport</command> 3031 <arg><replaceable>PROFILE-NAME</replaceable></arg> 3032 <arg><replaceable>TAG-NUMBERS</replaceable></arg> 3033 </cmdsynopsis> 3034 <para>Batch import using profile <replaceable>PROFILE-NAME</replaceable> (see 3035 <link linkend="batch-import">Automatic Import</link>, 3036 <userinput>"All"</userinput> is used if omitted). 3037 </para> 3038 </sect2> 3039 3040 <sect2 id="cli-albumart"> 3041 <title>Download album cover artwork</title> 3042 <cmdsynopsis> 3043 <command>albumart</command> 3044 <arg choice="req"><replaceable>URL</replaceable></arg> 3045 <arg>all</arg> 3046 </cmdsynopsis> 3047 <para>Set the album artwork by downloading a picture from 3048 <replaceable>URL</replaceable>. The rules defined in the <link 3049 linkend="browse_pictures">Browse Cover Art</link> dialog are used to transform 3050 general &URL;s (<abbrev>e.g.</abbrev> from Amazon) to a picture &URL;. To set the album cover from 3051 a local picture file, use the <link linkend="cli-set">set</link> command. 3052 </para> 3053 <screen width="65"><prompt>kid3-cli> </prompt><userinput>albumart 3054 http://www.amazon.com/Versus-World-Amon-Amarth/dp/B000078DOC</userinput></screen> 3055 </sect2> 3056 3057 <sect2 id="cli-export"> 3058 <title>Export to file</title> 3059 <cmdsynopsis> 3060 <command>export</command> 3061 <arg choice="req"><replaceable>FILE</replaceable></arg> 3062 <arg choice="req"><replaceable>FORMAT-NAME</replaceable></arg> 3063 <arg><replaceable>TAG-NUMBERS</replaceable></arg> 3064 </cmdsynopsis> 3065 <para>Tags are exported to file <replaceable>FILE</replaceable> 3066 in the format with the name 3067 <replaceable>FORMAT-NAME</replaceable> (<abbrev>e.g.</abbrev> <userinput>"CSV 3068 unquoted"</userinput>, see <link linkend="export">Export</link>). 3069 </para> 3070 </sect2> 3071 3072 <sect2 id="cli-playlist"> 3073 <title>Create playlist</title> 3074 <cmdsynopsis> 3075 <command>playlist</command> 3076 </cmdsynopsis> 3077 <para>Create playlist in the format set in the configuration, see <link 3078 linkend="create-playlist">Create Playlist</link>. 3079 </para> 3080 </sect2> 3081 3082 <sect2 id="cli-filenameformat"> 3083 <title>Apply filename format</title> 3084 <cmdsynopsis> 3085 <command>filenameformat</command> 3086 </cmdsynopsis> 3087 <para>Apply file name format set in the configuration, see <link linkend="apply-filename-format">Apply Filename Format</link>. 3088 </para> 3089 </sect2> 3090 3091 <sect2 id="cli-tagformat"> 3092 <title>Apply tag format</title> 3093 <cmdsynopsis> 3094 <command>tagformat</command> 3095 </cmdsynopsis> 3096 <para>Apply tag name format set in the configuration, see <link linkend="apply-tag-format">Apply Tag Format</link>. 3097 </para> 3098 </sect2> 3099 3100 <sect2 id="cli-textencoding"> 3101 <title>Apply text encoding</title> 3102 <cmdsynopsis> 3103 <command>textencoding</command> 3104 </cmdsynopsis> 3105 <para>Apply text encoding set in the configuration, see <link linkend="apply-text-encoding">Apply Text Encoding</link>. 3106 </para> 3107 </sect2> 3108 3109 <sect2 id="cli-renamedir"> 3110 <title>Rename folder</title> 3111 <cmdsynopsis> 3112 <command>renamedir</command> 3113 <arg><replaceable>FORMAT</replaceable></arg> 3114 <group> 3115 <arg choice="plain">create</arg> 3116 <arg choice="plain">rename</arg> 3117 <arg choice="plain">dryrun</arg> 3118 </group> 3119 <arg><replaceable>TAG-NUMBERS</replaceable></arg> 3120 </cmdsynopsis> 3121 <para>Rename or create folders from the values in the 3122 tags according to a given <replaceable>FORMAT</replaceable> 3123 (<abbrev>e.g.</abbrev> <userinput>%{artist} - %{album}</userinput>, see <link 3124 linkend="rename-directory">Rename Folder</link>), if no format is given, 3125 the format defined in the <guilabel>Rename folder</guilabel> dialog is 3126 used. The default mode is <option>rename</option>; to create folders, 3127 <option>create</option> must be given explicitly. The rename actions will be 3128 performed immediately, to just see what would be done, use the 3129 <option>dryrun</option> option. 3130 </para> 3131 </sect2> 3132 3133 <sect2 id="cli-numbertracks"> 3134 <title>Number tracks</title> 3135 <cmdsynopsis> 3136 <command>numbertracks</command> 3137 <arg><replaceable>TRACK-NUMBER</replaceable></arg> 3138 <arg><replaceable>TAG-NUMBERS</replaceable></arg> 3139 </cmdsynopsis> 3140 <para>Number the selected tracks starting with 3141 <replaceable>TRACK-NUMBER</replaceable> (<literal>1</literal> if omitted). 3142 </para> 3143 </sect2> 3144 3145 <sect2 id="cli-filter"> 3146 <title>Filter</title> 3147 <cmdsynopsis> 3148 <command>filter</command> 3149 <group> 3150 <arg choice="plain"><replaceable>FILTER-NAME</replaceable></arg> 3151 <arg choice="plain"><replaceable>FILTER-FORMAT</replaceable></arg> 3152 </group> 3153 </cmdsynopsis> 3154 <para>Filter the files so that only the files matching the 3155 <replaceable>FILTER-FORMAT</replaceable> are visible. The name of a predefined 3156 filter expression (<abbrev>e.g.</abbrev> <userinput>"Filename Tag Mismatch"</userinput>) can be 3157 used instead of a filter expression, see <link linkend="filter">Filter</link>. 3158 </para> 3159 3160 <screen width="65"><prompt>kid3-cli> </prompt><userinput>filter '%{title} contains "tro"'</userinput><computeroutput> 3161 Started 3162 /home/urs/One Hit Wonder - Let's Tag 3163 + 01 Intro.mp3 3164 - 02 We Only Got This One.mp3 3165 + 03 Outro.mp3 3166 Finished</computeroutput> 3167 <prompt>kid3-cli> </prompt><userinput>ls</userinput><computeroutput> 3168 1-- 01 Intro.mp3 3169 1-- 03 Outro.mp3</computeroutput> 3170 <prompt>kid3-cli> </prompt><userinput>filter All</userinput><computeroutput> 3171 Started 3172 /home/urs/One Hit Wonder - Let's Tag 3173 + 01 Intro.mp3 3174 + 02 We Only Got This One.mp3 3175 + 03 Outro.mp3 3176 Finished</computeroutput> 3177 <prompt>kid3-cli> </prompt><userinput>ls</userinput><computeroutput> 3178 1-- 01 Intro.mp3 3179 12- 02 We Only Got This One.mp3 3180 1-- 03 Outro.mp3</computeroutput></screen> 3181 </sect2> 3182 3183 <sect2 id="cli-to24"> 3184 <title>Convert ID3v2.3 to ID3v2.4</title> 3185 <cmdsynopsis> 3186 <command>to24</command> 3187 </cmdsynopsis> 3188 </sect2> 3189 3190 <sect2 id="cli-to23"> 3191 <title>Convert ID3v2.4 to ID3v2.3</title> 3192 <cmdsynopsis> 3193 <command>to23</command> 3194 </cmdsynopsis> 3195 </sect2> 3196 3197 <sect2 id="cli-fromtag"> 3198 <title>Filename from tag</title> 3199 <cmdsynopsis> 3200 <command>fromtag</command> 3201 <arg><replaceable>FORMAT</replaceable></arg> 3202 <arg><replaceable>TAG-NUMBERS</replaceable></arg> 3203 </cmdsynopsis> 3204 <para>Set the file names of the selected files from values in the tags, for 3205 example <userinput>fromtag '%{track} - %{title}' 1</userinput>. If no format 3206 is specified, the format set in the &GUI; is used. 3207 </para> 3208 </sect2> 3209 3210 <sect2 id="cli-totag"> 3211 <title>Tag from filename</title> 3212 <cmdsynopsis> 3213 <command>totag</command> 3214 <arg><replaceable>FORMAT</replaceable></arg> 3215 <arg><replaceable>TAG-NUMBERS</replaceable></arg> 3216 </cmdsynopsis> 3217 <para>Set the tag frames from the file names, for example <userinput>totag 3218 '%{albumartist} - %{album}/%{track} %{title}' 2</userinput>. If no format 3219 is specified, the format set in the &GUI; is used. If the format 3220 of the filename does not match this pattern, a few other commonly used formats 3221 are tried. 3222 </para> 3223 </sect2> 3224 3225 <sect2 id="cli-syncto"> 3226 <title>Tag to other tag</title> 3227 <cmdsynopsis> 3228 <command>syncto</command> 3229 <arg choice="req"><replaceable>TAG-NUMBER</replaceable></arg> 3230 </cmdsynopsis> 3231 <para>Copy the tag frames from one tag to the other tag, <abbrev>e.g.</abbrev> to set the ID3v2 3232 tag from the ID3v1 tag, use <userinput>syncto 2</userinput>. 3233 </para> 3234 </sect2> 3235 3236 <sect2 id="cli-copy"> 3237 <title>Copy</title> 3238 <cmdsynopsis> 3239 <command>copy</command> 3240 <arg><replaceable>TAG-NUMBER</replaceable></arg> 3241 </cmdsynopsis> 3242 <para>Copy the tag frames of the selected file to the internal copy 3243 buffer. They can then be set on another file using the 3244 <command>paste</command> command. 3245 </para> 3246 <para> 3247 To copy only a subset of the frames, use the "selected" pseudo field with the 3248 <command>set</command> command. For example, to copy only the disc number and 3249 copyright frames, use 3250 <screen width="65"> 3251 <userinput>set '*.selected' 0</userinput> 3252 <userinput>set discnumber.selected 1</userinput> 3253 <userinput>set copyright.selected 1</userinput> 3254 <userinput>copy</userinput> 3255 </screen> 3256 </para> 3257 </sect2> 3258 3259 <sect2 id="cli-paste"> 3260 <title>Paste</title> 3261 <cmdsynopsis> 3262 <command>paste</command> 3263 <arg><replaceable>TAG-NUMBER</replaceable></arg> 3264 </cmdsynopsis> 3265 <para>Set tag frames from the contents of the <command>copy</command> buffer 3266 in the selected files. 3267 </para> 3268 </sect2> 3269 3270 <sect2 id="cli-remove"> 3271 <title>Remove</title> 3272 <cmdsynopsis> 3273 <command>remove</command> 3274 <arg><replaceable>TAG-NUMBER</replaceable></arg> 3275 </cmdsynopsis> 3276 <para>Remove a tag. 3277 </para> 3278 <para>It is possible to remove only a subset of the frames by selecting them 3279 as described in the <link linkend="cli-copy"><command>copy</command> 3280 command</link>. 3281 </para> 3282 </sect2> 3283 3284 <sect2 id="cli-config"> 3285 <title>Configure Kid3</title> 3286 <cmdsynopsis> 3287 <command>config</command> 3288 <arg><replaceable>OPTION</replaceable></arg> 3289 <arg><replaceable>VALUE</replaceable></arg> 3290 </cmdsynopsis> 3291 <para>Query or set a configuration option. 3292 </para> 3293 <para>The <replaceable>OPTION</replaceable> consists of a group name and a 3294 property name separated by a dot. When no <replaceable>OPTION</replaceable> is 3295 given, all available groups are displayed. If only a group name is given, all 3296 available properties of the group are displayed. For a given group and property, 3297 the currently configured value is displayed. To change the setting, the new 3298 value can be passed as a second argument. 3299 </para> 3300 <para>If the value of a setting is a list, all list elements have to be given 3301 as arguments. This means that to append an element to an existing list of 3302 elements, all existing elements have to be passed followed by the new element. 3303 In such a situation, it is easier to use the JSON mode, where the current 3304 list can be copied with the new element appended. 3305 </para> 3306 </sect2> 3307 3308 <sect2 id="cli-execute"> 3309 <title>Execute program or QML script</title> 3310 <cmdsynopsis> 3311 <command>execute</command> 3312 <arg choice="opt">@qml</arg> 3313 <arg choice="req"><replaceable>FILE</replaceable></arg> 3314 <arg choice="opt"><replaceable>ARGS</replaceable></arg> 3315 </cmdsynopsis> 3316 <para>Execute a QML script or an executable. 3317 </para> 3318 <para> 3319 Without <option>@qml</option> a program is executed with arguments. 3320 When <option>@qml</option> is given as the first argument, the following 3321 arguments are the QML script and its arguments. For example, the tags 3322 of a folder can be exported to the file <filename>export.csv</filename> with 3323 the following command. 3324 </para> 3325 <screen width="65"><userinput>kid3-cli -c "execute @qml 3326 /usr/share/kid3/qml/script/ExportCsv.qml export.csv" 3327 /path/to/folder/</userinput></screen> 3328 <para> 3329 Here <option>export.csv</option> is the argument for the 3330 <filename>ExportCsv.qml</filename> script, whereas 3331 <option>/path/to/folder/</option> is the 3332 <option><replaceable>FILE</replaceable></option> argument for 3333 <command>kid3-cli</command>. 3334 </para> 3335 </sect2> 3336 3337 </sect1> 3338 3339 <sect1 id="kid3-cli-examples"> 3340 <title>Examples</title> 3341 <para>Set title containing an apostrophe. Commands passed to 3342 <command>kid3-cli</command> with <parameter>-c</parameter> 3343 have to be in quotes if they do not only consist of a single word. If such a 3344 command itself has an argument containing spaces, that argument has to be 3345 quoted too. In &UNIX; shells single or double quotes can be used, but on the 3346 Windows Command Prompt, it is important that the outer quoting is done using 3347 double quotes and inside these quotes, single quotes are used. If the text 3348 inside the single quotes contains a single quote, it has to be escaped using a 3349 backslash character, as shown in the following example:</para> 3350 <screen width="65"><userinput>kid3-cli -c "set title 'I\'ll be there for you'" /path/to/folder</userinput></screen> 3351 3352 <para>Set album cover in all files of a folder using the batch import 3353 function:</para> 3354 <screen width="65"><userinput>kid3-cli -c "autoimport 'Cover Art'" /path/to/folder</userinput></screen> 3355 3356 <para>Remove comment frames and apply the tag format in both tags of all MP3 3357 files of a folder:</para> 3358 <screen width="65"><userinput>kid3-cli -c "set comment '' 1" -c "set comment '' 2" \ 3359 -c "tagformat 1" -c "tagformat 2" /path/to/folder/*.mp3</userinput></screen> 3360 3361 <para>Automatically import tag 2, synchronize to tag 1, set file names from 3362 tag 2 and finally create a playlist:</para> 3363 <screen width="65"><userinput>kid3-cli -c autoimport -c "syncto 1" -c fromtag -c playlist \ 3364 /path/to/folder/*.mp3</userinput></screen> 3365 3366 <para>For all files with an ID3v2.4.0 tag, convert to ID3v2.3.0 and remove 3367 the arranger frame:</para> 3368 <screen width="65"><userinput>kid3-cli -c "filter 'ID3v2.4.0 Tag'" -c "select all" -c to23 \ 3369 -c "set arranger ''" /path/to/folder</userinput></screen> 3370 3371 <para>This Python script uses <command>kid3-cli</command> to generate iTunes 3372 Sound Check iTunNORM frames from replay gain information.</para> 3373 <programlisting> 3374 <![CDATA[ 3375 #!/usr/bin/env python3 3376 # Generate iTunes Sound Check from ReplayGain. 3377 import os, sys, subprocess 3378 3379 def rg2sc(dirpath): 3380 for root, dirs, files in os.walk(dirpath): 3381 for name in files: 3382 if name.endswith(('.mp3', '.m4a', '.aiff', '.aif')): 3383 fn = os.path.join(root, name) 3384 rg = subprocess.check_output([ 3385 'kid3-cli', '-c', 'get "replaygain_track_gain"', 3386 fn]).strip() 3387 if rg.endswith(b' dB'): 3388 rg = rg[:-3] 3389 try: 3390 rg = float(rg) 3391 except ValueError: 3392 print('Value %s of %s in not a float' % (rg, fn)) 3393 continue 3394 sc = (' ' + ('%08X' % int((10 ** (-rg / 10)) * 1000) )) * 10 3395 subprocess.call([ 3396 'kid3-cli', '-c', 'set iTunNORM "%s"' % sc, fn]) 3397 3398 if __name__ == '__main__': 3399 rg2sc(sys.argv[1]) 3400 ]]> 3401 </programlisting> 3402 </sect1> 3403 3404 <sect1 id="kid3-cli-json"> 3405 <title>&JSON; Format</title> 3406 <para> 3407 In order to make it easier to parse results from <command>kid3-cli</command>, 3408 it is possible to get the output in &JSON; format. When the request is in &JSON; 3409 format, the response will also be &JSON;. A compact format of the request will 3410 also give a compact representation of the response. If the request contains an 3411 "id" field, it is assumed to be a &JSON;-RPC request and the response will 3412 contain a "jsonrpc" field and the "id" of the request. The request format uses 3413 the same commands as the standard CLI, the "method" field contains the command 3414 and the parameters (if any) are given in the "params" list. The response 3415 contains a "result" object, which can also be null if the corresponding 3416 <command>kid3-cli</command> command does not return a result. In case of an 3417 error, an "error" object is returned with "code" and "message" fields as used 3418 in &JSON;-RPC. 3419 3420 <screen width="80"> 3421 <prompt>kid3-cli> </prompt><userinput>{"method":"set","params":["artist","An Artist"]}</userinput> 3422 <computeroutput>{"result":null}</computeroutput> 3423 <prompt>kid3-cli> </prompt><userinput>{"method":"get","params":["artist",2]}</userinput> 3424 <computeroutput>{"result":"An Artist"}</computeroutput> 3425 <prompt>kid3-cli> </prompt><userinput>{"method": "get", "params": ["artist"]}</userinput> 3426 <computeroutput>{ 3427 "result": "An Artist" 3428 } 3429 </computeroutput> 3430 <prompt>kid3-cli> </prompt><userinput>{"jsonrpc":"2.0","id":"123","method":"get","params":["artist"]}</userinput> 3431 <computeroutput>{"id":"123","jsonrpc":"2.0","result":"An Artist"}</computeroutput> 3432 </screen> 3433 3434 </para> 3435 </sect1> 3436 3437 </chapter> 3438 3439 <chapter id="credits"> 3440 3441 <title>Credits and License</title> 3442 3443 <para> 3444 &kid3; 3445 </para> 3446 <para> 3447 Program written by Urs Fleisch <email>ufleisch@users.sourceforge.net</email> 3448 </para> 3449 3450 <!-- TRANS:CREDIT_FOR_TRANSLATORS --> 3451 3452 &underFDL; 3453 &underGPL; 3454 3455 </chapter> 3456 3457 <appendix id="installation"> 3458 <title>Installation</title> 3459 3460 <sect1 id="getting-kid3"> 3461 <title>How to obtain &kid3;</title> 3462 3463 <para> 3464 &kid3; can be found at 3465 <ulink url="https://kid3.kde.org">https://kid3.kde.org</ulink>. 3466 </para> 3467 </sect1> 3468 3469 <sect1 id="requirements"> 3470 <title>Requirements</title> 3471 3472 <para> 3473 &kid3; needs <ulink url="https://www.qt.io">&Qt;</ulink>. <ulink 3474 url="http://www.kde.org">&kde;</ulink> is recommended but not necessary, as 3475 &kid3; can also be compiled as a &Qt; application. &kid3; can be compiled for 3476 systems where these libraries are available, <abbrev>e.g.</abbrev> for GNU/&Linux;, &Windows; 3477 and &macOS;. 3478 3479 To tag Ogg/Vorbis 3480 files, <ulink url="http://xiph.org/ogg/">libogg</ulink>, 3481 <ulink url="http://xiph.org/vorbis/">libvorbis and libvorbisfile</ulink> are 3482 required, for FLAC files <ulink url="http://flac.sourceforge.net">libFLAC++ 3483 and libFLAC</ulink>. 3484 <ulink url="http://id3lib.sourceforge.net">id3lib</ulink> is used for MP3 3485 files. 3486 These four formats are also supported by 3487 <ulink url="http://taglib.github.io/">TagLib</ulink>, 3488 which can also handle Opus, MPC, APE, MP2, Speex, TrueAudio, WavPack, WMA, WAV, AIFF 3489 files and tracker modules. 3490 To import from acoustic fingerprints, 3491 <ulink url="http://acoustid.org/chromaprint">Chromaprint</ulink> 3492 and <ulink url="http://libav.org/">libav</ulink> are used. 3493 </para> 3494 <para> 3495 &kid3; is available for most &Linux; distributions, &Windows; and &macOS;. 3496 Links can be found on <ulink url="https://kid3.kde.org"> 3497 https://kid3.kde.org</ulink>. 3498 </para> 3499 3500 </sect1> 3501 3502 <sect1 id="compilation"> 3503 <title>Compilation and Installation</title> 3504 3505 <para> 3506 You can compile &kid3; with or without &kde;. Without &kde;, &kid3; is a 3507 simple &Qt; application and lacks some configuration and session features. 3508 </para> 3509 <para> 3510 For a &kde; version, go into the top folder and type 3511 <screen width="40"> 3512 <prompt>%</prompt> <userinput>cmake .</userinput> 3513 <prompt>%</prompt> <userinput>make</userinput> 3514 <prompt>%</prompt> <userinput>make install</userinput> 3515 </screen> 3516 </para> 3517 <para> 3518 To compile for different versions of &Qt; or &kde;, set the corresponding 3519 <userinput>cmake</userinput> options. 3520 </para> 3521 <para> 3522 If not all libraries are present, &kid3; is built with reduced functionality. 3523 So you should take care to have all desired development packages installed. 3524 On the other side, <userinput>cmake</userinput>-options control which 3525 libraries are compiled in. The default is 3526 <userinput>-DWITH_TAGLIB:BOOL=ON -DWITH_MP4V2:BOOL=OFF -DWITH_ID3LIB:BOOL=ON 3527 -DWITH_CHROMAPRINT:BOOL=ON -DWITH_VORBIS:BOOL=ON -DWITH_FLAC:BOOL=ON 3528 </userinput>. These options can be disabled using 3529 <userinput>OFF</userinput>. 3530 </para> 3531 <para> 3532 To build &kid3; as a &Qt; application without &kde;, use the 3533 <userinput>cmake</userinput> option <userinput>-DWITH_APPS=Qt</userinput>. 3534 To build both a &kde; and a &Qt; application, set 3535 <userinput>-DWITH_APPS="Qt;KDE"</userinput>. 3536 </para> 3537 <para> 3538 To use a specific &Qt; installation, set 3539 <userinput>-DQT_QMAKE_EXECUTABLE=/path/to/qmake</userinput>. 3540 </para> 3541 <para> 3542 Generation of RPM-Packages is supported by the 3543 file <filename>kid3.spec</filename>, for &Debian; Packages, 3544 run <userinput>build.sh deb</userinput>. 3545 </para> 3546 3547 <para> 3548 The &Qt; application can also be compiled for &Windows; and &macOS;. 3549 The script <filename>build.sh</filename> can be used to download 3550 and build all required libraries and create a &kid3; package. 3551 </para> 3552 3553 </sect1> 3554 3555 <sect1 id="configuration"> 3556 <title>Configuration</title> 3557 3558 <para>With &kde;, the settings are stored in 3559 <filename>.config/kid3rc</filename>, 3560 the application state in <filename>.local/share/kid3/kid3staterc</filename>. 3561 As a &Qt; application, this file is 3562 in <filename>.config/Kid3/Kid3.conf</filename>. On &Windows;, 3563 the configuration is stored in the registry. on &macOS; in a plist file. 3564 </para> 3565 <para>The environment variable <varname>KID3_CONFIG_FILE</varname> can be used 3566 to set the path of the configuration file.</para> 3567 3568 </sect1> 3569 3570 </appendix> 3571 3572 <appendix id="dbus-interface"> 3573 <title>&DBus; Interface</title> 3574 3575 <sect1 id="dbus-examples"> 3576 <title>&DBus; Examples</title> 3577 3578 <para> 3579 On &Linux; a &DBus;-interface can be used to control 3580 &kid3; by scripts. Scripts can be written in any language with &DBus;-bindings 3581 (<abbrev>e.g.</abbrev> in Python) and can be added to the <guilabel>User Actions</guilabel> to 3582 extend the functionality of &kid3;. 3583 </para> 3584 3585 <para> 3586 The artist in tag 2 of the current file can be set to the value "One Hit Wonder" 3587 with the following code: 3588 </para> 3589 3590 <variablelist> 3591 <varlistentry><term>Shell</term> 3592 <listitem> 3593 <programlisting> 3594 dbus-send --dest=org.kde.kid3 --print-reply=literal \ 3595 /Kid3 org.kde.Kid3.setFrame int32:2 string:'Artist' \ 3596 string:'One Hit Wonder' 3597 </programlisting> 3598 <para> 3599 or easier with &Qt;'s <command>qdbus</command> (<command>qdbusviewer</command> 3600 can be used to explore the interface in a &GUI;): 3601 </para> 3602 <programlisting> 3603 qdbus org.kde.kid3 /Kid3 setFrame 2 Artist \ 3604 'One Hit Wonder' 3605 </programlisting> 3606 </listitem> 3607 </varlistentry> 3608 <varlistentry><term>Python</term> 3609 <listitem> 3610 <programlisting> 3611 import dbus 3612 kid3 = dbus.SessionBus().get_object( 3613 'org.kde.kid3', '/Kid3') 3614 kid3.setFrame(2, 'Artist', 'One Hit Wonder') 3615 </programlisting> 3616 </listitem> 3617 </varlistentry> 3618 <varlistentry><term>Perl</term> 3619 <listitem> 3620 <programlisting> 3621 use Net::DBus; 3622 $kid3 = Net::DBus->session->get_service( 3623 "org.kde.kid3")->get_object( 3624 "/Kid3", "org.kde.Kid3"); 3625 $kid3->setFrame(2, "Artist", "One Hit Wonder"); 3626 </programlisting> 3627 </listitem> 3628 </varlistentry> 3629 </variablelist> 3630 </sect1> 3631 3632 <sect1 id="dbus-api"> 3633 <title>&DBus; API</title> 3634 3635 <para> 3636 The &DBus; API is specified 3637 in <filename>org.kde.Kid3.xml</filename>. The &kid3; interface has the 3638 following methods: 3639 </para> 3640 3641 <sect2 id="dbus-openDirectory"> 3642 <title>Open file or folder</title> 3643 <funcsynopsis> 3644 <funcprototype> 3645 <funcdef>boolean <function>openDirectory</function></funcdef> 3646 <paramdef>string <parameter>path</parameter></paramdef> 3647 </funcprototype> 3648 </funcsynopsis> 3649 <variablelist> 3650 <varlistentry> 3651 <term><replaceable>path</replaceable></term> 3652 <listitem><para>path to file or folder</para></listitem> 3653 </varlistentry> 3654 </variablelist> 3655 <para>Returns true if OK.</para> 3656 </sect2> 3657 3658 <sect2 id="dbus-unloadAllTags"> 3659 <title>Unload the tags of all files which are not modified or selected</title> 3660 <funcsynopsis> 3661 <funcprototype> 3662 <funcdef><function>unloadAllTags</function></funcdef> 3663 <void/> 3664 </funcprototype> 3665 </funcsynopsis> 3666 </sect2> 3667 3668 <sect2 id="dbus-save"> 3669 <title>Save all modified files</title> 3670 <funcsynopsis> 3671 <funcprototype> 3672 <funcdef>boolean <function>save</function></funcdef> 3673 <void/> 3674 </funcprototype> 3675 </funcsynopsis> 3676 <para>Returns true if OK.</para> 3677 </sect2> 3678 3679 <sect2 id="dbus-getErrorMessage"> 3680 <title>Get a detailed error message provided by some methods</title> 3681 <funcsynopsis> 3682 <funcprototype> 3683 <funcdef>string <function>getErrorMessage</function></funcdef> 3684 <void/> 3685 </funcprototype> 3686 </funcsynopsis> 3687 <para>Returns detailed error message.</para> 3688 </sect2> 3689 3690 <sect2 id="dbus-revert"> 3691 <title>Revert changes in the selected files</title> 3692 <funcsynopsis> 3693 <funcprototype> 3694 <funcdef><function>revert</function></funcdef> 3695 <void/> 3696 </funcprototype> 3697 </funcsynopsis> 3698 </sect2> 3699 3700 <sect2 id="dbus-batchImport"> 3701 <title>Start an automatic batch import</title> 3702 <funcsynopsis> 3703 <funcprototype> 3704 <funcdef>boolean <function>batchImport</function></funcdef> 3705 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 3706 <paramdef>string <parameter>profileName</parameter></paramdef> 3707 </funcprototype> 3708 </funcsynopsis> 3709 <variablelist> 3710 <varlistentry> 3711 <term><replaceable>tagMask</replaceable></term> 3712 <listitem><para>tag mask (bit 0 for tag 1, bit 1 for tag 2)</para></listitem> 3713 </varlistentry> 3714 <varlistentry> 3715 <term><replaceable>profileName</replaceable></term> 3716 <listitem><para>name of batch import profile to use</para></listitem> 3717 </varlistentry> 3718 </variablelist> 3719 </sect2> 3720 3721 <sect2 id="dbus-importFromFile"> 3722 <title>Import tags from a file</title> 3723 <funcsynopsis> 3724 <funcprototype> 3725 <funcdef>boolean <function>importFromFile</function></funcdef> 3726 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 3727 <paramdef>string <parameter>path</parameter></paramdef> 3728 <paramdef>int32 <parameter>fmtIdx</parameter></paramdef> 3729 </funcprototype> 3730 </funcsynopsis> 3731 <variablelist> 3732 <varlistentry> 3733 <term><replaceable>tagMask</replaceable></term> 3734 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 3735 </varlistentry> 3736 <varlistentry> 3737 <term><replaceable>path</replaceable></term> 3738 <listitem><para>path of file</para></listitem> 3739 </varlistentry> 3740 <varlistentry> 3741 <term><replaceable>fmtIdx</replaceable></term> 3742 <listitem><para>index of format</para></listitem> 3743 </varlistentry> 3744 </variablelist> 3745 <para>Returns true if OK.</para> 3746 </sect2> 3747 3748 <sect2 id="dbus-importFromTags"> 3749 <title>Import tags from other tags</title> 3750 <funcsynopsis> 3751 <funcprototype> 3752 <funcdef><function>importFromTags</function></funcdef> 3753 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 3754 <paramdef>string <parameter>source</parameter></paramdef> 3755 <paramdef>string <parameter>extraction</parameter></paramdef> 3756 </funcprototype> 3757 </funcsynopsis> 3758 <variablelist> 3759 <varlistentry> 3760 <term><replaceable>tagMask</replaceable></term> 3761 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 3762 </varlistentry> 3763 <varlistentry> 3764 <term><replaceable>source</replaceable></term> 3765 <listitem><para>format to get source text from tags</para></listitem> 3766 </varlistentry> 3767 <varlistentry> 3768 <term><replaceable>extraction</replaceable></term> 3769 <listitem><para>regular expression with frame names and captures to 3770 extract from source text</para></listitem> 3771 </varlistentry> 3772 </variablelist> 3773 </sect2> 3774 3775 <sect2 id="dbus-importFromTagsToSelection"> 3776 <title>Import tags from other tags on selected files</title> 3777 <funcsynopsis> 3778 <funcprototype> 3779 <funcdef>array <function>importFromTagsToSelection</function></funcdef> 3780 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 3781 <paramdef>string <parameter>source</parameter></paramdef> 3782 <paramdef>string <parameter>extraction</parameter></paramdef> 3783 </funcprototype> 3784 </funcsynopsis> 3785 <variablelist> 3786 <varlistentry> 3787 <term><replaceable>tagMask</replaceable></term> 3788 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 3789 </varlistentry> 3790 <varlistentry> 3791 <term><replaceable>source</replaceable></term> 3792 <listitem><para>format to get source text from tags</para></listitem> 3793 </varlistentry> 3794 <varlistentry> 3795 <term><replaceable>extraction</replaceable></term> 3796 <listitem><para>regular expression with frame names and captures to 3797 extract from source text</para></listitem> 3798 </varlistentry> 3799 </variablelist> 3800 <variablelist> 3801 <varlistentry> 3802 <term><replaceable>returnValues</replaceable></term> 3803 <listitem><para>extracted value for "%{__return}(.+)"</para></listitem> 3804 </varlistentry> 3805 </variablelist> 3806 </sect2> 3807 3808 <sect2 id="dbus-downloadAlbumArt"> 3809 <title>Download album cover art</title> 3810 <funcsynopsis> 3811 <funcprototype> 3812 <funcdef><function>downloadAlbumArt</function></funcdef> 3813 <paramdef>string <parameter>url</parameter></paramdef> 3814 <paramdef>boolean <parameter>allFilesInDir</parameter></paramdef> 3815 </funcprototype> 3816 </funcsynopsis> 3817 <variablelist> 3818 <varlistentry> 3819 <term><replaceable>url</replaceable></term> 3820 <listitem><para>&URL; of picture file or album art 3821 resource</para></listitem> 3822 </varlistentry> 3823 <varlistentry> 3824 <term><replaceable>allFilesInDir</replaceable></term> 3825 <listitem><para>true to add the image to all files in the 3826 folder</para></listitem> 3827 </varlistentry> 3828 </variablelist> 3829 </sect2> 3830 3831 <sect2 id="dbus-exportToFile"> 3832 <title>Export tags to a file</title> 3833 <funcsynopsis> 3834 <funcprototype> 3835 <funcdef>boolean <function>exportToFile</function></funcdef> 3836 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 3837 <paramdef>string <parameter>path</parameter></paramdef> 3838 <paramdef>int32 <parameter>fmtIdx</parameter></paramdef> 3839 </funcprototype> 3840 </funcsynopsis> 3841 <variablelist> 3842 <varlistentry> 3843 <term><replaceable>tagMask</replaceable></term> 3844 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 3845 </varlistentry> 3846 <varlistentry> 3847 <term><replaceable>path</replaceable></term> 3848 <listitem><para>path of file</para></listitem> 3849 </varlistentry> 3850 <varlistentry> 3851 <term><replaceable>fmtIdx</replaceable></term> 3852 <listitem><para>index of format</para></listitem> 3853 </varlistentry> 3854 </variablelist> 3855 <para>Returns true if OK.</para> 3856 </sect2> 3857 3858 <sect2 id="dbus-createPlaylist"> 3859 <title>Create a playlist</title> 3860 <funcsynopsis> 3861 <funcprototype> 3862 <funcdef>boolean <function>createPlaylist</function></funcdef> 3863 <void/> 3864 </funcprototype> 3865 </funcsynopsis> 3866 <para>Returns true if OK.</para> 3867 </sect2> 3868 3869 <sect2 id="dbus-getPlaylistItems"> 3870 <title>Get items of a playlist</title> 3871 <funcsynopsis> 3872 <funcprototype> 3873 <funcdef>array <function>getPlaylistItems</function></funcdef> 3874 <paramdef>string <parameter>path</parameter></paramdef> 3875 </funcprototype> 3876 </funcsynopsis> 3877 <variablelist> 3878 <varlistentry> 3879 <term><replaceable>path</replaceable></term> 3880 <listitem><para>path to playlist file</para></listitem> 3881 </varlistentry> 3882 </variablelist> 3883 <para>Returns list of absolute paths to playlist items.</para> 3884 </sect2> 3885 3886 <sect2 id="dbus-setPlaylistItems"> 3887 <title>Set items of a playlist</title> 3888 <funcsynopsis> 3889 <funcprototype> 3890 <funcdef>boolean <function>setPlaylistItems</function></funcdef> 3891 <paramdef>string <parameter>path</parameter></paramdef> 3892 <paramdef>array <parameter>items</parameter></paramdef> 3893 </funcprototype> 3894 </funcsynopsis> 3895 <variablelist> 3896 <varlistentry> 3897 <term><replaceable>path</replaceable></term> 3898 <listitem><para>path to playlist file</para></listitem> 3899 </varlistentry> 3900 <varlistentry> 3901 <term><replaceable>items</replaceable></term> 3902 <listitem><para>list of absolute paths to playlist items</para></listitem> 3903 </varlistentry> 3904 </variablelist> 3905 <para>Returns true if OK, false if not all items were found and added or 3906 saving failed.</para> 3907 </sect2> 3908 3909 <sect2 id="dbus-quit"> 3910 <title>Quit the application</title> 3911 <funcsynopsis> 3912 <funcprototype> 3913 <funcdef><function>quit</function></funcdef> 3914 <void/> 3915 </funcprototype> 3916 </funcsynopsis> 3917 </sect2> 3918 3919 <sect2 id="dbus-selectAll"> 3920 <title>Select all files</title> 3921 <funcsynopsis> 3922 <funcprototype> 3923 <funcdef><function>selectAll</function></funcdef> 3924 <void/> 3925 </funcprototype> 3926 </funcsynopsis> 3927 </sect2> 3928 3929 <sect2 id="dbus-deselectAll"> 3930 <title>Deselect all files</title> 3931 <funcsynopsis> 3932 <funcprototype> 3933 <funcdef><function>deselectAll</function></funcdef> 3934 <void/> 3935 </funcprototype> 3936 </funcsynopsis> 3937 </sect2> 3938 3939 <sect2 id="dbus-firstFile"> 3940 <title>Set the first file as the current file</title> 3941 <funcsynopsis> 3942 <funcprototype> 3943 <funcdef>boolean <function>firstFile</function></funcdef> 3944 <void/> 3945 </funcprototype> 3946 </funcsynopsis> 3947 <para>Returns true if there is a first file.</para> 3948 </sect2> 3949 3950 <sect2 id="dbus-previousFile"> 3951 <title>Set the previous file as the current file</title> 3952 <funcsynopsis> 3953 <funcprototype> 3954 <funcdef>boolean <function>previousFile</function></funcdef> 3955 <void/> 3956 </funcprototype> 3957 </funcsynopsis> 3958 <para>Returns true if there is a previous file.</para> 3959 </sect2> 3960 3961 <sect2 id="dbus-nextFile"> 3962 <title>Set the next file as the current file</title> 3963 <funcsynopsis> 3964 <funcprototype> 3965 <funcdef>boolean <function>nextFile</function></funcdef> 3966 <void/> 3967 </funcprototype> 3968 </funcsynopsis> 3969 <para>Returns true if there is a next file.</para> 3970 </sect2> 3971 3972 <sect2 id="dbus-selectFirstFile"> 3973 <title>Select the first file</title> 3974 <funcsynopsis> 3975 <funcprototype> 3976 <funcdef>boolean <function>selectFirstFile</function></funcdef> 3977 <void/> 3978 </funcprototype> 3979 </funcsynopsis> 3980 <para>Returns true if there is a first file.</para> 3981 </sect2> 3982 3983 <sect2 id="dbus-selectPreviousFile"> 3984 <title>Select the previous file</title> 3985 <funcsynopsis> 3986 <funcprototype> 3987 <funcdef>boolean <function>selectPreviousFile</function></funcdef> 3988 <void/> 3989 </funcprototype> 3990 </funcsynopsis> 3991 <para>Returns true if there is a previous file.</para> 3992 </sect2> 3993 3994 <sect2 id="dbus-selectNextFile"> 3995 <title>Select the next file</title> 3996 <funcsynopsis> 3997 <funcprototype> 3998 <funcdef>boolean <function>selectNextFile</function></funcdef> 3999 <void/> 4000 </funcprototype> 4001 </funcsynopsis> 4002 <para>Returns true if there is a next file.</para> 4003 </sect2> 4004 4005 <sect2 id="dbus-selectCurrentFile"> 4006 <title>Select the current file</title> 4007 <funcsynopsis> 4008 <funcprototype> 4009 <funcdef>boolean <function>selectCurrentFile</function></funcdef> 4010 <void/> 4011 </funcprototype> 4012 </funcsynopsis> 4013 <para>Returns true if there is a current file.</para> 4014 </sect2> 4015 4016 <sect2 id="dbus-expandDirectory"> 4017 <title>Expand or collapse the current file item if it is a folder</title> 4018 <funcsynopsis> 4019 <funcprototype> 4020 <funcdef>boolean <function>expandDirectory</function></funcdef> 4021 <void/> 4022 </funcprototype> 4023 </funcsynopsis> 4024 <para>A file list item is a folder if getFileName() returns a name with 4025 '/' as the last character.</para> 4026 <para>Returns true if current file item is a folder.</para> 4027 </sect2> 4028 4029 <sect2 id="dbus-applyFilenameFormat"> 4030 <title>Apply the file name format</title> 4031 <funcsynopsis> 4032 <funcprototype> 4033 <funcdef><function>applyFilenameFormat</function></funcdef> 4034 <void/> 4035 </funcprototype> 4036 </funcsynopsis> 4037 </sect2> 4038 4039 <sect2 id="dbus-applyTagFormat"> 4040 <title>Apply the tag format</title> 4041 <funcsynopsis> 4042 <funcprototype> 4043 <funcdef><function>applyTagFormat</function></funcdef> 4044 <void/> 4045 </funcprototype> 4046 </funcsynopsis> 4047 </sect2> 4048 4049 <sect2 id="dbus-applyTextEncoding"> 4050 <title>Apply text encoding</title> 4051 <funcsynopsis> 4052 <funcprototype> 4053 <funcdef><function>applyTextEncoding</function></funcdef> 4054 <void/> 4055 </funcprototype> 4056 </funcsynopsis> 4057 </sect2> 4058 4059 <sect2 id="dbus-setDirNameFromTag"> 4060 <title>Set the folder name from the tags</title> 4061 <funcsynopsis> 4062 <funcprototype> 4063 <funcdef>boolean <function>setDirNameFromTag</function></funcdef> 4064 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4065 <paramdef>string <parameter>format</parameter></paramdef> 4066 <paramdef>boolean <parameter>create</parameter></paramdef> 4067 </funcprototype> 4068 </funcsynopsis> 4069 <variablelist> 4070 <varlistentry> 4071 <term><replaceable>tagMask</replaceable></term> 4072 <listitem><para>tag mask (bit 0 for tag 1, bit 1 for tag 2)</para></listitem> 4073 </varlistentry> 4074 <varlistentry> 4075 <term><replaceable>format</replaceable></term> 4076 <listitem><para>folder name format</para></listitem> 4077 </varlistentry> 4078 <varlistentry> 4079 <term><replaceable>create</replaceable></term> 4080 <listitem><para>true to create, false to rename</para></listitem> 4081 </varlistentry> 4082 </variablelist> 4083 <para>Returns true if OK, else the error message is available using getErrorMessage().</para> 4084 </sect2> 4085 4086 <sect2 id="dbus-numberTracks"> 4087 <title>Set subsequent track numbers in the selected files</title> 4088 <funcsynopsis> 4089 <funcprototype> 4090 <funcdef><function>numberTracks</function></funcdef> 4091 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4092 <paramdef>int32 <parameter>firstTrackNr</parameter></paramdef> 4093 </funcprototype> 4094 </funcsynopsis> 4095 <variablelist> 4096 <varlistentry> 4097 <term><replaceable>tagMask</replaceable></term> 4098 <listitem><para>tag mask (bit 0 for tag 1, bit 1 for tag 2)</para></listitem> 4099 </varlistentry> 4100 <varlistentry> 4101 <term><replaceable>firstTrackNr</replaceable></term> 4102 <listitem><para>number to use for first file</para></listitem> 4103 </varlistentry> 4104 </variablelist> 4105 </sect2> 4106 4107 <sect2 id="dbus-filter"> 4108 <title>Filter the files</title> 4109 <funcsynopsis> 4110 <funcprototype> 4111 <funcdef><function>filter</function></funcdef> 4112 <paramdef>string <parameter>expression</parameter></paramdef> 4113 </funcprototype> 4114 </funcsynopsis> 4115 <variablelist> 4116 <varlistentry> 4117 <term><replaceable>expression</replaceable></term> 4118 <listitem><para>filter expression</para></listitem> 4119 </varlistentry> 4120 </variablelist> 4121 </sect2> 4122 4123 <sect2 id="dbus-convertToId3v24"> 4124 <title>Convert ID3v2.3 tags to ID3v2.4</title> 4125 <funcsynopsis> 4126 <funcprototype> 4127 <funcdef><function>convertToId3v24</function></funcdef> 4128 <void/> 4129 </funcprototype> 4130 </funcsynopsis> 4131 </sect2> 4132 4133 <sect2 id="dbus-convertToId3v23"> 4134 <title>Convert ID3v2.4 tags to ID3v2.3</title> 4135 <funcsynopsis> 4136 <funcprototype> 4137 <funcdef><function>convertToId3v23</function></funcdef> 4138 <void/> 4139 </funcprototype> 4140 </funcsynopsis> 4141 <para>Returns true if OK.</para> 4142 </sect2> 4143 4144 <sect2 id="dbus-getDirectoryName"> 4145 <title>Get path of folder</title> 4146 <funcsynopsis> 4147 <funcprototype> 4148 <funcdef>string <function>getDirectoryName</function></funcdef> 4149 <void/> 4150 </funcprototype> 4151 </funcsynopsis> 4152 <para>Returns absolute path of folder.</para> 4153 </sect2> 4154 4155 <sect2 id="dbus-getFileName"> 4156 <title>Get name of current file</title> 4157 <funcsynopsis> 4158 <funcprototype> 4159 <funcdef>string <function>getFileName</function></funcdef> 4160 <void/> 4161 </funcprototype> 4162 </funcsynopsis> 4163 <para>Returns true absolute file name, ends with "/" if it is a folder.</para> 4164 </sect2> 4165 4166 <sect2 id="dbus-setFileName"> 4167 <title>Set name of selected file</title> 4168 <funcsynopsis> 4169 <funcprototype> 4170 <funcdef><function>setFileName</function></funcdef> 4171 <paramdef>string <parameter>name</parameter></paramdef> 4172 </funcprototype> 4173 </funcsynopsis> 4174 <variablelist> 4175 <varlistentry> 4176 <term><replaceable>name</replaceable></term> 4177 <listitem><para>file name</para></listitem> 4178 </varlistentry> 4179 </variablelist> 4180 <para>The file will be renamed when the folder is saved.</para> 4181 </sect2> 4182 4183 <sect2 id="dbus-setFileNameFormat"> 4184 <title>Set format to use when setting the filename from the tags</title> 4185 <funcsynopsis> 4186 <funcprototype> 4187 <funcdef><function>setFileNameFormat</function></funcdef> 4188 <paramdef>string <parameter>format</parameter></paramdef> 4189 </funcprototype> 4190 </funcsynopsis> 4191 <variablelist> 4192 <varlistentry> 4193 <term><replaceable>format</replaceable></term> 4194 <listitem><para>file name format</para></listitem> 4195 </varlistentry> 4196 </variablelist> 4197 </sect2> 4198 4199 <sect2 id="dbus-setFileNameFromTag"> 4200 <title>Set the file names of the selected files from the tags</title> 4201 <funcsynopsis> 4202 <funcprototype> 4203 <funcdef><function>setFileNameFromTag</function></funcdef> 4204 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4205 </funcprototype> 4206 </funcsynopsis> 4207 <variablelist> 4208 <varlistentry> 4209 <term><replaceable>tagMask</replaceable></term> 4210 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 4211 </varlistentry> 4212 </variablelist> 4213 </sect2> 4214 4215 <sect2 id="dbus-getFrame"> 4216 <title>Get value of frame</title> 4217 <funcsynopsis> 4218 <funcprototype> 4219 <funcdef>string <function>getFrame</function></funcdef> 4220 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4221 <paramdef>string <parameter>name</parameter></paramdef> 4222 </funcprototype> 4223 </funcsynopsis> 4224 <variablelist> 4225 <varlistentry> 4226 <term><replaceable>tagMask</replaceable></term> 4227 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 4228 </varlistentry> 4229 <varlistentry> 4230 <term><replaceable>name</replaceable></term> 4231 <listitem><para>name of frame (<abbrev>e.g.</abbrev> "artist")</para></listitem> 4232 </varlistentry> 4233 </variablelist> 4234 <para>To get binary data like a picture, the name of a file to write can be 4235 added after the <parameter>name</parameter>, <abbrev>e.g.</abbrev> "Picture:/path/to/file". 4236 In the same way, synchronized lyrics can be exported, <abbrev>e.g.</abbrev> "SYLT:/path/to/file". 4237 </para> 4238 <para>Returns value of frame.</para> 4239 </sect2> 4240 4241 <sect2 id="dbus-setFrame"> 4242 <title>Set value of frame</title> 4243 <funcsynopsis> 4244 <funcprototype> 4245 <funcdef>boolean <function>setFrame</function></funcdef> 4246 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4247 <paramdef>string <parameter>name</parameter></paramdef> 4248 <paramdef>string <parameter>value</parameter></paramdef> 4249 </funcprototype> 4250 </funcsynopsis> 4251 <variablelist> 4252 <varlistentry> 4253 <term><replaceable>tagMask</replaceable></term> 4254 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 4255 </varlistentry> 4256 <varlistentry> 4257 <term><replaceable>name</replaceable></term> 4258 <listitem><para>name of frame (<abbrev>e.g.</abbrev> "artist")</para></listitem> 4259 </varlistentry> 4260 <varlistentry> 4261 <term><replaceable>value</replaceable></term> 4262 <listitem><para>value of frame</para></listitem> 4263 </varlistentry> 4264 </variablelist> 4265 <para>For tag 2 (<parameter>tagMask</parameter> 2), if no frame with <parameter>name</parameter> exists, a new frame 4266 is added, if <parameter>value</parameter> is empty, the frame is deleted. 4267 To add binary data like a picture, a file can be added after the 4268 <parameter>name</parameter>, <abbrev>e.g.</abbrev> "Picture:/path/to/file". 4269 "SYLT:/path/to/file" can be used to import synchronized lyrics.</para> 4270 <para>Returns true if OK.</para> 4271 </sect2> 4272 4273 <sect2 id="dbus-getTag"> 4274 <title>Get all frames of a tag</title> 4275 <funcsynopsis> 4276 <funcprototype> 4277 <funcdef>array of string <function>getTag</function></funcdef> 4278 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4279 </funcprototype> 4280 </funcsynopsis> 4281 <variablelist> 4282 <varlistentry> 4283 <term><replaceable>tagMask</replaceable></term> 4284 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 4285 </varlistentry> 4286 </variablelist> 4287 <para>Returns list with alternating frame names and values.</para> 4288 </sect2> 4289 4290 <sect2 id="dbus-getInformation"> 4291 <title>Get technical information about file</title> 4292 <funcsynopsis> 4293 <funcprototype> 4294 <funcdef>array of string <function>getInformation</function></funcdef> 4295 <void/> 4296 </funcprototype> 4297 </funcsynopsis> 4298 <para>Properties are Format, Bitrate, Samplerate, Channels, Duration, 4299 Channel Mode, VBR, Tag 1, Tag 2. 4300 Properties which are not available are omitted.</para> 4301 <para>Returns list with alternating property names and values.</para> 4302 </sect2> 4303 4304 <sect2 id="dbus-setTagFromFileName"> 4305 <title>Set tag from file name</title> 4306 <funcsynopsis> 4307 <funcprototype> 4308 <funcdef><function>setTagFromFileName</function></funcdef> 4309 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4310 </funcprototype> 4311 </funcsynopsis> 4312 <variablelist> 4313 <varlistentry> 4314 <term><replaceable>tagMask</replaceable></term> 4315 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 4316 </varlistentry> 4317 </variablelist> 4318 </sect2> 4319 4320 <sect2 id="dbus-setTagFromOtherTag"> 4321 <title>Set tag from other tag</title> 4322 <funcsynopsis> 4323 <funcprototype> 4324 <funcdef><function>setTagFromOtherTag</function></funcdef> 4325 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4326 </funcprototype> 4327 </funcsynopsis> 4328 <variablelist> 4329 <varlistentry> 4330 <term><replaceable>tagMask</replaceable></term> 4331 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 4332 </varlistentry> 4333 </variablelist> 4334 </sect2> 4335 4336 <sect2 id="dbus-copyTag"> 4337 <title>Copy tag</title> 4338 <funcsynopsis> 4339 <funcprototype> 4340 <funcdef><function>copyTag</function></funcdef> 4341 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4342 </funcprototype> 4343 </funcsynopsis> 4344 <variablelist> 4345 <varlistentry> 4346 <term><replaceable>tagMask</replaceable></term> 4347 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 4348 </varlistentry> 4349 </variablelist> 4350 </sect2> 4351 4352 <sect2 id="dbus-pasteTag"> 4353 <title>Paste tag</title> 4354 <funcsynopsis> 4355 <funcprototype> 4356 <funcdef><function>pasteTag</function></funcdef> 4357 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4358 </funcprototype> 4359 </funcsynopsis> 4360 <variablelist> 4361 <varlistentry> 4362 <term><replaceable>tagMask</replaceable></term> 4363 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 4364 </varlistentry> 4365 </variablelist> 4366 </sect2> 4367 4368 <sect2 id="dbus-removeTag"> 4369 <title>Remove tag</title> 4370 <funcsynopsis> 4371 <funcprototype> 4372 <funcdef><function>removeTag</function></funcdef> 4373 <paramdef>int32 <parameter>tagMask</parameter></paramdef> 4374 </funcprototype> 4375 </funcsynopsis> 4376 <variablelist> 4377 <varlistentry> 4378 <term><replaceable>tagMask</replaceable></term> 4379 <listitem><para>tag bit (1 for tag 1, 2 for tag 2)</para></listitem> 4380 </varlistentry> 4381 </variablelist> 4382 </sect2> 4383 4384 <sect2 id="dbus-reparseConfiguration"> 4385 <title>Reparse the configuration</title> 4386 <funcsynopsis> 4387 <funcprototype> 4388 <funcdef><function>reparseConfiguration</function></funcdef> 4389 <void/> 4390 </funcprototype> 4391 </funcsynopsis> 4392 <para>Automated configuration changes are possible by modifying 4393 the configuration file and then reparsing the configuration.</para> 4394 </sect2> 4395 4396 <sect2 id="dbus-playAudio"> 4397 <title>Plays the selected files</title> 4398 <funcsynopsis> 4399 <funcprototype> 4400 <funcdef><function>playAudio</function></funcdef> 4401 <void/> 4402 </funcprototype> 4403 </funcsynopsis> 4404 </sect2> 4405 4406 </sect1> 4407 4408 </appendix> 4409 4410 <appendix id="qml-interface"> 4411 <title>QML Interface</title> 4412 4413 <sect1 id="qml-examples"> 4414 <title>QML Examples</title> 4415 4416 <para> 4417 QML scripts can be invoked via the context menu of the file list and can be 4418 set in the tab <link linkend="configure-user-actions-qml">User Actions</link> 4419 of the settings dialog. The scripts which are set there can be used as 4420 examples to program custom scripts. QML uses &javascript;, here is the 4421 obligatory "Hello World": 4422 </para> 4423 4424 <programlisting> 4425 import Kid3 1.0 4426 4427 Kid3Script { 4428 onRun: { 4429 console.log("Hello world, folder is", app.dirName) 4430 Qt.quit() 4431 } 4432 } 4433 </programlisting> 4434 4435 <para> 4436 If this script is saved as <filename>/path/to/Example.qml</filename>, the user 4437 command can be defined as <command>@qml 4438 /path/to/Example.qml</command> with name <userinput>QML Test</userinput> and 4439 <guilabel>Output</guilabel> checked. It can then be started using the 4440 <guilabel>QML Test</guilabel> item in the file list context menu, and the 4441 output will be visible in the window. 4442 </para> 4443 4444 <para> 4445 Unfortunately, starting the QML scripts using the <command>qml</command> 4446 (e.g. <command>qml -apptype widget -I /usr/lib/kid3/plugins/imports 4447 /path/to/Example.qml</command>) is broken in recent versions of Qt. But 4448 <command>kid3-cli</command> offers an alternative way to run a QML script from 4449 the command line using its 4450 <link linkend="cli-execute"><command>execute</command></link> command. 4451 <screen width="80"> 4452 kid3-cli -c "execute @qml /path/to/Example.qml" 4453 </screen> 4454 </para> 4455 4456 <para> 4457 To list the titles in the tags 2 of all files in the current folder, the 4458 following script could be used: 4459 </para> 4460 4461 <programlisting> 4462 import Kid3 1.0 4463 4464 Kid3Script { 4465 onRun: { 4466 app.firstFile() 4467 do { 4468 if (app.selectionInfo.tag(Frame.Tag_2).tagFormat) { 4469 console.log(app.getFrame(tagv2, "title")) 4470 } 4471 } while (app.nextFile()) 4472 } 4473 } 4474 </programlisting> 4475 4476 <para> 4477 If the folder contains many files, such a script might block the user 4478 interface for some time. For longer operations, it should therefore have a 4479 break from time to time. The alternative implementation below has the work for 4480 a single file moved out into a function. This function invokes itself with a 4481 timeout of 1 ms at the end, given that more files have to be processed. This 4482 will ensure that the &GUI; remains responsive while the script is running. 4483 </para> 4484 4485 <programlisting> 4486 import Kid3 1.0 4487 4488 Kid3Script { 4489 onRun: { 4490 function doWork() { 4491 if (app.selectionInfo.tag(Frame.Tag_2).tagFormat) { 4492 console.log(app.getFrame(tagv2, "title")) 4493 } 4494 if (!app.nextFile()) { 4495 Qt.quit() 4496 } else { 4497 setTimeout(doWork, 1) 4498 } 4499 } 4500 4501 app.firstFile() 4502 doWork() 4503 } 4504 } 4505 </programlisting> 4506 4507 <para> 4508 When using <command>app.firstFile()</command> with 4509 <command>app.nextFile()</command>, all files of the current folder will be 4510 processed. If only the selected files shall be affected, use 4511 <command>firstFile()</command> and <command>nextFile()</command> instead, 4512 these are convenience functions of the <classname>Kid3Script</classname> 4513 component. The following example is a script which copies only the disc number 4514 and copyright frames of the selected file. 4515 </para> 4516 4517 <programlisting> 4518 import Kid3 1.1 4519 4520 Kid3Script { 4521 onRun: { 4522 function doWork() { 4523 if (app.selectionInfo.tag(Frame.Tag_2).tagFormat) { 4524 app.setFrame(tagv2, "*.selected", false) 4525 app.setFrame(tagv2, "discnumber.selected", true) 4526 app.setFrame(tagv2, "copyright.selected", true) 4527 app.copyTags(tagv2) 4528 } 4529 if (!nextFile()) { 4530 Qt.quit() 4531 } else { 4532 setTimeout(doWork, 1) 4533 } 4534 } 4535 4536 firstFile() 4537 doWork() 4538 } 4539 } 4540 </programlisting> 4541 4542 <para> 4543 More example scripts come with &kid3; and are already registered as user commands. 4544 4545 <itemizedlist> 4546 <listitem><para> 4547 <guilabel>ReplayGain to SoundCheck</guilabel> 4548 (<filename>ReplayGain2SoundCheck.qml</filename>): 4549 Create iTunNORM SoundCheck information from replay gain frames. 4550 </para></listitem> 4551 <listitem><para> 4552 <guilabel>Resize Album Art</guilabel> 4553 (<filename>ResizeAlbumArt.qml</filename>): 4554 Resize embedded cover art images which are larger than 500x500 pixels. 4555 </para></listitem> 4556 <listitem><para> 4557 <guilabel>Extract Album Art</guilabel> 4558 (<filename>ExtractAlbumArt.qml</filename>): 4559 Extract all embedded cover art pictures avoiding duplicates. 4560 </para></listitem> 4561 <listitem><para> 4562 <guilabel>Embed Album Art</guilabel> 4563 (<filename>EmbedAlbumArt.qml</filename>): 4564 Embed cover art found in image files into audio files in the same folder. 4565 </para></listitem> 4566 <listitem><para> 4567 <guilabel>Embed Lyrics</guilabel> 4568 (<filename>EmbedLyrics.qml</filename>): 4569 Fetch unsynchronized lyrics from web service. 4570 </para></listitem> 4571 <listitem><para> 4572 <guilabel>Text Encoding ID3v1</guilabel> 4573 (<filename>ShowTextEncodingV1.qml</filename>): 4574 Helps to find the encoding of ID3v1 tags by showing the tags of the 4575 current file in all available character encodings. 4576 </para></listitem> 4577 <listitem><para> 4578 <guilabel>ID3v1 to ASCII</guilabel> 4579 (<filename>Tag1ToAscii.qml</filename>): 4580 Transliterate extended latin characters in the ID3v1 tag to ASCII. 4581 </para></listitem> 4582 <listitem><para> 4583 <guilabel>English Title Case</guilabel> 4584 (<filename>TitleCase.qml</filename>): 4585 Formats text in the tags to English title case. 4586 </para></listitem> 4587 <listitem><para> 4588 <guilabel>Rewrite Tags</guilabel> 4589 (<filename>RewriteTags.qml</filename>): 4590 Rewrite all tags in the selected files. 4591 </para></listitem> 4592 <listitem><para> 4593 <guilabel>Export CSV</guilabel> 4594 (<filename>ExportCsv.qml</filename>): 4595 Export recursively all tags of all files to a CSV file. 4596 </para></listitem> 4597 <listitem><para> 4598 <guilabel>Import CSV</guilabel> 4599 (<filename>ImportCsv.qml</filename>): 4600 Import recursively all tags of all files from a CSV file. 4601 </para></listitem> 4602 <listitem><para> 4603 <guilabel>Export JSON</guilabel> 4604 (<filename>ExportJson.qml</filename>): 4605 Export recursively all tags of all files to a JSON file. 4606 </para></listitem> 4607 <listitem><para> 4608 <guilabel>Import JSON</guilabel> 4609 (<filename>ImportJson.qml</filename>): 4610 Import recursively all tags of all files from a JSON file. 4611 </para></listitem> 4612 <listitem><para> 4613 <guilabel>Export Playlist Folder</guilabel> 4614 (<filename>ExportPlaylist.qml</filename>): 4615 Copy all files from a playlist into a folder and rename them according to 4616 their position. 4617 </para></listitem> 4618 <listitem><para> 4619 <guilabel>QML Console</guilabel> 4620 (<filename>QmlConsole.qml</filename>): 4621 Simple console to play with &kid3;'s QML API. 4622 </para></listitem> 4623 </itemizedlist> 4624 </para> 4625 4626 </sect1> 4627 4628 <sect1 id="qml-api"> 4629 <title>QML API</title> 4630 4631 <para> 4632 The API can be easily explored using the QML Console, which is available as an 4633 example script with a user interface. 4634 </para> 4635 4636 <sect2 id="qml-kid3script"> 4637 <title>Kid3Script</title> 4638 4639 <para> 4640 <classname>Kid3Script</classname> is a regular QML component located inside 4641 the plugin folder. You could use another QML component just as well. Using 4642 <classname>Kid3Script</classname> makes it easy to start the script function 4643 using the <function>onRun</function> signal handler. 4644 Moreover it offers some functions: 4645 4646 <programlisting> 4647 onRun: Signal handler which is invoked when the script is started 4648 tagv1, tagv2, tagv2v1: Constants for tag parameters 4649 script: Access to scripting functions 4650 configs: Access to configuration objects 4651 getArguments(): List of script arguments 4652 isStandalone(): true if the script was not started from within Kid3 4653 setTimeout(callback, delay): Starts callback after delay ms 4654 firstFile(): To first selected file 4655 nextFile(): To next selected file 4656 </programlisting> 4657 4658 </para> 4659 </sect2> 4660 4661 <sect2 id="qml-script"> 4662 <title>Scripting Functions</title> 4663 4664 <para> 4665 As &javascript; and therefore QML too has only a limited set of functions for 4666 scripting, the <function>script</function> object has some additional methods, 4667 for instance: 4668 </para> 4669 4670 <programlisting> 4671 script.properties(obj): String with Qt properties 4672 script.writeFile(filePath, data): Write data to file, true if OK 4673 script.readFile(filePath): Read data from file 4674 script.removeFile(filePath): Delete file, true if OK 4675 script.fileExists(filePath): true if file exists 4676 script.fileIsWritable(filePath): true if file is writable 4677 script.getFilePermissions(filePath): Get file permission mode bits 4678 script.setFilePermissions(filePath, modeBits): Set file permission mode bits 4679 script.classifyFile(filePath): Get class of file (folder "/", symlink "@", exe "*", 4680 file " ") 4681 script.renameFile(oldName, newName): Rename file, true if OK 4682 script.copyFile(source, dest): Copy file, true if OK 4683 script.makeDir(path): Create folder, true if OK 4684 script.removeDir(path): Remove folder, true if OK 4685 script.tempPath(): Path to temporary folder 4686 script.musicPath(): Path to music folder 4687 script.listDir(path, [nameFilters], [classify]): List folder entries 4688 script.system(program, [args], [msecs]): Synchronously start a system command, 4689 [exit code, standard output, standard error] if not timeout 4690 script.systemAsync(program, [args], [callback]): Asynchronously start a system 4691 command, callback will be called with [exit code, standard output, standard 4692 error] 4693 script.getEnv(varName): Get value of environment variable 4694 script.setEnv(varName, value): Set value of environment variable 4695 script.getQtVersion(): Qt version string, <abbrev>e.g.</abbrev> "5.4.1" 4696 script.getDataMd5(data): Get hex string of the MD5 hash of data 4697 script.getDataSize(data): Get size of byte array 4698 script.dataToImage(data, [format]): Create an image from data bytes 4699 script.dataFromImage(img, [format]): Get data bytes from image 4700 script.loadImage(filePath): Load an image from a file 4701 script.saveImage(img, filePath, [format]): Save an image to a file, true if OK 4702 script.imageProperties(img): Get properties of an image, map containing 4703 "width", "height", "depth" and "colorCount", empty if invalid image 4704 script.scaleImage(img, width, [height]): Scale an image, returns scaled image 4705 </programlisting> 4706 4707 </sect2> 4708 4709 <sect2 id="qml-app"> 4710 <title>Application Context</title> 4711 4712 <para> 4713 Using QML, a large part of the &kid3; functions are accessible. The API is 4714 similar to the one used for <link linkend="dbus-api">&DBus;</link>. For 4715 details, refer to the respective notes. 4716 </para> 4717 4718 <programlisting> 4719 app.openDirectory(path): Open folder 4720 app.unloadAllTags(): Unload all tags 4721 app.saveDirectory(): Save folder 4722 app.revertFileModifications(): Revert 4723 app.importTags(tag, path, fmtIdx): Import file 4724 app.importFromTags(tag, source, extraction): Import from tags 4725 app.importFromTagsToSelection(tag, source, extraction): Import from tags of selected files 4726 app.downloadImage(url, allFilesInDir): Download image 4727 app.exportTags(tag, path, fmtIdx): Export file 4728 app.writePlaylist(): Write playlist 4729 app.getPlaylistItems(path): Get items of a playlist 4730 app.setPlaylistItems(path, items): Set items of a playlist 4731 app.selectAllFiles(): Select all 4732 app.deselectAllFiles(): Deselect 4733 app.firstFile([select], [onlyTaggedFiles]): To first file 4734 app.nextFile([select], [onlyTaggedFiles]): To next file 4735 app.previousFile([select], [onlyTaggedFiles]): To previous file 4736 app.selectCurrentFile([select]): Select current file 4737 app.selectFile(path, [select]): Select a specific file 4738 app.getSelectedFilePaths([onlyTaggedFiles]): Get paths of selected files 4739 app.requestExpandFileList(): Expand all 4740 app.applyFilenameFormat(): Apply filename format 4741 app.applyTagFormat(): Apply tag format 4742 app.applyTextEncoding(): Apply text encoding 4743 app.numberTracks(nr, total, tag, [options]): Number tracks 4744 app.applyFilter(expr): Filter 4745 app.convertToId3v23(): Convert ID3v2.4.0 to ID3v2.3.0 4746 app.convertToId3v24(): Convert ID3v2.3.0 to ID3v2.4.0 4747 app.getFilenameFromTags(tag): Filename from tags 4748 app.getTagsFromFilename(tag): Filename to tags 4749 app.getAllFrames(tag): Get object with all frames 4750 app.getFrame(tag, name): Get frame 4751 app.setFrame(tag, name, value): Set frame 4752 app.getPictureData(): Get data from picture frame 4753 app.setPictureData(data): Set data in picture frame 4754 app.copyToOtherTag(tag): Tags to other tags 4755 app.copyTags(tag): Copy 4756 app.pasteTags(tag): Paste 4757 app.removeTags(tag): Remove 4758 app.playAudio(): Play 4759 app.readConfig(): Read configuration 4760 app.applyChangedConfiguration(): Apply configuration 4761 app.dirName: Folder name 4762 app.selectionInfo.fileName: File name 4763 app.selectionInfo.filePath: Absolute file path 4764 app.selectionInfo.detailInfo: Format details 4765 app.selectionInfo.tag(Frame.Tag_1).tagFormat: Tag 1 format 4766 app.selectionInfo.tag(Frame.Tag_2).tagFormat: Tag 2 format 4767 app.selectionInfo.formatString(tag, format): Substitute codes in format string 4768 app.selectFileName(caption, dir, filter, saveFile): Open file dialog to 4769 select a file 4770 app.selectDirName(caption, dir): Open file dialog to select a folder 4771 </programlisting> 4772 4773 <para> 4774 For asynchronous operations, callbacks can be connected to signals. 4775 </para> 4776 4777 <programlisting> 4778 function automaticImport(profile) { 4779 function onAutomaticImportFinished() { 4780 app.batchImporter.finished.disconnect(onAutomaticImportFinished) 4781 } 4782 app.batchImporter.finished.connect(onAutomaticImportFinished) 4783 app.batchImport(profile, tagv2) 4784 } 4785 4786 function renameDirectory(format) { 4787 function onRenameActionsScheduled() { 4788 app.renameActionsScheduled.disconnect(onRenameActionsScheduled) 4789 app.performRenameActions() 4790 } 4791 app.renameActionsScheduled.connect(onRenameActionsScheduled) 4792 app.renameDirectory(tagv2v1, format, false) 4793 } 4794 </programlisting> 4795 4796 </sect2> 4797 4798 <sect2 id="qml-configs"> 4799 <title>Configuration Objects</title> 4800 4801 <para> 4802 The different configuration sections are accessible via methods of 4803 <function>configs</function>. Their properties can be listed in the QML console. 4804 4805 <screen width="80"> 4806 script.properties(configs.networkConfig()) 4807 </screen> 4808 4809 Properties can be set: 4810 <screen width="80"> 4811 configs.networkConfig().useProxy = false 4812 </screen> 4813 </para> 4814 4815 <programlisting> 4816 configs.batchImportConfig() 4817 configs.exportConfig() 4818 configs.fileConfig() 4819 configs.filenameFormatConfig() 4820 configs.filterConfig() 4821 configs.findReplaceConfig() 4822 configs.guiConfig() 4823 configs.importConfig() 4824 configs.mainWindowConfig() 4825 configs.networkConfig() 4826 configs.numberTracksConfig() 4827 configs.playlistConfig() 4828 configs.renDirConfig() 4829 configs.tagConfig() 4830 configs.tagFormatConfig() 4831 configs.userActionsConfig() 4832 </programlisting> 4833 4834 </sect2> 4835 4836 </sect1> 4837 4838 </appendix> 4839 4840 &documentation.index; 4841 </book> 4842 <!-- 4843 Local Variables: 4844 mode: nxml 4845 End: 4846 -->