Return the mime-type for filename. If with_encoding is True the encoding is included and a 2-tuple is returned, (mine, enc).
A wrapper around os.walk which handles exclusion patterns and unicode conversion.
Bases: object
A handler interface for eyed3.utils.walk() callbacks.
Called for each file walked. The file f is the full path and the return value is ignored. If the walk should abort the method should raise a StopIteration exception.
Function decorator to enforce unicode argument types. None is a valid argument value, in all cases, regardless of not being unicode. *args Positional arguments may be numeric argument index values (requireUnicode(1, 3) - requires argument 1 and 3 are unicode) or keyword argument names (requireUnicode(“title”)) or a combination thereof.
Format seconds (number of seconds) as a string representation. When short is False (the default) the format is:
HH:MM:SS.
Otherwise, the format is exacly 6 characters long and of the form:
1w 3d 2d 4h 1h 5m 1m 4s 15s
If total is not None it will also be formatted and appended to the result seperated by ‘ / ‘.
Number of bytes per KB (2^10)
Number of bytes per MB (2^20)
Number of bytes per GB (2^30)
Kilobytes abbreviation
Megabytes abbreviation
Gigabytes abbreviation
Format size (nuber of bytes) into string format doing KB, MB, or GB conversion where necessary.
When short is False (the default) the format is smallest unit of bytes and largest gigabytes; ‘234 GB’. The short version is 2-4 characters long and of the form
256b 64k 1.1G
Copy src_fp to dest_fp in chunk_sz byte increments.
Bases: argparse.ArgumentParser
Subclass of argparse.ArgumentParser that adds version and log level options.
This function returns a date of some sort, amongst all the possible dates (members called release_date, original_release_date, and recording_date of type eyed3.core.Date).
The order of preference is: 1) date of original release 2) date of this versions release 3) the recording date.
Unless prefer_recording_date is True in which case the order is 3, 1, 2.
None will be returned if no dates are available.
Album front cover.
Album back cover.
Other part of the album cover; liner notes, gate-fold, etc.
Artist/band logo.
Artist/band images.
Artist/band images.
A mapping of art types to lists of filename patterns (excluding file extension): type -> [file_pattern, ..].
A mapping of art types to ID3 APIC (image) types: type -> [apic_type, ..]
A mapping of ID3 art types to eyeD3 art types; the opposite of TO_ID3_ART_TYPES.
Accepts a string of bytes (chars) and returns an array of bits representing the bytes in big endian byte order. An optional max sz for each byte (default 8 bits/byte) which can be used to mask out higher bits.
Convert x, an array of “bits” (MSB first), to it’s decimal value.
This module is deprecated. Use eyed3.utils and eyed3.utils.console instead.
Bases: object
A class to display a spinner in the terminal.
It is designed to be used with the with statement:
with Spinner("Reticulating splines", "green") as s:
for item in enumerate(items):
s.next()
Bases: object
A class to display a progress bar in the terminal.
It is designed to be used either with the with statement:
with ProgressBar(len(items)) as bar:
for item in enumerate(items):
bar.update()
or as a generator:
for item in ProgressBar(items):
item.process()
Update the progress bar to the given value (out of the total given to the constructor).
Does a map operation while displaying a progress bar with percentage complete.
def work(i):
print(i)
ProgressBar.map(work, range(50))
Bases: logging.Logger
Base class for all loggers
Whenever a prompt occurs and this value is not None it can be exit to call sys.exit (see EXIT_STATUS) or raise to throw a RunttimeError, which can be caught if desired.
Bases: exceptions.RuntimeError
Raised when DISABLE_PROMPT is ‘raise’ and prompt is called.
Prompt user for imput, the prequest is in msg. If default is not None it will be displayed as the default and returned if not input is entered. The value None is only returned if required is False. The response is passed to type_ for conversion (default is unicode) before being returned. An optional list of valid responses can be provided in ``choices`.