Utilities/file_io/automated_files_tasks.py
def extract_videotdms_metadata(self):
        """[Populate a dj table with the videos metadata]
        """

        table = VideoTdmsMetadata()
        tdmss = [f for f in os.listdir(self.videos_fld) if '.tdms' in f]
        for t in tdmss:
            props, number_of_frames = VideoConverter.extract_framesize_from_metadata(os.path.join(self.videos_fld, t))
            key = dict(videopath=os.path.join(self.videos_fld, t),
                        width=props['width'],
                        height=props['height'],
                        number_of_frames=number_of_frames,
                        fps=props['fps'])
            try:
                table.insert1(key)
            except:
                pass
                # raise ValueError('Could not insert: ', key)
        print(table)
[Populate a dj table with the videos metadata]
        
[Populate a dj table with the videos metadata]
[ Populate a dj table with the videos metadata ]
def extract_videotdms_metadata(self):
        table = VideoTdmsMetadata()
        tdmss = [f for f in os.listdir(self.videos_fld) if '.tdms' in f]
        for t in tdmss:
            props, number_of_frames = VideoConverter.extract_framesize_from_metadata(os.path.join(self.videos_fld, t))
            key = dict(videopath=os.path.join(self.videos_fld, t),
                        width=props['width'],
                        height=props['height'],
                        number_of_frames=number_of_frames,
                        fps=props['fps'])
            try:
                table.insert1(key)
            except:
                pass
        print(table)
def extract_videotdms_metadata ( self ) : table = VideoTdmsMetadata ( ) tdmss = [ f for f in os . listdir ( self . videos_fld ) if '.tdms' in f ] for t in tdmss : props , number_of_frames = VideoConverter . extract_framesize_from_metadata ( os . path . join ( self . videos_fld , t ) ) key = dict ( videopath = os . path . join ( self . videos_fld , t ) , width = props [ 'width' ] , height = props [ 'height' ] , number_of_frames = number_of_frames , fps = props [ 'fps' ] ) try : table . insert1 ( key ) except : pass print ( table )
[Populate a dj table with the videos metadata]
[ Populate a dj table with the videos metadata ]
"""[Populate a dj table with the videos metadata]
        """ # raise ValueError('Could not insert: ', key)
self