本文整理汇总了Python中asposecloud.storage.Folder类的典型用法代码示例。如果您正苦于以下问题:Python Folder类的具体用法?Python Folder怎么用?Python Folder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Folder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_convert_additonal_params
def test_convert_additonal_params(self):
folder = Folder()
response = folder.upload_file('./data/test_convert_slide.pptx')
self.assertEqual(True, response)
converter = Converter('test_convert_slide.pptx')
converter.convert('tiff')
示例2: test_convert_storage_file
def test_convert_storage_file(self):
folder = Folder()
response = folder.upload_file('./data/test_convert_slide.pptx')
self.assertEqual(True, response)
converter = Converter('test_convert_slide.pptx')
converter.convert(1,'png')
self.assertTrue(os.path.exists('./output/test_convert_slide_1.png'))
示例3: test_rotate_image
def test_rotate_image(self):
fld = Folder()
response = fld.upload_file('./data/barcodeQR.png')
self.assertEqual(response, True)
imageObj = Image('barcodeQR.png')
imageObj.rotate_image('rotate270flipnone','/','png')
self.assertEqual(True, os.path.exists('./output/barcodeQR.png'))
示例4: test_convert_tiff_to_fax
def test_convert_tiff_to_fax(self):
fld = Folder()
response = fld.upload_file('./data/barcodeQR.tiff')
self.assertEqual(response, True)
converter = Converter('barcodeQR.tiff')
converter.convert_tiff_to_fax()
self.assertEqual(True, os.path.exists('./output/barcodeQR.tiff'))
示例5: test_resize_image
def test_resize_image(self):
fld = Folder()
response = fld.upload_file('./data/barcodeQR.png')
self.assertEqual(response, True)
imageObj = Image('barcodeQR.png')
imageObj.resize_image('./data/barcodeQR.png',10,10,'barcodeQR.png','png')
self.assertEqual(True, os.path.exists('./output/barcodeQR.png'))
示例6: test_get_aspect_ratio
def test_get_aspect_ratio(self):
folder = Folder()
response = folder.upload_file('./data/test_convert_slide.pptx')
self.assertEqual(True, response)
doc = Extractor('test_convert_slide.pptx')
response = doc.get_aspect_ratio(1)
self.assertNotEquals(False, response)
示例7: test_update_tiff_frame
def test_update_tiff_frame(self):
folder = Folder()
response = folder.upload_file('./data/sample.tif')
self.assertEqual(True, response)
img = Image('sample.tif')
response = img.update_tiff_frame(0,{'newWidth':10,'newHeight':10})
self.assertTrue(os.path.exists(response))
示例8: test_get_min_row
def test_get_min_row(self):
folder = Folder()
response = folder.upload_file('./data/split_workbook.xlsx')
self.assertEqual(True, response)
ws = Worksheet('split_workbook.xlsx','Sheet1')
response = ws.get_min_row(0,0);
self.assertEqual(int, type(response))
示例9: test_get_tiff_frame_properties
def test_get_tiff_frame_properties(self):
folder = Folder()
response = folder.upload_file('./data/sample.tif')
self.assertEqual(True, response)
doc = Document('sample.tif')
response = doc.get_tiff_frame_properties(0)
self.assertEqual(dict, type(response))
示例10: test_form_fields_count
def test_form_fields_count(self):
folder = Folder()
response = folder.upload_file('./data/test_file_on_storage.pdf')
self.assertEqual(True, response)
doc = Document('test_file_on_storage.pdf')
response = doc.get_form_fields_count()
self.assertEqual(int, type(response))
示例11: test_split_workbook
def test_split_workbook(self):
folder = Folder()
response = folder.upload_file('./data/split_workbook.xlsx')
self.assertEqual(True, response)
wb = Workbook('split_workbook.xlsx')
response = wb.split_workbook('xlsx')
self.assertEqual(list, type(response))
示例12: test_delete_all_slides
def test_delete_all_slides(self):
folder = Folder()
response = folder.upload_file('./data/test_convert_slide.pptx')
self.assertEqual(True, response)
doc = Document('test_convert_slide.pptx')
response = doc.delete_all_slides()
self.assertEqual(dict, type(response))
示例13: test_crop_image
def test_crop_image(self):
folder = Folder()
response = folder.upload_file('./data/barcodeQR.jpg')
self.assertEqual(True, response)
img = Image('barcodeQR.jpg')
response = img.crop_image(0,0,10,10,'/','jpg')
self.assertTrue(os.path.exists(response))
示例14: test_update_image
def test_update_image(self):
folder = Folder()
response = folder.upload_file('./data/barcodeQR.jpg')
self.assertEqual(True, response)
img = Image('barcodeQR.jpg')
response = img.update_image({'newWidth': 20, 'newHeight': 20},'jpg')
self.assertTrue(os.path.exists(response))
示例15: test_split_pdf
def test_split_pdf(self):
folder = Folder()
response = folder.upload_file('./data/test_file_on_storage.pdf')
self.assertEqual(True, response)
doc = Document('test_file_on_storage.pdf')
response = doc.split_pdf()
self.assertEqual(dict, type(response))