:py:mod:`imessagedb.attachment` =============================== .. py:module:: imessagedb.attachment Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: imessagedb.attachment.Attachment .. py:class:: Attachment(database, rowid: str, filename: str, mime_type: str, copy=False, copy_directory=None, home_directory=os.environ['HOME']) Class for holding information about an attachment .. py:property:: rowid :type: str Return the rowid .. py:property:: filename :type: str Return the filename of the attachment .. py:property:: mime_type :type: str Return the mime_type of the attachment .. py:property:: copy :type: bool Return if the attachment should be copied .. py:property:: destination_path :type: str Return the destination path the attachment will be copied to .. py:property:: popup_type :type: str Return the popup type, one of [Audio, Video, Picture] .. py:property:: conversion_type :type: str Return the conversion type, one of [Audio, HEIC, Video] .. py:property:: skip :type: bool Return if we need to skip this attachment .. py:property:: missing :type: bool Return if the attachment is missing .. py:property:: original_path :type: str Return the original path of the attachment .. py:property:: destination_filename :type: str Return the filename at the destination (not the whole path) .. py:property:: html_path :type: str Return the html escaped path .. py:property:: link_path :type: str Return a link to the attachment .. py:method:: _process_mime_type() -> None Based on the mime_type, decide how to convert the file if necessary and how to rename it .. py:method:: copy_attachment() -> None Copy the attachment .. py:method:: convert_heic_image(heic_location: str, png_location: str) -> None Convert a HEIC image to a PNG so it can be viewed in the browser .. py:method:: convert_audio_video(original: str, converted: str) -> None Convert an audio or video file from an undisplayable source to something the browser can display