kid3(1) Kid3 kid3(1) kid3, kid3-qt, kid3-cli - Kid3 ID3 Tagger kid3 [ | --help | --author | --version | --license | --desktopfile ] [...] kid3-qt [--portable] [ Qt] [...] kid3-cli [--portable] [--dbus] [ | -h | --help ] [-c 1] [-c 2...] [...] --portable kid3.ini . , . , , . kid3 --help . --author . --version . --license . --desktopfile . kid3-qt Qt . qt5options(7). kid3-cli --dbus D-Bus. -c . -c . . . kid3-cli, . -h|--help . Kid3 -- ID3v1 ID3v2 MP3. MP3, . , Ogg/Vorbis, Opus, DSF, FLAC, MPC, APE, MP4/AAC, MP2, Speex, TrueAudio, WavPack, WMA, WAV, AIFF tracker (MOD, S3M, IT, XM). Kid3 MP3. ID3 . . , ID3v1, ID3v2, Kid3 , ID3v2. , , , , . , . - , . , , , . . gnudb.org[1], MusicBrainz[2], Discogs[3], Amazon[4] . . , - . Kid3 Kid3 o ID3v1.1 o ID3v2.3 ID3v2.4 o o ID3v1 ID3v2 o MP3, Ogg/Vorbis, Opus, DSF, FLAC, MPC, APE, MP4/AAC, MP2, Speex, TrueAudio, WavPack, WMA, WAV AIFF o o o o o o o gnudb.org[1], MusicBrainz[2], Discogs[3], Amazon[4] o CSV, HTML, , Kover XML . CSV . Kid3. , , MP3 <> <>. << - >>, , One Hit Wonder - Let's Tag. << .mp3>>. , ( MP3 ) , (, MP3, , -, mkisofs). , -- . -- : 01 Intro.mp3 02 We Only Got This One.mp3 03 Outro.mp3 , Kid3. ( ) . . , . , : 1 . , , , . , , , <<2002>> <> . , -- . , , . , . . , ( ). One Hit Wonder - Let's Tag.m3u . Kid3 : , -- , 1, 2 3. . , , . o Alt+<-: (Command+[ macOS(R)) o Alt+->: (Command+] macOS(R)) o Ctrl+Shift+V: o Ctrl+C: o Ctrl+V: o Shift+Delete: o F2: o Insert: o Delete: , (typically *.mp3 *.ogg *.opus *.dsf *.flac *.mpc *.aac *.m4a *.m4b *.m4p *.mp4 *.mp2 *.spx *.tta *.wv *.wma *.wav *.aiff *.ape). . , . , , . , , , . . . . , . : , , , (V1, V2, V1V2 NO TAG; , ). . , . , . , , . : o : ( , Shift) o : o : o : o : , . . , . o : , . . o , Kid3. . , , , . , , . . , , . . . , . , , . , Shift, Ctrl Alt, ( macOS(R)). . , Ctrl+Shift+^ Ctrl+Shift+v ( macOS(R) Command Ctrl). Delete. , : ( ); . , . , . , . , , . . , . , , . , . , , . , (.) (..). , ... . , , . (MP3, Ogg, Opus, DSF, FLAC, MPC, APE, MP2, MP4, AAC, Speex, TrueAudio, WavPack, WMA, WAV, AIFF), , , . ( ). , , . , . , , , , . : o %s %{title} () o %a %{artist} o %l %{album} o %c %{comment} o %y %{year} o %t %{track} ( 01) o %t %{track.n} n ( 001 %{track.3}) o %T %{tracknumber} ( , 1) o %g %{genre} o %{ignore} . - , , %{albumartist}, %{discnumber.1}, %{bpm}, , %{popm}. . . -, . , , %{title} [%{subtitle}]. [], . , , %{title}%{" ["subtitle"]"}. , , . , . ( ) . , . . , . , . , . , , . , , : /%{track}(\d+) %{title}(.*). : 1, 2: , . : 1, 2: . , . , : o - / o / - - o / - - - o / - - o / - o // , , . , . 1 , , , , , . , , . , , . , , , . , , , , , 0 . , , . , , . , , . , . , . , , . , . . , , 1 2. , , , . 2: 1 2. , 2. , . : 1. . : . : . , 1. 2 , 1, . 2 , . . 2 , 1. , . 2 , . : , . , , . : . . . : . , . . . . 3 . . 3 : o MP3 ID3v1.1, ID3v2 (2.3.0 2.4.0), -- APE. APE . 3. APE . o INFO RIFF WAV 3, 1 ID3v1.1 . 2 ID3v2.4.0, WAV, INFO RIFF, , . o FLAC, , Vorbis. , FLAC, ID3v1 ID3v2, 1 3. ID3 FLAC TagLib, , , OggFlacMetadata . , 2. , , . ID3v2.3.0, ID3v2.4.0. , , ' , -- , . . , . . ID3v2, . . , . SYLT, , . , << 1>>, UTF16 ( UTF8 ID3v2.4.0). , ISO-8859-1. ' . . . , . , . : , . , , . , , ( ). , 00:00.00, , , , . , Delete . . , , . . . LRC. , . . . , . LRC . , , . SYLT, , , . ID3[5] . , . Kid3 , SYLT[6]. , , . (<<_>>) (<<#>>) . SYLT. SYLT ( 0A), -- . SYLT Kid3 , . , , , . , , ' , . , . ' . . o , , -> Embed Lyrics . o : Ctrl+C. o (..., , ), . o , (0:0:0.00). . o . o , Alt+A, . o , . , Delete . , . MP4 MP4, , .m4b , . , Kid3 <>, , . , , Mp4v2Metadata. , , , TaglibMetadata , MP4. <<>> -> ... ( Ctrl+O ) . , , . -> . -> ... ( Ctrl+D ) . , . -> ( F5 ) . . . -> ( Ctrl+S ) . . , . -> . , . , . -> ... freedb.org, MusicBrainz, Discogs, Amazon , . freedb.org , , : gnudb.org. . , www.gnudb.org[7]. . freedb.org CGI. . , . , . -- Kid3. Discogs Discogs. gnudb.org, ' , . RESTful Discogs , , . Discogs[8], (Settings/Developers, Generate new token). , . , , , , . , , , , . , , . Amazon Amazon/ gnudborg, ' , . , , , , . , , . MusicBrainz MusicBrainz. gnudb.org. MusicBrainz , MusicBrainz. , freedb. . MusicBrainz. . , . , MusicBrainz (, ) . , <<>>. , , . . . , MusicBrainz. . / , . , <> <>, , . CSV . . <>, <>. , . Kid3 , <>, . , << CSV>> << CSV>>. CSV , , . , <>, HTML freedb.org[9]. freedb, , . , , . , . . ( 1, 2 1 2) . . . , <>, , HTML. . . , , . , HTML , . , <>. . . , , , . , , . , Qt(TM), Perl. , <<(..)>>, . Kid3 . , . , - . o %s %{title} () o %a %{artist} o %l %{album} o %c %{comment} o %y %{year} o %t %{track} o %g %{genre} o %d %{duration} , ( ) .m3u : <<%{track}(\d+)\s+%{title}(\S[^\r\n]*)\.mp3[\r\n]>>. . kid3rc . . . . , . . , . , , . . , . , , ' . -- , . . ' , Ctrl . . ( 1, 2, 1 2) . . , . , - -, -. , , . . , , . . , . . . , . , , , . . , , . , << >>. , <<%{subtitle}>> <<%{comment}(.*)>> . . . , . , , , . , . ... . , , , ( ). <<%{__return}>> . QML. -> gnudb.org... freedb.org gnudb.org. ..., gnudb.org. -> Discogs... Discogs. ..., Discogs. -> Amazon... Amazon. ..., Amazon. -> MusicBrainz... MusicBrainz. ..., MusicBrainz. -> MusicBrainz... MusicBrainz. ..., MusicBrainz. -> ... , . -> ... -. , . , . ( 1, 2, 1 2) . , ' . (, MusicBrainz, Discogs, ). , . , . , , . . . , . , , , . , , . , . , . . , . . . -> ... . , / . . . %u{artist} %u{album}. , Kid3, . << >> Enter. , . - . . , , . , Kid3. . , , Kid3 URL, . , . , , . . , , , . , , ( , \1 ). . Amazon, Google . ' . -> ... . , . , . , . : ( <>), , . ( ). , . , . <<%>>. . , -- . , . o %s %{title} () o %a %{artist} o %l %{album} o %c %{comment} o %y %{year} o %t %{track} ( 01) o %t %{track.n} n ( 001 %{track.3}) o %T %{tracknumber} ( , 1) o %g %{genre} o %f %{file} o %p %{filepath} o %{modificationdate} o %{creationdate} o %u %{url} o %{dirname} o %d %{duration} o %D %{seconds} o %n %{tracks} o %e %{extension} o %O %{tag1} 1 (ID3v1.1 , ) o %o %{tag2} 2 (ID3v2.3.0, ID3v2.4.0, ID3v2.2.0, ID3v2.2.1, Vorbis, APE, MP4, ASF , ) o %b %{bitrate} / o %v %{vbr} VBR ( ID3v2.3 id3lib) o %r %{samplerate} o %m %{mode} ( ' ) o %h %{channels} (1 2) o %k %{codec} ( MPEG 1 Layer 3, MP4, Ogg Vorbis, FLAC, MPC, APE, ASF, AIFF, WAV) . <> . Kid3, . <>, . . , , . <> <> . <> HTML . <> , - Kover. <> , , . , <> . kid3rc . . ( 1 2) . , . . . -> ... . . , , , <<%{artist} - %{album}>> -- , . . . . . . . . , . , , , . , . . ( ). . M3U, PLS XSPF. , . , . , . , . . , <<%{track.3}>> (<<.3>> , ). . , <<%{genre}%{year}>> , . , , , , . , . . -> ( Ctrl+Q ) . <<>> -> ( Alt+A ) . -> ( Ctrl+Shift+A ) . -> . -> ( Alt+^ ) . -> ( Alt+v ) . -> ... ( Ctrl+F ) . , . -> ... (Ctrl+R) . , , , . , . , . , . <<>> -> , . , : , , (, , ). -> , . , : , , (, , ). -> , -> Kid3... -> <<>> -> << 2>> . UTF8, ID3v2.3.0 UTF16, UTF8. -> ... . , , . . : o %s %{title} () o %a %{artist} o %l %{album} o %c %{comment} o %y %{year} o %t %{track} ( 01) o %t %{track.n} n ( 001 %{track.3}) o %T %{tracknumber} ( , 1) o %g %{genre} o %{dirname} ( %{year" "}%{dirname} ) o %{max-year} , , <> o %{min-year} o %{unq-year} , , <>, . , , , . 1 2, 1 2. . . -> ... , , . . , . , . . . , , . , . , , . , . -> ... , , . , , . , , , , . o %s %{title} () o %a %{artist} o %l %{album} o %c %{comment} o %y %{year} o %t %{track} ( 01) o %t %{track.n} n ( 001 %{track.3}) o %T %{tracknumber} ( , 1) o %g %{genre} o %f %{file} o p %{filepath} o %e %{extension} o %O %{tag1} 1 (ID3v1.1 , ) o %o %{tag2} 2 (ID3v2.3.0, ID3v2.4.0, ID3v2.2.0, ID3v2.2.1, Vorbis, APE, MP4, ASF , ) o %b %{bitrate} / o %v %{vbr} VBR ( ID3v2.3 id3lib) o %r %{samplerate} o %m %{mode} ( ' ) o %h %{channels} (1 2) o %k %{codec} ( MPEG 1 Layer 3, MP4, Ogg Vorbis, FLAC, MPC, APE, ASF, AIFF, WAV) o %w %{marked} , 1, (, ), , o %1a %{artist}, ... 1 1 o %2a %2{artist}, ... 2 2 , - : o s1 equals s2: , s1 s2. o s1 contains s2: , s1 s2, s2 s1. o s matches re: , s re. , true, 1, , false, -- 0. (true) 1, true, on yes, (false) -- 0, false, off no. not, and, or ( ). . , : , , <<[]>> . , . , <> . not (%{filepath} contains "%{artist} - %{album}/%{track} %{title}") , . . 1 %{tag1} equals "" , 1. 2 %{tag2} equals "" , 2. ID3v2.3.0 %{tag2} equals "ID3v2.3.0" , ID3v2.3.0. ID3v2.4.0 %{tag2} equals "ID3v2.4.0" , ID3v2.4.0. 1 != 2 not (%1{title} equals %2{title} and %1{album} equals %2{album} and %1{artist} equals %2{artist} and %1{comment} equals %2{comment} and %1{year} equals %2{year} and %1{track} equals %2{track} and %1{genre} equals %2{genre}) , 1 2. 1 == 2 %1{title} equals %2{title} and %1{album} equals %2{album} and %1{artist} equals %2{artist} and %1{comment} equals %2{comment} and %1{year} equals %2{year} and %1{track} equals %2{track} and %1{genre} equals %2{genre} , 1 2 . %{title} equals "" or %{artist} equals "" or %{album} equals "" or %{year} equals "" or %{tracknumber} equals "" or %{genre} equals "" , (, , , , , ) . %{picture} equals "" , . not (%{marked} equals "") , , ID3, . . , , , <>, << >> <>> Enter. , : %{artist} <> , . . <<+>>, , <<->>, . , <>, <<[]>>. -> ID3v2.4 ID3v2.3 ID3v2.4, ID3v2.3. , TagLib, . . -> ID3v2.4 ID3v2.3 ID3v2.4, ID3v2.3. . -> . (/, , , , ), . , . , . , , , , . <<>> -> . -> , , . -> . -> , . , 1 2 -/+. -> ... . , , , . -> Kid3... , , , . , : 1, 2, 3 . , ID3v1.1 . ID3v1.1 30 , -- 28 . , . ID3v2. . . ID3v1 , ID3v1. ISO-8859-1, . , , , , ID3v1 ID3v2, Unicode. / , ID3v2 . , , ID3v2 , ID3v1. , , ID3v1, -- ( ID3v2.3). , <<>> <> <<(9)>>, , . , ID3v1, . , . WAV id3 , RIFF, ID3v2 WAV, <>, <>. , Kid3 , TagLib, -- WAV, ID3v2 WAV <>. , <> ( JRiver Media Center foobar2000), , . , , ID3v2, . : o o o o o o <</>> o o o o o ISO 8601 o -- 3 , A-G, b, #, m, o o ISO 639-2, 3 o ISRC 12 o , <<|>> o ID3 : o ID3 2.3.0[10] o ID3 2.4.0 -- [11] o ID3 2.4.0 -- [5] , ID3v2. ISO-8859-1, UTF16 UTF8. UTF8 ID3v2.3.0. , UTF16. ID3v2.4.0 . , ID3v2 -- 2.3.0 2.4.0. -- . . , 2, 5 <<05>>. Ogg/Vorbis FLAC. , . , , . , xmms <>, Amarok -- <>. Ogg/Vorbis , METADATA_BLOCK_PICTURE COVERART. -- , FLAC. COVERART Vorbis. . , ( ), , . , , . 131072 (128 ). , , , <>. 2. ID3v1.1 . , . , , -, . 2 , . 1 <> <>, . , . , , , . , 2. . . INFO RIFF. , . RIFF. <>, -- <>. , ' . , . . : , , , . . . , , , , , . , (<>), , . , \1, \2, ... , . , (, , Backspace). , , , . , . ' , . <<>> . ' . ' , . Kid3 , . ' , <> Vorbis <> INFO RIFF. ID3v2 , <> Popularimeter <>, . ID3v2, <> ' Windows Media Player Explorer, <> POPM <>. <>, . Kid3 Popularimeter, <> , <>. ', . , . . , , 1 5 , , . , , , . , , 1, 64, 128, 196, 255. , , , , Windows(R) Explorer. 1. +-------------------------+------+-------+--------+---------+---------+ | | 1 | 2 | 3 | 4 | 5 | +-------------------------+------+-------+--------+---------+---------+ |POPM | 1 | 64 | 128 | 196 | 255 | +-------------------------+------+-------+--------+---------+---------+ | | 1-31 | 32-95 | 96-159 | 160-223 | 224-255 | +-------------------------+------+-------+--------+---------+---------+ , Kid3 . , . , . (, ) , . (System) , , , . , . , . . , , , . , *//*, , */iTunes/*, iTunes . , . , ( ), . , . . , . , . 255 , -, 64 . , . , . , , , . , ( ). , . , . : o %F %{files} (, ) o %f %{file} o %uF %{urls} (, ) o %uf %{url} o %d %{directory} o %s %{title} () o %a %{artist} o %l %{album} o %c %{comment} o %y %{year} o %t %{track} ( 01) o %t %{track.n} n ( 001 %{track.3}) o %T %{tracknumber} ( , 1) o %g %{genre} o %b %{browser} o %q %{qmlpath} QML -- @separator -- . , @beginmenu @endmenu. Name @beginmenu. QML @qml. QML . %{qmlpath}/script/ ( Linux(R) /usr/share/kid3/qml/script/, Windows -- qml/script/ , macOS(R) -- kid3.app/Contents/Resources/qml/script/). - . QML , @qml @qmlview. QML , getArguments(). , QML QML. , %{browser}, , . , %{browser} . : %{browser} http://lyricwiki.org/%u{artist}:%u{title} LyricWiki[12]. <> %u{artist} %u{title} , URL %{artist} %{title}. . , Google[13]: %{browser} http://images.google.com/images?q=%u{artist}%20%u{album} 2, Google Amazon . . , <<>> . ID3v2, MP4, FLAC, Ogg ASF. , . , . - , . . . . , . , , . TaglibMetadata. , . , TaglibMetadata . , TagLib . o Id3libMetadata: id3lib[14] ID3v1.1 ID3v2.3 MP3, MP2, AAC. TagLib. o OggFlacMetadata: libogg[15], libvorbis, libvorbisfile[16] Ogg , , libFLAC++ libFLAC[17] FLAC. . o TaglibMetadata: TagLib[18], . , Kid3. o Mp4v2Metadata: mp4v2[19] Kid3 M4A. , M4A TagLib. . . . o AmazonImport: Amazon.... o DiscogsImport: Discogs.... o FreedbImport: gnudb.org.... o MusicBrainzImport: MusicBrainz.... o AcoustidImport: MusicBrainz..., Chromaprint[20] libav[21]. , , . . Kid3. <<>> -> Kid3 . -> Kid3 Kid3. kid3-cli kid3-cli Kid3. , . , , . . -c. , . , . -, kid3-cli . . . help [-] - , . timeout [ | default | off | ] . , . 10 ls albumart, 60 autoimport filter 3 . , , , . exit [force] . , force. cd [] , . , . , , , . pwd . ls . Kid3. ' . o > . o * . o 1 1; , <<->>. o 2 2; , <<->>. o 3 3; , <<->>. kid3-cli> ls 1-- 01 Intro.mp3 > 12- 02 We Only Got This One.mp3 *1-- 03 Outro.mp3 1, 2 . . save select [ | all | none | first | previous | next | ... ] , select all. , select none. , select first, select next ( ) select previous ( ). . , , select *.mp3 MP3 . kid3-cli> select first kid3-cli> ls > 1-- 01 Intro.mp3 12- 02 We Only Got This One.mp3 *1-- 03 Outro.mp3 kid3-cli> select next kid3-cli> ls 1-- 01 Intro.mp3 > 12- 02 We Only Got This One.mp3 *1-- 03 Outro.mp3 kid3-cli> select *.mp3 kid3-cli> ls > 1-- 01 Intro.mp3 > 12- 02 We Only Got This One.mp3 >*1-- 03 Outro.mp3 tag [- ] ' -, , -- 1, 2 3. , , . 12, 2, , 1, 2 ; 2. - 1, 2 3, . , . get [ | all | - ] [-] ( all). <<*>>. kid3-cli> get : MPEG 1 Layer 3 192 kbps 44100 Hz Joint Stereo : 01 Intro.mp3 1: ID3v1.1 Intro One Hit Wonder Let's Tag 2013 1 Pop kid3-cli> get title Intro , get picture:'///.jpg' LRC, get SYLT:'///_.lrc' , get POPM.Email Email Popularimeter. , . , Vorbis get performer[0], -- get performer[1]. <> , . , get artist.selected 1, , 0, . <> <>, , ( 0 5). <> . set {-} {-} [-] . - , . kid3-cli> set remixer 'O.H. Wonder' , set picture:'///.jpg' ' ' LRC, set SYLT:'///_.lrc' ' ' , . , Popularimeter, set POPM.Counter 5 , TXXX <>, Popularimeter ( ). TXXX kid3-cli. , TXXX <>, . kid3-cli> set rating "" kid3-cli> set TXXX.Description rating kid3-cli> set rating 5 POPM, , set rating 5 POPM, TXXX. set TXXX.Text 5, , TXXX. . , , Vorbis. : kid3-cli> set performer[0] 'Liza don Getti (soprano)' kid3-cli> set performer[1] 'Joe Barr (piano)' , , <>. , . , set '*.selected' 0. , , set artist.selected 1, . <> <>, , ( 0 5). <>. <> , ' , . , kid3-cli -c "set ratingstars 2" *, for f in *; do kid3-cli -c "set ratingstars 2" "$f"; done. revert ( , ). import {} {-} [-] - (, "CSV unquoted", . ). tags , . -, , . . , tagsel tags. %{__return}(.+). autoimport [-] [-] - (. ; , "All"). albumart {} [all] . (, Amazom) , . , set. kid3-cli> albumart http://www.amazon.com/Versus-World-Amon-Amarth/dp/B000078DOC export {} {-} [-] - (, "CSV unquoted", ). playlist , , . . filenameformat , , . . tagformat , , . . textencoding , , . . renamedir [] [ | create | rename | dryrun ] [-] (, %{artist} - %{album}, . ). , , . rename; create. . , , dryrun. numbertracks [-] [-] , - (1, ). filter [ | - | - ] , , -. (, << >>) , . . kid3-cli> filter '%{title} contains "tro"' /home/urs/One Hit Wonder - Let's Tag + 01 Intro.mp3 - 02 We Only Got This One.mp3 + 03 Outro.mp3 kid3-cli> ls 1-- 01 Intro.mp3 1-- 03 Outro.mp3 kid3-cli> filter All /home/urs/One Hit Wonder - Let's Tag + 01 Intro.mp3 + 02 We Only Got This One.mp3 + 03 Outro.mp3 kid3-cli> ls 1-- 01 Intro.mp3 12- 02 We Only Got This One.mp3 1-- 03 Outro.mp3 ID3v2.3 ID3v2.4 to24 ID3v2.4 ID3v2.3 to23 fromtag [] [-] . : fromtag '%{track} - %{title}' 1. , , . totag [] [-] . : totag '%{albumartist} - %{album}/%{track} %{title}' 2. , , . , . syncto {-} . , ID3v2 ID3v1, syncto 2. copy [-] . , paste. , <> set. , , : set '*.selected' 0 set discnumber.selected 1 set copyright.selected 1 copy paste [-] copy . remove [-] . . , copy. Kid3 config [] [] . , . , . , . . , . , . , , , . JSON, . QML execute [@qml] {} [] QML . @qml . @qml, QML . , export.csv . kid3-cli -c "execute @qml /usr/share/kid3/qml/script/ExportCsv.qml export.csv" //// export.csv ExportCsv.qml, //// kid3-cli. , . , kid3-cli -c, , . , , . UNIX(R) , Windows . , -- . , , : kid3-cli -c "set title 'I\'ll be there for you'" /// : kid3-cli -c "autoimport 'Cover Art'" /// MP3 : kid3-cli -c "set comment '' 1" -c "set comment '' 2" \ -c "tagformat 1" -c "tagformat 2" ////*.mp3 2, 1, 2 , , : kid3-cli -c autoimport -c "syncto 1" -c fromtag -c playlist \ ////*.mp3 ID3v2.4.0 ID3v2.3.0 : kid3-cli -c "filter 'ID3v2.4.0 Tag'" -c "select all" -c to23 \ -c "set arranger ''" /// Python kid3-cli iTunNORM iTunes . #!/usr/bin/env python3 # Generate iTunes Sound Check from ReplayGain. import os, sys, subprocess def rg2sc(dirpath): for root, dirs, files in os.walk(dirpath): for name in files: if name.endswith(('.mp3', '.m4a', '.aiff', '.aif')): fn = os.path.join(root, name) rg = subprocess.check_output([ 'kid3-cli', '-c', 'get "replaygain_track_gain"', fn]).strip() if rg.endswith(b' dB'): rg = rg[:-3] try: rg = float(rg) except ValueError: print('Value %s of %s in not a float' % (rg, fn)) continue sc = (' ' + ('%08X' % int((10 ** (-rg / 10)) * 1000) )) * 10 subprocess.call([ 'kid3-cli', '-c', 'set iTunNORM "%s"' % sc, fn]) if __name__ == '__main__': rg2sc(sys.argv[1]) JSON kid3-cli, JSON. JSON, JSON. . <>, JSON-RPC, <> <> . , , <> , ( ) <>. ' <>, , kid3-cli . , ' <> <> <>, -- JSON-RPC. kid3-cli> {"method":"set","params":["artist","An Artist"]} {"result":null} kid3-cli> {"method":"get","params":["artist",2]} {"result":"An Artist"} kid3-cli> {"method": "get", "params": ["artist"]} { "result": "An Artist" } kid3-cli> {"jsonrpc":"2.0","id":"123","method":"get","params":["artist"]} {"id":"123","jsonrpc":"2.0","result":"An Artist"} Kid3 Urs Fleisch : .PP FDL[22] .PP GPL[23] Kid3 Kid3 https://kid3.kde.org. Kid3 Qt(TM)[24]. KDE[25] , ', Kid3 , Qt(TM). Kid3 , , GNU/Linux(R), Windows(R) macOS(R). Ogg/Vorbis libogg[15], libvorbis libvorbisfile[16]. FLAC -- libFLAC++ libFLAC[17]. MP3 id3lib[14]. TagLib[18]. Opus, MPC, APE, MP2, Speex, TrueAudio, WavPack, WMA, WAV, AIFF tracker. Chromaprint[20] libav[21]. Kid3 Linux(R). Windows(R) macOS(R). https://kid3.kde.org. Kid3 KDE . KDE Kid3 Qt(TM), . KDE, % cmake . % make % make install Qt(TM) KDE, cmake. , Kid3 . . , , , cmake. -DWITH_TAGLIB:BOOL=ON -DWITH_MP4V2:BOOL=OFF -DWITH_ID3LIB:BOOL=ON -DWITH_CHROMAPRINT:BOOL=ON -DWITH_VORBIS:BOOL=ON -DWITH_FLAC:BOOL=ON . OFF. Kid3 Qt(TM), KDE, cmake -DWITH_APPS=Qt. KDE Qt(TM), : -DWITH_APPS="Qt;KDE". Qt(TM), -DQT_QMAKE_EXECUTABLE=///qmake. RPM kid3.spec. Debian build.sh deb. Qt(TM) Windows(R) macOS(R). Kid3 build.sh. KDE .config/kid3rc, -- .local/share/kid3/kid3staterc.. Qt(TM) .config/Kid3/Kid3.conf. Windows(R) . macOS(R) -- plist. KID3_CONFIG_FILE. D-Bus D-Bus Linux(R) Kid3 D-Bus. - ' D-Bus (, Python) Kid3. 2 <> : dbus-send --dest=org.kde.kid3 --print-reply=literal \ /Kid3 org.kde.Kid3.setFrame int32:2 string:'Artist' \ string:'One Hit Wonder' , , Qt(TM) qdbus ( qdbusviewer): qdbus org.kde.kid3 /Kid3 setFrame 2 Artist \ 'One Hit Wonder' Python import dbus kid3 = dbus.SessionBus().get_object( 'org.kde.kid3', '/Kid3') kid3.setFrame(2, 'Artist', 'One Hit Wonder') Perl use Net::DBus; $kid3 = Net::DBus->session->get_service( "org.kde.kid3")->get_object( "/Kid3", "org.kde.Kid3"); $kid3->setFrame(2, "Artist", "One Hit Wonder"); D-Bus D-Bus org.kde.Kid3.xml. Kid3 : boolean openDirectory(string ); .PP .RE true, . , unloadAllTags(void); boolean save(void); true, . , string getErrorMessage(void); . revert(void); boolean batchImport(int32 , string ); .PP ( 0 1, 1 2) .RE .PP , .RE boolean importFromFile(int32 , string , int32 ); .PP (1 1, 2 2) .RE .PP .RE .PP .RE true, . importFromTags(int32 , string , string ); .PP (1 1, 2 2) .RE .PP - .RE .PP - .RE array importFromTagsToSelection(int32 , string , string ); (1 1, 2 2) .RE .PP - .RE .PP - .RE .PP <<%{__return}(.+)>> .RE downloadAlbumArt(string , boolean ); .RE .PP true, .RE boolean exportToFile(int32 , string , int32 ); .RE .PP true, . boolean createPlaylist(void); true, . array getPlaylistItems(string ); - . boolean setPlaylistItems(string , array ); true, , false, . quit(void); selectAll(void); deselectAll(void); boolean firstFile(void); true, . boolean previousFile(void); true, . boolean nextFile(void); true, . boolean selectFirstFile(void); true, . boolean selectPreviousFile(void); true, . boolean selectNextFile(void); true, . boolean selectCurrentFile(void); true, . , boolean expandDirectory(void); , getFileName() <>. true, . applyFilenameFormat(void); applyTagFormat(void); applyTextEncoding(void); boolean setDirNameFromTag(int32 , string , boolean ); true, . , , getErrorMessage(). numberTracks(int32 , int32 ); filter(string ); ID3v2.3 ID3v2.4 convertToId3v24(void); ID3v2.4 ID3v2.3 convertToId3v23(void); true, . string getDirectoryName(void); . string getFileName(void); , <>, . setFileName(string ); . , setFileNameFormat(string ); setFileNameFromTag(int32 ); string getFrame(int32 , string ); , , , , name. : <//>>. . : <//>>. . boolean setFrame(int32 , string , string ); 2 (tagMask 2), name, . value , . , , name. : <//>>. <//>>. true, . array of string getTag(int32 ); . getInformation(void); Format, Bitrate, Samplerate, Channels, Duration, Channel Mode, VBR, Tag 1, Tag 2. , . . setTagFromFileName(int32 ); setTagFromOtherTag(int32 ); copyTag(int32 ); pasteTag(int32 ); removeTag(int32 tagMask); reparseConfiguration(void); . playAudio(void); QML QML QML . . , , . QML JavaScript. : import Kid3 1.0 Kid3Script { onRun: { console.log("Hello world, folder is", app.dirName) Qt.quit() } } ///Example.qml, : @qml ///Example.qml QML. . QML . . , QML qml (, qml -apptype widget -I /usr/lib/kid3/plugins/imports ///Example.qml) Qt. , kid3-cli QML execute. kid3-cli -c "execute @qml ///Example.qml" 2 , : import Kid3 1.0 Kid3Script { onRun: { app.firstFile() do { if (app.selectionInfo.tag(Frame.Tag_2).tagFormat) { console.log(app.getFrame(tagv2, "title")) } } while (app.nextFile()) } } , . . , , . 1 , . . import Kid3 1.0 Kid3Script { onRun: { function doWork() { if (app.selectionInfo.tag(Frame.Tag_2).tagFormat) { console.log(app.getFrame(tagv2, "title")) } if (!app.nextFile()) { Qt.quit() } else { setTimeout(doWork, 1) } } app.firstFile() doWork() } } app.firstFile() app.nextFile(), . , firstFile() nextFile(). Kid3Script. . import Kid3 1.1 Kid3Script { onRun: { function doWork() { if (app.selectionInfo.tag(Frame.Tag_2).tagFormat) { app.setFrame(tagv2, "*.selected", false) app.setFrame(tagv2, "discnumber.selected", true) app.setFrame(tagv2, "copyright.selected", true) app.copyTags(tagv2) } if (!nextFile()) { Qt.quit() } else { setTimeout(doWork, 1) } } firstFile() doWork() } } Kid3 . o ReplayGain to SoundCheck (ReplayGain2SoundCheck.qml): iTunNORM SoundCheck . o Resize Album Art (ResizeAlbumArt.qml): , 500x500 . o Extract Album Art (ExtractAlbumArt.qml): . o Embed Album Art (EmbedAlbumArt.qml): . o Embed Lyrics (EmbedLyrics.qml): . o Text Encoding ID3v1 (ShowTextEncodingV1.qml): ID3v1, . o ID3v1 to ASCII (Tag1ToAscii.qml): ID3v1 ASCII. o English Title Case (TitleCase.qml): . o (RewriteTags.qml): . o Export CSV (ExportCsv.qml): CSV. o Import CSV (ImportCsv.qml): CSV. o Export JSON (ExportJson.qml): JSON. o Import JSON (ImportJson.qml): JSON. o Export Playlist Folder (ExportPlaylist.qml): . o QML (QmlConsole.qml): QML Kid3. QML QML, . Kid3Script Kid3Script -- QML, . - QML. Kid3Script onRun. , : onRun: , tagv1, tagv2, tagv2v1: script: configs: ' getArguments(): isStandalone(): true, Kid3 setTimeout(callback, delay): , firstFile(): nextFile(): JavaScript, QML, . ' script , : script.properties(obj): Qt script.writeFile(filePath, data): ; true, script.readFile(filePath): script.removeFile(filePath): ; true, script.fileExists(filePath): true, script.fileIsWritable(filePath): true, script.getFilePermissions(filePath): script.setFilePermissions(filePath, modeBits): script.classifyFile(filePath): ( -- <>, -- <<@>>, -- <<*>>, -- << >>) script.renameFile(oldName, newName): ; true, script.copyFile(source, dest): ; true, script.makeDir(path): ; true, script.removeDir(path): ; true, script.tempPath(): script.musicPath(): script.listDir(path, [nameFilters], [classify]): script.system(program, [], []): , [ , , ], script.systemAsync(program, [], [ ]): ; [ , , ] script.getEnv(varName): script.setEnv(varName, value): script.getQtVersion(): Qt, <<5.4.1>> script.getDataMd5(data): MD5 script.getDataSize(data): script.dataToImage(data, []): script.dataFromImage(img, []): script.loadImage(filePath): script.saveImage(img, filePath, []): ; true, script.imageProperties(img): ; , <>, <>, <> <>; , script.scaleImage(, , []): ; QML Kid3. D-Bus. , . app.openDirectory(path): app.unloadAllTags(): app.saveDirectory(): app.revertFileModifications(): app.importTags(tag, path, fmtIdx): app.importFromTags(tag, source, extraction): app.importFromTagsToSelection(tag, source, extraction): app.downloadImage(url, allFilesInDir): app.exportTags(tag, path, fmtIdx): app.writePlaylist(): app.getPlaylistItems(path): app.setPlaylistItems(path, items): app.selectAllFiles(): app.deselectAllFiles(): app.firstFile([select], [onlyTaggedFiles]): app.nextFile([select], [onlyTaggedFiles]): app.previousFile([select], [onlyTaggedFiles]): app.selectCurrentFile([select]): app.selectFile(path, [select]): app.getSelectedFilePaths([onlyTaggedFiles]): app.requestExpandFileList(): app.applyFilenameFormat(): app.applyTagFormat(): app.applyTextEncoding(): app.numberTracks(nr, total, tag, []): app.applyFilter(expr): app.convertToId3v23(): ID3v2.4.0 ID3v2.3.0 app.convertToId3v24(): ID3v2.3.0 ID3v2.4.0 app.getFilenameFromTags(tag): app.getTagsFromFilename(tag): app.getAllFrames(tag): ' app.getFrame(tag, name): app.setFrame(tag, name, value): app.getPictureData(): app.setPictureData(data): app.copyToOtherTag(tag): app.copyTags(tag): app.pasteTags(tag): app.removeTags(tag): app.playAudio(): app.readConfig(): app.applyChangedConfiguration(): app.dirName: app.selectionInfo.fileName: app.selectionInfo.filePath: app.selectionInfo.detailInfo: app.selectionInfo.tag(Frame.Tag_1).tagFormat: 1 app.selectionInfo.tag(Frame.Tag_2).tagFormat: 2 app.selectionInfo.formatString(tag, format): app.selectFileName(caption, dir, filter, saveFile): app.selectDirName(caption, dir): ' . function automaticImport(profile) { function onAutomaticImportFinished() { app.batchImporter.finished.disconnect(onAutomaticImportFinished) } app.batchImporter.finished.connect(onAutomaticImportFinished) app.batchImport(profile, tagv2) } function renameDirectory(format) { function onRenameActionsScheduled() { app.renameActionsScheduled.disconnect(onRenameActionsScheduled) app.performRenameActions() } app.renameActionsScheduled.connect(onRenameActionsScheduled) app.renameDirectory(tagv2v1, format, false) } ' configs. QML. script.properties(configs.networkConfig()) : configs.networkConfig().useProxy = false configs.batchImportConfig() configs.exportConfig() configs.fileConfig() configs.filenameFormatConfig() configs.filterConfig() configs.findReplaceConfig() configs.guiConfig() configs.importConfig() configs.mainWindowConfig() configs.networkConfig() configs.numberTracksConfig() configs.playlistConfig() configs.renDirConfig() configs.tagConfig() configs.tagFormatConfig() configs.userActionsConfig() Urs Fleisch (C) 2024 Urs Fleisch FDL 1. gnudb.org http://gnudb.org 2. MusicBrainz http://musicbrainz.org 3. Discogs http://discogs.com 4. Amazon http://www.amazon.com 5. ID3 http://id3.org/id3v2.4.0-frames 6. SYLT http://www.compuphase.com/software_sylteditor.htm 7. www.gnudb.org http://www.gnudb.org 8. Discogs https://www.discogs.com/ 9. freedb.org http://freedb.org 10. ID3 2.3.0 http://id3.org/id3v2.3.0 11. ID3 2.4.0 -- http://id3.org/id3v2.4.0-structure 12. LyricWiki http://www.lyricwiki.org 13. Google http://www.google.com 14. id3lib http://id3lib.sourceforge.net 15. libogg http://xiph.org/ogg/ 16. libvorbis, libvorbisfile http://xiph.org/vorbis/ 17. libFLAC++ libFLAC http://flac.sourceforge.net 18. TagLib http://taglib.github.io/ 19. mp4v2 https://mp4v2.org/ 20. Chromaprint http://acoustid.org/chromaprint 21. libav http://libav.org/ 22. FDL http://www.gnu.org/licenses/licenses.html#FDL 23. GPL http://www.gnu.org/licenses/licenses.html#GPL 24. Qt(TM) https://www.qt.io 25. KDE http://www.kde.org 3.9.5 24 2024 kid3(1)