def common_setup(self): """ Set up common pdf processing steps """ # Pull down and set up the processing file self.process_filename = get_process_filename(self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) self._set_pdf_filename()
def common_setup(self): # Pull down and set up the processing file self.process_filename = get_process_filename( self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) self._set_ext() self._set_model() self._set_greatest()
def common_setup(self): """ Set up common pdf processing steps """ # Pull down and set up the processing file self.process_filename = get_process_filename( self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) self._set_pdf_filename()
def common_setup(self): self.video_config = mgg \ .global_config['plugins'][MEDIA_TYPE] # Pull down and set up the processing file self.process_filename = get_process_filename( self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) self.transcoder = transcoders.VideoTranscoder() self.did_transcode = False
def common_setup(self): self.video_config = mgg \ .global_config['media_type:mediagoblin.media_types.video'] # Pull down and set up the processing file self.process_filename = get_process_filename( self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) self.transcoder = transcoders.VideoTranscoder() self.did_transcode = False
def common_setup(self): self.video_config = mgg \ .global_config['media_type:mediagoblin.media_types.video'] # Pull down and set up the processing file self.process_filename = get_process_filename(self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) self.transcoder = transcoders.VideoTranscoder() self.did_transcode = False
def common_setup(self): """ Setup the workbench directory and pull down the original file, add the audio_config, transcoder, thumbnailer and spectrogram_tmp path """ self.audio_config = mgg.global_config["plugins"]["mediagoblin.media_types.audio"] # Pull down and set up the processing file self.process_filename = get_process_filename(self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) self.transcoder = AudioTranscoder() self.thumbnailer = AudioThumbnailer()
def common_setup(self): """ Setup the workbench directory and pull down the original file, add the audio_config, transcoder, thumbnailer and spectrogram_tmp path """ self.audio_config = mgg \ .global_config['plugins']['mediagoblin.media_types.audio'] # Pull down and set up the processing file self.process_filename = get_process_filename( self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) self.transcoder = AudioTranscoder() self.thumbnailer = AudioThumbnailer()
def common_setup(self): self.ascii_config = mgg.global_config['plugins'][ 'mediagoblin.media_types.ascii'] # Conversions subdirectory to avoid collisions self.conversions_subdir = os.path.join( self.workbench.dir, 'conversions') os.mkdir(self.conversions_subdir) # Pull down and set up the processing file self.process_filename = get_process_filename( self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) self.charset = None
def common_setup(self): """ Set up the workbench directory and pull down the original file """ self.svg_config = mgg.global_config['plugins']['mediagoblin_svg'] # Conversions subdirectory to avoid collisions self.conversions_subdir = os.path.join( self.workbench.dir, 'conversions') os.mkdir(self.conversions_subdir) # Pull down and set up the processing file self.process_filename = get_process_filename( self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename)
def common_setup(self, resolution=None): self.video_config = mgg \ .global_config['plugins'][MEDIA_TYPE] # Pull down and set up the processing file self.process_filename = get_process_filename( self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) self.transcoder = transcoders.VideoTranscoder() self.did_transcode = False if resolution: self.curr_file = 'webm_' + str(resolution) self.part_filename = (self.name_builder.fill('{basename}.' + str(resolution) + '.webm')) else: self.curr_file = 'webm_video' self.part_filename = self.name_builder.fill('{basename}.medium.webm')
def common_setup(self): """ Set up the workbench directory and pull down the original file """ self.image_config = mgg.global_config[ 'media_type:mediagoblin.media_types.image'] ## @@: Should this be two functions? # Conversions subdirectory to avoid collisions self.conversions_subdir = os.path.join( self.workbench.dir, 'convirsions') os.mkdir(self.conversions_subdir) # Pull down and set up the processing file self.process_filename = get_process_filename( self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) # Exif extraction self.exif_tags = extract_exif(self.process_filename)
def common_setup(self): """ Set up the workbench directory and pull down the original file """ self.image_config = mgg.global_config[ 'media_type:mediagoblin.media_types.image'] ## @@: Should this be two functions? # Conversions subdirectory to avoid collisions self.conversions_subdir = os.path.join(self.workbench.dir, 'convirsions') os.mkdir(self.conversions_subdir) # Pull down and set up the processing file self.process_filename = get_process_filename(self.entry, self.workbench, self.acceptable_files) self.name_builder = FilenameBuilder(self.process_filename) # Exif extraction self.exif_tags = extract_exif(self.process_filename)