def report_outline_sheet(private_results, excel): ''' info: 生成概览的sheet页面,显示app检测的一些概要信息 ''' ouline_sheet = excel.add_worksheet('Outline - 检测结果总览') #title title_style = excel.add_format({ 'bold': True, 'align': 'center', 'font_size': 18, 'valign': 'vcenter', 'fg_color': '#b6d7a8' }) ouline_sheet.merge_range( 'A1:M3', '手游Appstore上线预审核报告(%s)' % time.strftime("%Y-%m-%d", time.localtime()), title_style) ########header header_style = excel.add_format({ 'bold': True, 'align': 'center', 'fg_color': '#fff2cc' }) header_style.set_border(1) #定义format_title对象单元格边框加粗(1像素)的格式 ouline_sheet.set_column('A:A', 5) ouline_sheet.set_column('B:B', 20) ouline_sheet.set_column('C:D', 15) ouline_sheet.set_column('E:F', 20) ouline_sheet.set_column('G:M', 15) ouline_sheet.set_column('I:I', 20) #header ouline_sheet.write(3, 0, 'ID', header_style) #A ouline_sheet.write(3, 1, '游戏名称', header_style) #B ouline_sheet.write(3, 2, '版本号', header_style) #C ouline_sheet.write(3, 3, 'Bundle ID', header_style) #D ouline_sheet.write(3, 4, 'Target os version', header_style) #E ouline_sheet.write(3, 5, 'Minimum os version', header_style) #F ouline_sheet.write(3, 6, '设备数量', header_style) #G ouline_sheet.write_comment('G4', 'appstore 在2014年底强制要求所有的上线app都必须支持64位架构') ouline_sheet.write(3, 7, '架构', header_style) #H ouline_sheet.write_comment('H4', 'appstore 在2014年底强制要求所有的上线app都必须支持64位架构') ouline_sheet.write(3, 8, '证书类型', header_style) #I ouline_sheet.write_comment('I4', '正式上线应该为 Enterprise,测试包一般为 Ad Hoc/Developer') ouline_sheet.write(3, 9, 'Warnings数', header_style) #J ouline_sheet.write_comment('J4', '一些配置项的警告信息,建议修改') ouline_sheet.write(3, 10, 'Errors数', header_style) #K ouline_sheet.write_comment('K4', '一些配置项的错误信息,强烈要求修复') ouline_sheet.write(3, 11, '私有API', header_style) #L ouline_sheet.write_comment( 'L4', '私有api是平台禁止使用的一些方法集合,如果app中使用,可能会导致上线被拒,并且给苹果留下不好的印象;此项包括私有API和私有Framework' ) ouline_sheet.write(3, 12, 'XcodeGhost', header_style) #M ouline_sheet.write_comment('M4', 'XcodeGhost 为国内xcode下载导致的内嵌代码事件') #header #data # success_format = excel.add_format(({'bold': True, 'color': '#b6d7a8'})) # fail_format = excel.add_format(({'bold': True, 'color': '#cc4125'})) text_format = excel.add_format(({'align': 'center'})) url_format = excel.add_format({'font_color': 'blue', 'underline': 1}) cnt = 4 for result in private_results: ouline_sheet.write(cnt, 0, cnt - 3, text_format) #A ouline_sheet.write_url( cnt, 1, 'internal:' + result.get('sheet_name', '') + '!' + xl_rowcol_to_cell_fast(0, 0), url_format, result.get('name', '')) ouline_sheet.write(cnt, 2, result.get('version', ''), text_format) ouline_sheet.write(cnt, 3, result.get('bundle_id', ''), text_format) ouline_sheet.write(cnt, 4, result.get('tar_version', ''), text_format) ouline_sheet.write(cnt, 5, result.get('min_version', ''), text_format) ouline_sheet.write(cnt, 6, len(result.get('provisioned_devices', [])), text_format) ouline_sheet.write(cnt, 7, ' / '.join(result.get('arcs', ''))) ouline_sheet.write(cnt, 8, result.get('profile_type', ''), text_format) ouline_sheet.write(cnt, 9, len(result.get('warning', [])), text_format) ouline_sheet.write(cnt, 10, len(result.get('error', [])), text_format) ouline_sheet.write(cnt, 11, str(len(result.get('private_apis', []))) + ' / ' + str(len(result.get('private_frameworks', []))), text_format) #G ouline_sheet.write(cnt, 12, _ghost_2_text(result.get('ghost', '')), text_format) #H cnt = cnt + 1 return excel
def report_outline_sheet(private_results, excel): ''' info: 生成概览的sheet页面,显示app检测的一些概要信息 ''' ouline_sheet = excel.add_worksheet('Outline - 检测结果总览') #title title_style = excel.add_format({'bold': True, 'align': 'center', 'font_size': 18, 'valign': 'vcenter', 'fg_color': '#b6d7a8'}) ouline_sheet.merge_range('A1:M3', '手游Appstore上线预审核报告(%s)' % time.strftime("%Y-%m-%d", time.localtime()) , title_style) ########header header_style = excel.add_format({'bold': True, 'align': 'center', 'fg_color': '#fff2cc'}) header_style.set_border(1) #定义format_title对象单元格边框加粗(1像素)的格式 ouline_sheet.set_column('A:A', 5) ouline_sheet.set_column('B:B', 20) ouline_sheet.set_column('C:D', 15) ouline_sheet.set_column('E:F', 20) ouline_sheet.set_column('G:M', 15) ouline_sheet.set_column('I:I', 20) #header ouline_sheet.write(3, 0, 'ID', header_style) #A ouline_sheet.write(3, 1, '游戏名称', header_style) #B ouline_sheet.write(3, 2, '版本号', header_style) #C ouline_sheet.write(3, 3, 'Bundle ID', header_style) #D ouline_sheet.write(3, 4, 'Target os version', header_style) #E ouline_sheet.write(3, 5, 'Minimum os version', header_style) #F ouline_sheet.write(3, 6, '设备数量', header_style) #G ouline_sheet.write_comment('G4', '具有APP安装证书的设备数量,即添加过设备的UDID') ouline_sheet.write(3, 7, '架构', header_style) #H ouline_sheet.write_comment('H4', 'appstore 在2014年底强制要求所有的上线app都必须支持64位架构') ouline_sheet.write(3, 8, '证书类型', header_style) #I ouline_sheet.write_comment('I4', '正式上线应该为 Enterprise,测试包一般为 Ad Hoc/Developer') ouline_sheet.write(3, 9, 'Warnings数', header_style) #J ouline_sheet.write_comment('J4', '一些配置项的警告信息,建议修改') ouline_sheet.write(3, 10, 'Errors数', header_style) #K ouline_sheet.write_comment('K4', '一些配置项的错误信息,强烈要求修复') ouline_sheet.write(3, 11, '私有API', header_style) #L ouline_sheet.write_comment('L4', '私有api是平台禁止使用的一些方法集合,如果app中使用,可能会导致上线被拒,并且给苹果留下不好的印象;此项包括私有API和私有Framework') ouline_sheet.write(3, 12, 'XcodeGhost', header_style) #M ouline_sheet.write_comment('M4', 'XcodeGhost 为国内xcode下载导致的内嵌代码事件') #header #data # success_format = excel.add_format(({'bold': True, 'color': '#b6d7a8'})) # fail_format = excel.add_format(({'bold': True, 'color': '#cc4125'})) text_format = excel.add_format(({'align': 'center'})) url_format = excel.add_format({'font_color': 'blue', 'underline': 1}) cnt = 4 for result in private_results: ouline_sheet.write(cnt, 0, cnt - 3, text_format) #A ouline_sheet.write_url(cnt, 1, 'internal:' + result.get('sheet_name', '') + '!' + xl_rowcol_to_cell_fast(0, 0), url_format, result.get('name', '')) ouline_sheet.write(cnt, 2, result.get('version', ''), text_format) ouline_sheet.write(cnt, 3, result.get('bundle_id', ''), text_format) ouline_sheet.write(cnt, 4, result.get('tar_version', ''), text_format) ouline_sheet.write(cnt, 5, result.get('min_version', ''), text_format) ouline_sheet.write(cnt, 6, len(result.get('provisioned_devices', [])), text_format) ouline_sheet.write(cnt, 7, ' / '.join(result.get('arcs', ''))) ouline_sheet.write(cnt, 8, result.get('profile_type', ''), text_format) ouline_sheet.write(cnt, 9, len(result.get('warning', [])), text_format) ouline_sheet.write(cnt, 10, len(result.get('error', [])), text_format) ouline_sheet.write(cnt, 11, str(len(result.get('private_apis', []))) + ' / ' + str(len(result.get('private_frameworks', []))), text_format) #G ouline_sheet.write(cnt, 12, _ghost_2_text(result.get('ghost', '')), text_format) #H cnt = cnt + 1 return excel
def report_outline_sheet(private_results, excel): ''' info: 生成概览的sheet页面,显示app检测的一些概要信息 ''' ouline_sheet = excel.add_worksheet('Outline - 检测结果总览') #title title_style = excel.add_format({'bold': True, 'align': 'center', 'font_size': 18, 'valign': 'vcenter', 'fg_color': '#b6d7a8'}) ouline_sheet.merge_range('A1:I3', '手游Appstore上线预审核报告', title_style) ########header header_style = excel.add_format({'bold': True, 'align': 'center', 'fg_color': '#fff2cc'}) header_style.set_border(1) #定义format_title对象单元格边框加粗(1像素)的格式 ouline_sheet.set_column('A:A', 5) ouline_sheet.set_column('B:B', 20) ouline_sheet.set_column('C:D', 15) ouline_sheet.set_column('E:F', 20) ouline_sheet.set_column('G:H', 15) ouline_sheet.set_column('I:I', 50) #header ouline_sheet.write(3, 0, 'ID', header_style) #A ouline_sheet.write(3, 1, '游戏名称', header_style) #B ouline_sheet.write(3, 2, '版本号', header_style) #C ouline_sheet.write(3, 3, 'Bundle ID', header_style) #D ouline_sheet.write(3, 4, 'Target os version', header_style) #E ouline_sheet.write(3, 5, 'Minimum os version', header_style) #F ouline_sheet.write(3, 6, '私有API', header_style) #G ouline_sheet.write_comment('G4', '私有api是平台禁止使用的一些方法集合,如果app中使用,可能会导致上线被拒,并且给苹果留下不好的印象;此项包括私有API和私有Framework') ouline_sheet.write(3, 7, 'XcodeGhost', header_style) #H ouline_sheet.write_comment('H4', 'XcodeGhost 为国内xcode下载导致的内嵌代码事件') ouline_sheet.write(3, 8, '架构', header_style) #I ouline_sheet.write_comment('I4', 'appstore 在2014年底强制要求所有的上线app都必须支持64位架构') #header #data # success_format = excel.add_format(({'bold': True, 'color': '#b6d7a8'})) # fail_format = excel.add_format(({'bold': True, 'color': '#cc4125'})) text_format = excel.add_format(({'align': 'center'})) url_format = excel.add_format({'font_color': 'blue', 'underline': 1}) cnt = 4 for result in private_results: ouline_sheet.write(cnt, 0, cnt - 3, text_format) #A # ouline_sheet.write(cnt, 1, result.get('name', '')) #B ouline_sheet.write_url(cnt, 1, 'internal:' + result.get('sheet_name', '') + '!' + xl_rowcol_to_cell_fast(0, 0), url_format, result.get('name', '')) ouline_sheet.write(cnt, 2, result.get('version', ''), text_format) #C ouline_sheet.write(cnt, 3, result.get('bundle_id', ''), text_format) #D ouline_sheet.write(cnt, 4, result.get('tar_version', ''), text_format) #E ouline_sheet.write(cnt, 5, result.get('min_version', ''), text_format) #F ouline_sheet.write(cnt, 6, str(len(result.get('private_apis', []))) + ' / ' + str(len(result.get('private_frameworks', []))), text_format) #G ouline_sheet.write(cnt, 7, _ghost_2_text(result.get('ghost', '')), text_format) #H ouline_sheet.write(cnt, 8, ' / '.join(result.get('arcs', ''))) #I cnt = cnt + 1 return excel