Module Expr Str Import alias Import alias ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore TupleLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad Assign NameStore AttributeLoad NameLoad attr Return Call AttributeLoad SubscriptLoad SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Slice Num attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad If BoolOpAnd Call NameLoad AttributeLoad NameLoad attr NameLoad CompareIs NameLoad NameLoad body Return AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Str Str Str Str Str Str Str Str Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Return SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Return CompareIn Call AttributeLoad SubscriptLoad SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Slice Num attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad CompareIsNot SubscriptLoad NameLoad Index Str NameLoad body Return NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str If CompareEq Call NameLoad NameLoad Num body Return NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body If CompareIn NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return NameLoad Assign NameStore Call AttributeLoad SubscriptLoad SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Slice Num attr If CompareGt Call NameLoad NameLoad Num body For NameStore NameLoad body If CompareIn NameLoad AttributeLoad NameLoad attr body Return Call NameLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list
N/A N/A 
The base module provides a base :class:`Base` class for all objects that
are tracked by Elodie. The Base class provides some base functionality used
by all the media types, but isn't itself used to represent anything. Its
sub-classes (:class:`~elodie.media.audio.Audio`,
:class:`~elodie.media.photo.Photo`, :class:`~elodie.media.video.Video`, and
:class:`~elodie.media.text.Text`)
are used to represent the actual files.

.. moduleauthor:: Jaisen Mathai <jaisen@jmathai.com>
 N/A mimetypes N/A os Base N/A object N/A N/A The base class for all media objects.

    :param str source: The fully qualified path to the video file.
     N/A __name__ Base N/A extensions N/A __init__ N/A N/A self source N/A None N/A N/A N/A self source source N/A N/A N/A self reset_cache N/A format_metadata N/A N/A self N/A kwargs N/A N/A Method to consistently return a populated metadata dictionary.

        :returns: dict
         N/A get_album N/A N/A self N/A N/A N/A Base method for getting an album

        :returns: None
         N/A None N/A get_file_path N/A N/A self N/A N/A N/A Get the full path to the video.

        :returns: string
         N/A N/A self source N/A get_coordinate N/A N/A self type N/A N/A N/A None N/A get_extension N/A N/A self N/A N/A N/A Get the file extension as a lowercased string.

        :returns: string or None for a non-video
         N/A N/A N/A N/A self is_valid N/A N/A None N/A source N/A self source N/A N/A N/A N/A N/A N/A N/A N/A os path splitext source N/A 1 N/A 1 lower N/A get_metadata N/A N/A self update_cache N/A False N/A N/A Get a dictionary of metadata for any file.

        All keys will be present and have a value of None if not obtained.

        :returns: dict or None for non-text files
         N/A N/A N/A N/A self is_valid N/A N/A None N/A N/A N/A isinstance N/A self metadata dict N/A update_cache False N/A N/A N/A self metadata N/A source N/A self source N/A N/A self metadata N/A date_taken latitude longitude album title mime_type base_name extension directory_path N/A N/A self get_date_taken N/A N/A self get_coordinate latitude N/A N/A self get_coordinate longitude N/A N/A self get_album N/A N/A self get_title N/A N/A self get_mimetype N/A N/A N/A N/A os path splitext N/A N/A N/A os path basename source N/A 0 N/A N/A self get_extension N/A N/A N/A os path dirname source N/A N/A self metadata N/A get_mimetype N/A N/A self N/A N/A N/A Get the mimetype of the file.

        :returns: str or None for a non-video
         N/A N/A N/A N/A self is_valid N/A N/A None N/A source N/A self source N/A mimetype N/A N/A mimetypes guess_type source N/A N/A mimetype None N/A N/A None N/A N/A mimetype N/A 0 N/A get_title N/A N/A self N/A N/A N/A Base method for getting the title of a file

        :returns: None
         N/A None N/A is_valid N/A N/A self N/A N/A N/A Check the file extension against valid file extensions.

        The list of valid file extensions come from self.extensions.

        :returns: bool
         N/A source N/A self source N/A N/A N/A N/A N/A N/A N/A N/A N/A os path splitext source N/A 1 N/A 1 lower N/A self extensions N/A reset_cache N/A N/A self N/A N/A N/A Resets any internal cache
         N/A N/A self metadata None N/A set_album N/A N/A self name N/A N/A N/A Base method for setting the album of a file

        :returns: None
         N/A None N/A set_album_from_folder N/A N/A self N/A N/A N/A Set the album attribute based on the leaf folder name

        :returns: bool
         N/A metadata N/A N/A self get_metadata N/A N/A N/A N/A isinstance metadata dict N/A N/A metadata N/A album None N/A N/A False N/A folder N/A N/A N/A os path basename N/A metadata N/A directory_path N/A N/A N/A len folder 0 N/A N/A False N/A N/A N/A self set_album folder N/A True N/A set_metadata_basename N/A N/A self new_basename N/A N/A N/A Update the basename attribute in the metadata dict for this instance.

        This is used for when we update the EXIF title of a media file. Since
        that determines the name of a file if we update the title of a file
        more than once it appends to the file name.

        i.e. 2015-12-31_00-00-00-my-first-title-my-second-title.jpg

        :param str new_basename: New basename of file (with the old title
            removed).
         N/A N/A N/A self get_metadata N/A N/A N/A self metadata N/A base_name new_basename N/A set_metadata N/A N/A self N/A kwargs N/A N/A Method to manually update attributes in metadata.

        :params dict kwargs: Named parameters to update.
         N/A metadata N/A N/A self get_metadata N/A key kwargs N/A N/A N/A key metadata N/A N/A N/A N/A self metadata N/A key N/A kwargs N/A key N/A get_class_by_file N/A N/A cls _file classes N/A N/A N/A N/A N/A N/A isinstance _file basestring N/A N/A N/A N/A os path isfile _file N/A N/A None N/A extension N/A N/A N/A N/A N/A N/A N/A os path splitext _file N/A 1 N/A 1 lower N/A N/A N/A len extension 0 N/A N/A i classes N/A N/A N/A extension N/A i extensions N/A N/A N/A i _file N/A None N/A classmethod get_valid_extensions N/A N/A cls N/A N/A N/A Static method to access static extensions variable.

        :returns: tuple(str)
         N/A N/A cls extensions N/A classmethod N/A