Spaces:
Runtime error
Runtime error
Avoid adding shapes when there are too many bullet points
Browse files224 unmodified lines2252262272282292302317 unmodified lines239240241242243244224 unmodified linesshape = shapes.add_shape(MSO_AUTO_SHAPE_TYPE.CHEVRON, left, top, width, height)shape.text = step.removeprefix(STEP_BY_STEP_PROCESS_MARKER)left += width - INCHES_0_4elif n_steps > 4:# Vertical displayheight = pptx.util.Inches(0.65)width = pptx.util.Inches(slide_width_inch * 2/ 3)7 unmodified linesleft += INCHES_0_5else:# Two steps -- probably not a processreturn Falsereturn True224 unmodified lines2252262272282292302317 unmodified lines239240241242243244245224 unmodified linesshape = shapes.add_shape(MSO_AUTO_SHAPE_TYPE.CHEVRON, left, top, width, height)shape.text = step.removeprefix(STEP_BY_STEP_PROCESS_MARKER)left += width - INCHES_0_4elif 4 < n_steps <= 6:# Vertical displayheight = pptx.util.Inches(0.65)width = pptx.util.Inches(slide_width_inch * 2/ 3)7 unmodified linesleft += INCHES_0_5else:# Two steps -- probably not a process# More than 5--6 steps -- would likely cause a visual clutterreturn Falsereturn True
helpers/pptx_helper.py+2-1