def test_get_source_file_list(self): file_tools = FileTools() result_list = ['file_0001.jpg', 'file_0002.jpg', 'file_0003.jpg', 'file_0004.jpg', 'file_0005.jpg', 'org_image.jpg'] source_list = file_tools.get_source_file_list('./test/resources/') self.assertEqual(source_list, result_list)
file_path = src_folder + "/" + filename image_tools.resize_image(target_width, target_height, file_path, index, target_folder) def render_video(): video_tools = VideoTools() video_tools.render_video() if __name__ == "__main__": cmd_arguments = str(sys.argv) if len(sys.argv) < 2: print "You need to specify a project file" exit(1) else: # Initialize the project Configuration project_config.initialize(str(sys.argv[1])) # Obtain List of Source Files file_tools = FileTools() source_folder = project_config.get("Locations", "source_folder") source_files = file_tools.get_source_file_list(source_folder) # Convert and Resize Images to specified resolution convert_images(source_files) # Render Video render_video()