plugins Package

plugins Package

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 = u'eyeD3 plugin'

One line about the plugin

DESCRIPTION = u''

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]
class eyed3.plugins.LoaderPlugin(arg_parser, cache_files=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”.

classic Module

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

Bases: eyed3.plugins.LoaderPlugin

SUMMARY = u'Classic eyeD3 interface for viewing and editing tags.'
DESCRIPTION = u'\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]
handleEdits(tag)[source]

examples Module

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

Bases: eyed3.plugins.Plugin

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

lameinfo Module

class eyed3.plugins.lameinfo.LameInfoPlugin(arg_parser, cache_files=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 = u'Outputs lame header (if one exists) for file.'
DESCRIPTION = u"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]

nfo Module

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

Bases: eyed3.plugins.LoaderPlugin

NAMES = ['nfo']
SUMMARY = u'Create NFO files for each directory scanned.'
DESCRIPTION = u'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]

statistics Module

class eyed3.plugins.statistics.Stat(*args, **kwargs)[source]

Bases: collections.Counter

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

Bases: eyed3.plugins.statistics.Stat

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

Bases: eyed3.plugins.statistics.Stat

class eyed3.plugins.statistics.MimeTypeStat(*args, **kwargs)[source]

Bases: eyed3.plugins.statistics.Stat

class eyed3.plugins.statistics.Id3VersionCounter[source]

Bases: eyed3.plugins.statistics.AudioStat

class eyed3.plugins.statistics.BitrateCounter[source]

Bases: eyed3.plugins.statistics.AudioStat

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

Bases: eyed3.plugins.LoaderPlugin

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

xep_118 Module

class eyed3.plugins.xep_118.Xep118Plugin(arg_parser, cache_files=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 = u'Outputs all tags in XEP-118 XML format. (see: http://xmpp.org/extensions/xep-0118.html)'
handleFile(f)[source]
getXML(audio_file)[source]

Table Of Contents

Previous topic

mp3 Package

Next topic

utils Package

This Page