eyed3.plugins package

Submodules

eyed3.plugins.art module

class eyed3.plugins.art.ArtFile(file_path)[source]

Bases: object

image_data
mime_type
class eyed3.plugins.art.ArtPlugin(arg_parser)[source]

Bases: eyed3.plugins.LoaderPlugin

SUMMARY = 'Art for albums, artists, etc.'
DESCRIPTION = ''
NAMES = ['art']
start(args, config)[source]
handleDirectory(d, _)[source]
handleDone()[source]
eyed3.plugins.art.pilImage(source)[source]
eyed3.plugins.art.pilImageDetails(img)[source]
eyed3.plugins.art.md5Data(data)[source]
eyed3.plugins.art.md5File(file_name)[source]

Compute md5 hash for contents of file_name.

eyed3.plugins.classic module

class eyed3.plugins.classic.ClassicPlugin(arg_parser)[source]

Bases: eyed3.plugins.LoaderPlugin

SUMMARY = 'Classic eyeD3 interface for viewing and editing tags.'
DESCRIPTION = '\nAll PATH arguments are parsed and displayed. Directory paths are searched\nrecursively. Any editing options (--artist, --title) are applied to each file\nread.\n\nAll date options (-Y, --release-year excepted) follow ISO 8601 format. This is\n``yyyy-mm-ddThh:mm:ss``. The year is required, and each component thereafter is\noptional. For example, 2012-03 is valid, 2012--12 is not.\n'
NAMES = ['classic']
handleFile(f)[source]
printHeader(file_path)[source]
printAudioInfo(info)[source]
printTag(tag)[source]
handleRemoves(tag)[source]
handlePadding(tag)[source]
handleEdits(tag)[source]

eyed3.plugins.display module

class eyed3.plugins.display.Pattern(text=None, sub_patterns=None)[source]

Bases: object

output_for(audio_file)[source]
sub_patterns
static sub_pattern_classes(base_class)[source]
static pattern_class_parameters(pattern_class)[source]
class eyed3.plugins.display.TextPattern(text)[source]

Bases: eyed3.plugins.display.Pattern

SPECIAL_CHARACTERS = ['\\', '%', '$', ',', '(', ')', '=', 'n', 't']
SPECIAL_CHARACTERS_DESCRIPTIONS = ['\\', '%', '$', ',', '(', ')', '=', 'New line', 'Tab']
output_for(audio_file)[source]
class eyed3.plugins.display.ComplexPattern(name, parameters)[source]

Bases: eyed3.plugins.display.Pattern

TYPE = 'unknown'
NAMES = []
DESCRIPTION = ''
PARAMETERS = []
class ExpectedParameter(name, **kwargs)[source]

Bases: object

class ComplexPattern.Parameter(value, provided)[source]

Bases: object

ComplexPattern.output_for(audio_file)[source]
ComplexPattern.parameters
ComplexPattern.name
class eyed3.plugins.display.PlaceholderUsagePattern[source]

Bases: object

class eyed3.plugins.display.TagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.ComplexPattern

TYPE = 'tag'
class eyed3.plugins.display.ArtistTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['a', 'artist']
DESCRIPTION = 'Artist'
class eyed3.plugins.display.AlbumTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['A', 'album']
DESCRIPTION = 'Album'
class eyed3.plugins.display.AlbumArtistTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['b', 'album-artist']
DESCRIPTION = 'Album artist'
class eyed3.plugins.display.TitleTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['t', 'title']
DESCRIPTION = 'Title'
class eyed3.plugins.display.TrackTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['n', 'track']
DESCRIPTION = 'Track number'
class eyed3.plugins.display.TrackTotalTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['N', 'track-total']
DESCRIPTION = 'Total track number'
class eyed3.plugins.display.DiscTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['d', 'disc', 'disc-num']
DESCRIPTION = 'Disc number'
class eyed3.plugins.display.DiscTotalTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['D', 'disc-total']
DESCRIPTION = 'Total disc number'
class eyed3.plugins.display.GenreTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['G', 'genre']
DESCRIPTION = 'Genre'
class eyed3.plugins.display.GenreIdTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['genre-id']
DESCRIPTION = 'Genre ID'
class eyed3.plugins.display.YearTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['Y', 'year']
DESCRIPTION = 'Release year'
class eyed3.plugins.display.DescriptableTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

PARAMETERS = [description(None), language(None)]
class eyed3.plugins.display.CommentTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.DescriptableTagPattern

NAMES = ['c', 'comment']
PARAMETERS = [description(None), language(None)]
DESCRIPTION = 'First comment that matches description and language.'
class eyed3.plugins.display.AllCommentsTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.DescriptableTagPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['comments']
PARAMETERS = [description(None), language(None), output(Comment: [Description: #d] [Lang: #l]: #t), separation(\n)]
DESCRIPTION = 'All comments that are matching description and language (with output placeholders #d as description, #l as language & #t as text).'
class eyed3.plugins.display.AbstractDateTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

class eyed3.plugins.display.ReleaseDateTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.AbstractDateTagPattern

NAMES = ['release-date']
DESCRIPTION = 'Relase date'
class eyed3.plugins.display.OriginalReleaseDateTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.AbstractDateTagPattern

NAMES = ['original-release-date']
DESCRIPTION = 'Original Relase date'
class eyed3.plugins.display.RecordingDateTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.AbstractDateTagPattern

NAMES = ['recording-date']
DESCRIPTION = 'Recording date'
class eyed3.plugins.display.EncodingDateTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.AbstractDateTagPattern

NAMES = ['encoding-date']
DESCRIPTION = 'Encoding date'
class eyed3.plugins.display.TaggingDateTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.AbstractDateTagPattern

NAMES = ['tagging-date']
DESCRIPTION = 'Tagging date'
class eyed3.plugins.display.PlayCountTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['play-count']
DESCRIPTION = 'Play count'
class eyed3.plugins.display.PopularitiesTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['popm', 'popularities']
PARAMETERS = [output(Popularity: [email: #e] [rating: #r] [play count: #c]), separation(\n)]
DESCRIPTION = 'Popularities (with output placeholders #e as email, #r as rating & #c as count)'
class eyed3.plugins.display.BPMTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['bpm']
DESCRIPTION = 'BPM'
class eyed3.plugins.display.PublisherTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['publisher']
DESCRIPTION = 'Publisher'
class eyed3.plugins.display.UniqueFileIDTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['ufids', 'unique-file-ids']
PARAMETERS = [output(Unique File ID: [#o] : #i), separation(\n)]
DESCRIPTION = 'Unique File IDs (with output placeholders #o as owner & #i as unique id)'
class eyed3.plugins.display.LyricsTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.DescriptableTagPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['lyrics']
PARAMETERS = [description(None), language(None), output(Lyrics: [Description: #d] [Lang: #l]: #t), separation(\n)]
DESCRIPTION = 'All lyrics that are matching description and language (with output placeholders #d as description, #l as language & #t as text).'
class eyed3.plugins.display.TextsTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['txxx', 'texts']
PARAMETERS = [output(UserTextFrame: [Description: #d] #t), separation(\n)]
DESCRIPTION = 'User text frames (with output placeholders #d as description & #t as text)'
class eyed3.plugins.display.ArtistURLTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['artist-url']
DESCRIPTION = 'Artist URL'
class eyed3.plugins.display.AudioSourceURLTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['audio-source-url']
DESCRIPTION = 'Audio source URL'
class eyed3.plugins.display.AudioFileURLTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['audio-file-url']
DESCRIPTION = 'Audio file URL'
class eyed3.plugins.display.InternetRadioURLTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['internet-radio-url']
DESCRIPTION = 'Internet radio URL'
class eyed3.plugins.display.CommercialURLTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['commercial-url']
DESCRIPTION = 'Comercial URL'
class eyed3.plugins.display.PaymentURLTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['payment-url']
DESCRIPTION = 'Payment URL'
class eyed3.plugins.display.PublisherURLTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['publisher-url']
DESCRIPTION = 'Publisher URL'
class eyed3.plugins.display.CopyrightTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['copyright-url']
DESCRIPTION = 'Copyright URL'
class eyed3.plugins.display.UserURLsTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['user-urls']
PARAMETERS = [output(#i [Description: #d]: #u), separation(\n)]
DESCRIPTION = 'User URL frames (with output placeholders #i as frame id, #d as description & #u as url)'
class eyed3.plugins.display.ImagesTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['images', 'apic']
PARAMETERS = [output(#t Image: [Type: #m] [Size: #b bytes] #d), separation(\n)]
DESCRIPTION = 'Attached pictures (APIC)(with output placeholders #t as image type, #m as mime type, #s as size in bytes & #d as description)'
class eyed3.plugins.display.ImageURLsTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['image-urls']
PARAMETERS = [output(#t Image: [Type: #m] [URL: #u] #d), separation(\n)]
DESCRIPTION = 'Attached pictures URLs(with output placeholders #t as image type, #m as mime type, #u as URL & #d as description)'
class eyed3.plugins.display.ObjectsTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['objects', 'gobj']
PARAMETERS = [output(GEOB: [Size: #s bytes] [Type: #t] Description: #d | Filename: #f), separation(\n)]
DESCRIPTION = 'Objects (GOBJ)(with output placeholders #s as size, #m as mime type, #d as description and #f as file name)'
class eyed3.plugins.display.PrivatesTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['privates', 'priv']
PARAMETERS = [output(PRIV-Content: #b bytes | Owner: #o), separation(\n)]
DESCRIPTION = 'Privates (APIC) (with output placeholders #c as content, #b as number of bytes & #o as owner)'
class eyed3.plugins.display.MusicCDIdTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['music-cd-id', 'mcdi']
DESCRIPTION = 'Music CD Identification'
class eyed3.plugins.display.TermsOfUseTagPattern(name, parameters)[source]

Bases: eyed3.plugins.display.TagPattern

NAMES = ['terms-of-use']
DESCRIPTION = 'Terms of use'
class eyed3.plugins.display.FunctionPattern(name, parameters)[source]

Bases: eyed3.plugins.display.ComplexPattern

TYPE = 'function'
class eyed3.plugins.display.FunctionFormatPattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern

NAMES = ['format']
PARAMETERS = [text, bold(None), color(None)]
DESCRIPTION = 'Formats text bold and colored (grey, red, green, yellow, blue, magenta, cyan or white)'
class eyed3.plugins.display.FunctionNumberPattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern

NAMES = ['num', 'number-format']
PARAMETERS = [number, digits]
DESCRIPTION = 'Appends leading zeros'
class eyed3.plugins.display.FunctionFilenamePattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern

NAMES = ['filename', 'fn']
PARAMETERS = [basename(None)]
DESCRIPTION = 'File name'
class eyed3.plugins.display.FunctionFilesizePattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern

NAMES = ['filesize']
DESCRIPTION = 'Size of file'
class eyed3.plugins.display.FunctionTagVersionPattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern

NAMES = ['tag-version']
DESCRIPTION = 'Tag version'
class eyed3.plugins.display.FunctionLengthPattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern

NAMES = ['length']
DESCRIPTION = 'Length of aufio file'
class eyed3.plugins.display.FunctionMPEGVersionPattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['mpeg-version']
PARAMETERS = [output(MPEG#v\, Layer #l)]
DESCRIPTION = 'MPEG version (with output placeholders #v as version & #l as layer)'
class eyed3.plugins.display.FunctionBitRatePattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern

NAMES = ['bit-rate']
DESCRIPTION = 'Bit rate of aufio file'
class eyed3.plugins.display.FunctionSampleFrequencePattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern

NAMES = ['sample-freq']
DESCRIPTION = 'Sample frequence of aufio file in Hz'
class eyed3.plugins.display.FunctionAudioModePattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern

NAMES = ['audio-mode']
DESCRIPTION = 'Mode of aufio file: mono/stereo'
class eyed3.plugins.display.FunctionNotEmptyPattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern, eyed3.plugins.display.PlaceholderUsagePattern

NAMES = ['not-empty']
PARAMETERS = [text, output(#t), empty(None)]
DESCRIPTION = 'If condition is not empty (with output placeholder #t as text)'
class eyed3.plugins.display.FunctionRepeatPattern(name, parameters)[source]

Bases: eyed3.plugins.display.FunctionPattern

NAMES = ['repeat']
PARAMETERS = [text, count]
DESCRIPTION = 'Repeats text'
class eyed3.plugins.display.DisplayPlugin(arg_parser)[source]

Bases: eyed3.plugins.LoaderPlugin

NAMES = ['display']
SUMMARY = 'Tag Display'
DESCRIPTION = '\nPrints specific tag information.\n'
start(args, config)[source]
handleFile(f, *args, **kwargs)[source]
handleDone()[source]
exception eyed3.plugins.display.DisplayException(message)[source]

Bases: Exception

message
exception eyed3.plugins.display.PatternCompileException(message)[source]

Bases: Exception

message

eyed3.plugins.fixup module

eyed3.plugins.fixup.dirDate(d)[source]
class eyed3.plugins.fixup.FixupPlugin(arg_parser)[source]

Bases: eyed3.plugins.LoaderPlugin

NAMES = ['fixup']
SUMMARY = 'Performs various checks and fixes to directories of audio files.'
DESCRIPTION = '\nOperates on directories at a time, fixing each as a unit (album,\ncompilation, live set, etc.). All of these should have common dates,\nfor example but other characteristics may vary. The ``--type`` should be used\nwhenever possible, ``lp`` is the default.\n\nThe following test and fixes always apply:\n\n 1. Every file will be given an ID3 tag if one is missing.\n 2. Set ID3 v2.4.\n 3. Set a consistent album name for all files in the directory.\n 4. Set a consistent artist name for all files, unless the type is\n ``various`` in which case the artist may vary (but must exist).\n 5. Ensure each file has a title.\n 6. Ensure each file has a track # and track total.\n 7. Ensure all files have a release and original release date, unless the\n type is ``live`` in which case the recording date is set.\n 8. All ID3 frames of the following types are removed: USER, PRIV\n 9. All ID3 files have TLEN (track length in ms) set (or updated).\n 10. The album/dir type is set in the tag. Types of ``lp`` and ``various``\n do not have this field set since the latter is the default and the\n former can be determined during sync. In ID3 terms the value is in\n TXXX (description: ``eyeD3#album_type``).\n 11. Files are renamed as follows:\n - Type ``various``: ${track:num} - ${artist} - ${title}\n - Type ``single``: ${artist} - ${title}\n - All other types: ${artist} - ${track:num} - ${title}\n - A rename template can be supplied in --file-rename-pattern\n 12. Directories are renamed as follows:\n - Type ``live``: ${best_date:prefer_recording} - ${album}\n - All other types: ${best_date:prefer_release} - ${album}\n - A rename template can be supplied in --dir-rename-pattern\n\nAlbum types:\n\n - ``lp``: A traditinal "album" of songs from a single artist.\n No extra info is written to the tag since this is the default.\n - ``ep``: A short collection of songs from a single artist. The string \'ep\'\n is written to the tag\'s ``eyeD3#album_type`` field.\n - ``various``: A collection of songs from different artists. The string\n \'various\' is written to the tag\'s ``eyeD3#album_type`` field.\n - ``live``: A collection of live recordings from a single artist. The string\n \'live\' is written to the tag\'s ``eyeD3#album_type`` field.\n - ``compilation``: A collection of songs from various recordings by a single\n artist. The string \'compilation\' is written to the tag\'s\n ``eyeD3#album_type`` field. Compilation dates, unlike other types, may\n differ.\n - ``demo``: A demo recording by a single artist. The string \'demo\' is\n written to the tag\'s ``eyeD3#album_type`` field.\n - ``single``: A track that should no be associated with an album (even if\n it has album metadata). The string \'single\' is written to the tag\'s\n ``eyeD3#album_type`` field.\n\n'
start(args, config)[source]
handleFile(f, *args, **kwargs)[source]
handleDirectory(directory, _)[source]
handleDone()[source]

eyed3.plugins.genres module

class eyed3.plugins.genres.GenreListPlugin(arg_parser)[source]

Bases: eyed3.plugins.Plugin

SUMMARY = 'Display the full list of standard ID3 genres.'
DESCRIPTION = 'ID3 v1 defined a list of genres and mapped them to to numeric values so they can be stored as a single byte.\nIt is *recommended* that these genres are used although most newer software (including eyeD3) does not care.'
NAMES = ['genres']
start(args, config)[source]

eyed3.plugins.itunes module

class eyed3.plugins.itunes.Podcast(arg_parser)[source]

Bases: eyed3.plugins.LoaderPlugin

NAMES = ['itunes-podcast']
SUMMARY = 'Adds (or removes) the tags necessary for Apple iTunes to identify the file as a podcast.'
handleFile(f)[source]

eyed3.plugins.lameinfo module

class eyed3.plugins.lameinfo.LameInfoPlugin(arg_parser, cache_files=False, track_images=False)[source]

Bases: eyed3.plugins.LoaderPlugin

Constructor. If cache_files is True (off by default) then each AudioFile is appended to _file_cache during handleFile and the list is cleared by handleDirectory.

NAMES = ['lameinfo', 'xing']
SUMMARY = 'Outputs lame header (if one exists) for file.'
DESCRIPTION = "The 'lame' (or xing) header provides extra information about the mp3 that is useful to players and encoders but not officially part of the mp3 specification. Variable bit rate mp3s, for example, use this header.\n\nFor more details see `here <http://gabriel.mp3-tech.org/mp3infotag.html>`_"
printHeader(filePath)[source]
handleFile(f)[source]

eyed3.plugins.nfo module

class eyed3.plugins.nfo.NfoPlugin(arg_parser)[source]

Bases: eyed3.plugins.LoaderPlugin

NAMES = ['nfo']
SUMMARY = 'Create NFO files for each directory scanned.'
DESCRIPTION = 'Each directory scanned is treated as an album and a `NFO <http://en.wikipedia.org/wiki/.nfo>`_ file is written to standard out.\n\nNFO files are often found in music archives.'
handleFile(f)[source]
handleDone()[source]

eyed3.plugins.pymod module

class eyed3.plugins.pymod.PyModulePlugin(arg_parser)[source]

Bases: eyed3.plugins.LoaderPlugin

SUMMARY = 'Imports a Python module file and calls its functions for the the various plugin events.'
DESCRIPTION = "\nIf no module if provided (see -m/--module) a file named eyeD3mod.py in\nthe current working directory is imported. If any of the following methods\nexist they still be invoked:\n\ndef audioFile(audio_file):\n '''Invoked for every audio file that is encountered. The ``audio_file``\n is of type ``eyed3.core.AudioFile``; currently this is the concrete type\n ``eyed3.mp3.Mp3AudioFile``.'''\n pass\n\ndef audioDir(d, audio_files, images):\n '''This function is invoked for any directory (``d``) that contains audio\n (``audio_files``) or image (``images``) media.'''\n pass\n\ndef done():\n '''This method is invoke before successful exit.'''\n pass\n"
NAMES = ['pymod']
start(args, config)[source]
handleFile(f)[source]
handleDirectory(d, _)[source]
handleDone()[source]

eyed3.plugins.stats module

class eyed3.plugins.stats.Rule[source]

Bases: object

test()[source]
class eyed3.plugins.stats.Id3TagRules[source]

Bases: eyed3.plugins.stats.Rule

test(path, audio_file)[source]
class eyed3.plugins.stats.BitrateRule[source]

Bases: eyed3.plugins.stats.Rule

BITRATE_DEDUCTIONS = [(128, -20), (192, -10)]
test(path, audio_file)[source]
class eyed3.plugins.stats.FileRule[source]

Bases: eyed3.plugins.stats.Rule

test(path, audio_file)[source]
class eyed3.plugins.stats.ArtworkRule[source]

Bases: eyed3.plugins.stats.Rule

test(path, audio_file)[source]
class eyed3.plugins.stats.Id3FrameRules[source]

Bases: eyed3.plugins.stats.Rule

test(path, audio_file)[source]
class eyed3.plugins.stats.Stat(*args, **kwargs)[source]

Bases: collections.Counter

TOTAL = 'total'
compute(file, audio_file)[source]
report()[source]
percent(key)[source]
class eyed3.plugins.stats.AudioStat(*args, **kwargs)[source]

Bases: eyed3.plugins.stats.Stat

compute(audio_file)[source]
class eyed3.plugins.stats.FileCounterStat[source]

Bases: eyed3.plugins.stats.Stat

SUPPORTED_AUDIO = 'audio'
UNSUPPORTED_AUDIO = 'audio (unsupported)'
HIDDEN_FILES = 'hidden'
OTHER_FILES = 'other'
class eyed3.plugins.stats.MimeTypeStat(*args, **kwargs)[source]

Bases: eyed3.plugins.stats.Stat

class eyed3.plugins.stats.Id3VersionCounter[source]

Bases: eyed3.plugins.stats.AudioStat

class eyed3.plugins.stats.Id3FrameCounter(*args, **kwargs)[source]

Bases: eyed3.plugins.stats.AudioStat

class eyed3.plugins.stats.BitrateCounter[source]

Bases: eyed3.plugins.stats.AudioStat

class eyed3.plugins.stats.RuleViolationStat(*args, **kwargs)[source]

Bases: eyed3.plugins.stats.Stat

class eyed3.plugins.stats.Id3ImageTypeCounter[source]

Bases: eyed3.plugins.stats.AudioStat

class eyed3.plugins.stats.StatisticsPlugin(arg_parser)[source]

Bases: eyed3.plugins.LoaderPlugin

NAMES = ['stats']
SUMMARY = 'Computes statistics for all audio files scanned.'
handleFile(path)[source]
handleDone()[source]

eyed3.plugins.xep_118 module

class eyed3.plugins.xep_118.Xep118Plugin(arg_parser, cache_files=False, track_images=False)[source]

Bases: eyed3.plugins.LoaderPlugin

Constructor. If cache_files is True (off by default) then each AudioFile is appended to _file_cache during handleFile and the list is cleared by handleDirectory.

NAMES = ['xep-118']
SUMMARY = 'Outputs all tags in XEP-118 XML format. (see: http://xmpp.org/extensions/xep-0118.html)'
handleFile(f)[source]
getXML(audio_file)[source]

Module contents

eyed3.plugins.load(name=None, reload=False, paths=None)[source]

Returns the eyed3.plugins.Plugin class identified by name. If name is None then the full list of plugins is returned. Once a plugin is loaded its class object is cached, and future calls to this function will returned the cached version. Use reload=True to refresh the cache.

class eyed3.plugins.Plugin(arg_parser)[source]

Bases: eyed3.utils.FileHandler

Base class for all eyeD3 plugins

SUMMARY = 'eyeD3 plugin'

One line about the plugin

DESCRIPTION = ''

Detailed info about the plugin

NAMES = []

A list of at least one name for invoking the plugin, values [1:] are treated as alias

start(args, config)[source]

Called after command line parsing but before any paths are processed. The self.args argument (the parsed command line) and self.config (the user config, if any) is set here.

handleFile(f)[source]
handleDone()[source]

Called after all file/directory processing; before program exit. The return value is passed to sys.exit (None results in 0).

class eyed3.plugins.LoaderPlugin(arg_parser, cache_files=False, track_images=False)[source]

Bases: eyed3.plugins.Plugin

A base class that provides auto loading of audio files

Constructor. If cache_files is True (off by default) then each AudioFile is appended to _file_cache during handleFile and the list is cleared by handleDirectory.

handleFile(f, *args, **kwargs)[source]

Loads f and sets self.audio_file to an instance of eyed3.core.AudioFile or None if an error occurred or the file is not a recognized type.

The *args and **kwargs are passed to eyed3.core.load().

handleDirectory(d, _)[source]

Override to make use of self._file_cache. By default the list is cleared, subclasses should consider doing the same otherwise every AudioFile will be cached.

handleDone()[source]

If no audio files were loaded this simply prints “Nothing to do”.