Spaces:
Runtime error
Runtime error
Add new template & placeholder index parsing (PR #24 from barun-saha/visual)
Browse filesFiles changed (5)
33 unmodified lines34353633 unmodified lines*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text*.pptx filter=lfs diff=lfs merge=lfs -text33 unmodified lines3435363733 unmodified lines*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text*.pptx filter=lfs diff=lfs merge=lfs -textpptx_templates/Minimalist_sales_pitch.pptx filter=lfs diff=lfs merge=lfs -text
37 unmodified lines3839404142434445464748495051525337 unmodified linesPPTX_TEMPLATE_FILES = {'Basic': {'file': 'pptx_templates/Blank.pptx','caption': 'A good start (Uses [photos](https://unsplash.com/photos/AFZ-qBPEceA) by [cetteup](https://unsplash.com/@cetteup?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) on [Unsplash](https://unsplash.com/photos/a-foggy-forest-filled-with-lots-of-trees-d3ci37Gcgxg?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash))'},'Ion Boardroom': {'file': 'pptx_templates/Ion_Boardroom.pptx','caption': 'Make some bold decisions'},'Urban Monochrome': {'file': 'pptx_templates/Urban_monochrome.pptx','caption': 'Marvel in a monochrome dream'}}# This is a long text, so not incorporated as a string in `strings.json`37 unmodified lines383940414243444546474849505152535455565737 unmodified linesPPTX_TEMPLATE_FILES = {'Basic': {'file': 'pptx_templates/Blank.pptx','caption': '🟠 A good start (Uses [photos](https://unsplash.com/photos/AFZ-qBPEceA) by [cetteup](https://unsplash.com/@cetteup?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) on [Unsplash](https://unsplash.com/photos/a-foggy-forest-filled-with-lots-of-trees-d3ci37Gcgxg?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash))'},'Minimalist Sales Pitch': {'file': 'pptx_templates/Minimalist_sales_pitch.pptx','caption': '⚫ In high contrast'},'Ion Boardroom': {'file': 'pptx_templates/Ion_Boardroom.pptx','caption': '🔴 Make some bold decisions'},'Urban Monochrome': {'file': 'pptx_templates/Urban_monochrome.pptx','caption': '⚪ Marvel in a monochrome dream'},}# This is a long text, so not incorporated as a string in `strings.json`
1234567 unmodified lines141516171819"""Search photos using Pexels API."""import osimport randomfrom io import BytesIO7 unmodified linesMAX_PHOTOS = 2def search_pexels(query: str,size: Literal['small', 'medium', 'large'] = 'medium',12345677 unmodified lines15161718192021222324252627"""Search photos using Pexels API."""import loggingimport osimport randomfrom io import BytesIO7 unmodified linesMAX_PHOTOS = 2# Only show warningslogging.getLogger('urllib3').setLevel(logging.WARNING)# Disable all child loggers of urllib3, e.g. urllib3.connectionpoollogging.getLogger('urllib3').propagate = Falsedef search_pexels(query: str,size: Literal['small', 'medium', 'large'] = 'medium',
72 unmodified lines73747576777879808182834 unmodified lines88899091929394959697989910010149 unmodified lines15115215315415515636 unmodified lines19319419519619719819938 unmodified lines23823924024124224324424524624724824955 unmodified lines30530630730830931031131231327 unmodified lines34134234334434534634770 unmodified lines418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456157 unmodified lines6146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657661 unmodified line76876977077177277377472 unmodified lines# The structured "JSON" might contain trailing commas, so using json5parsed_data = json5.loads(structured_data)logger.debug('*** Using PPTX template: %s',GlobalConfig.PPTX_TEMPLATE_FILES[slides_template]['file'])presentation = pptx.Presentation(GlobalConfig.PPTX_TEMPLATE_FILES[slides_template]['file'])slide_width_inch, slide_height_inch = _get_slide_width_height_inches(presentation)4 unmodified linessubtitle = slide.placeholders[1]title.text = parsed_data['title']logger.info('PPT title: %s | #slides: %d',title.text, len(parsed_data['slides']))subtitle.text = 'by Myself and SlideDeck AI :)'all_headers = [title.text, ]# Add content in a loopfor a_slide in parsed_data['slides']:is_processing_done = _handle_double_col_layout(presentation=presentation,slide_json=a_slide,49 unmodified linesreturn flat_listdef _handle_default_display(presentation: pptx.Presentation,slide_json: dict,36 unmodified linesshapes = slide.shapestitle_shape = shapes.titlebody_shape = shapes.placeholders[1]title_shape.text = remove_slide_number_from_heading(slide_json['heading'])text_frame = body_shape.text_frame38 unmodified linesimg_keywords = slide_json['img_keywords'].strip()slide = presentation.slide_layouts[8] # Picture with Captionslide = presentation.slides.add_slide(slide)title_placeholder = slide.shapes.titletitle_placeholder.text = remove_slide_number_from_heading(slide_json['heading'])pic_col: PicturePlaceholder = slide.shapes.placeholders[1]text_col: SlidePlaceholder = slide.shapes.placeholders[2]flat_items_list = get_flat_list_of_contents(slide_json['bullet_points'], level=0)for idx, an_item in enumerate(flat_items_list):55 unmodified lines# Add a photo in the background, text in the foregroundslide = presentation.slides.add_slide(presentation.slide_layouts[1])title_shape = slide.shapes.titlebody_shape = slide.shapes.placeholders[1]title_shape.text = remove_slide_number_from_heading(slide_json['heading'])flat_items_list = get_flat_list_of_contents(slide_json['bullet_points'], level=0)27 unmodified linesslide=slide,slide_width_inch=slide_width_inch,slide_height_inch=slide_height_inch,text='Photos provided by Pexels',hyperlink=page_url)70 unmodified lines) and isinstance(double_col_content[0], dict) and isinstance(double_col_content[1], dict):slide = presentation.slide_layouts[4]slide = presentation.slides.add_slide(slide)shapes = slide.shapestitle_placeholder = shapes.titletitle_placeholder.text = remove_slide_number_from_heading(slide_json['heading'])left_heading, right_heading = shapes.placeholders[1], shapes.placeholders[3]left_col, right_col = shapes.placeholders[2], shapes.placeholders[4]left_col_frame, right_col_frame = left_col.text_frame, right_col.text_frameif 'heading' in double_col_content[0]:left_heading.text = double_col_content[0]['heading']if 'bullet_points' in double_col_content[0]:flat_items_list = get_flat_list_of_contents(double_col_content[0]['bullet_points'], level=0)for idx, an_item in enumerate(flat_items_list):if idx == 0:left_col_frame.text = an_item[0].removeprefix(STEP_BY_STEP_PROCESS_MARKER)else:paragraph = left_col_frame.add_paragraph()paragraph.text = an_item[0].removeprefix(STEP_BY_STEP_PROCESS_MARKER)paragraph.level = an_item[1]if 'heading' in double_col_content[1]:right_heading.text = double_col_content[1]['heading']if 'bullet_points' in double_col_content[1]:flat_items_list = get_flat_list_of_contents(double_col_content[1]['bullet_points'], level=0)for idx, an_item in enumerate(flat_items_list):if idx == 0:right_col_frame.text = an_item[0].removeprefix(STEP_BY_STEP_PROCESS_MARKER)else:paragraph = right_col_frame.add_paragraph()157 unmodified linesreturn slide_width_inch, slide_height_inchdef print_placeholder_names(slide: pptx.slide.Slide):"""Display the placeholder details of a given slide.:param slide: The slide."""for shape in slide.placeholders:print(f'{shape.placeholder_format.idx=}, {shape.name=}')if __name__ == '__main__':_JSON_DATA = '''{"title": "Mastering PowerPoint Shapes","slides": [{"heading": "Introduction to PowerPoint Shapes","bullet_points": ["Shapes are fundamental elements in PowerPoint","Used to create diagrams, flowcharts, and visuals","Available in various types: lines, rectangles, circles, etc."],"key_message": "","img_keywords": "PowerPoint shapes, basic shapes"},{"heading": "Types of Shapes in PowerPoint","bullet_points": ["Lines: Connect two points","Rectangles: Four-sided figures with right angles",["Squares: Special type of rectangle with equal sides","Rounded Rectangles: Rectangles with rounded corners"],"Circles: Round shapes with no corners","Ovals: Elliptical shapes"],"key_message": "","img_keywords": "PowerPoint shapes, types of shapes"},{"heading": "Creating and Manipulating Shapes","bullet_points": [">> Select the 'Home' tab and click on 'Shapes'",">> Choose the desired shape",">> Click and drag to create the shape",">> Resize, move, or rotate shapes using handles",">> Change shape color, fill, and outline"],"key_message": "Demonstrates the process of creating and manipulating shapes","img_keywords": "PowerPoint shapes, creating shapes, manipulating shapes"},{"heading": "Advanced Shape Manipulation","bullet_points": [{"heading": "Adding Text to Shapes","bullet_points": ["Right-click on the shape and select 'Add Text'","Type or paste the desired text"]},{"heading": "Grouping and Ungrouping Shapes","bullet_points": ["Select multiple shapes and press 'Ctrl + G' to group","Right-click and select 'Ungroup' to separate"]}],"key_message": "Explores advanced techniques for working with shapes","img_keywords": "PowerPoint shapes, advanced manipulation, grouping, text in shapes"},{"heading": "Using the 'Format' Tab for Shapes","bullet_points": ["Access advanced shape formatting options","Change shape fill, outline, and effects","Adjust shape size and position"],"key_message": "","img_keywords": "PowerPoint shapes, format tab, advanced formatting"},{"heading": "Example: Creating a Simple Diagram","bullet_points": ["Use rectangles to represent blocks","Use lines to connect blocks","Add text to shapes to label elements"],"key_message": "Illustrates the use of shapes to create a simple diagram","img_keywords": "PowerPoint shapes, diagram example, simple diagram"},{"heading": "Example: Creating a Flowchart","bullet_points": ["Use different shapes to represent steps, decisions, and inputs/outputs","Use connectors to link shapes","Add text to shapes to describe each step"],"key_message": "Demonstrates the use of shapes to create a flowchart","img_keywords": "PowerPoint shapes, flowchart example, creating flowchart"},{"heading": "Double Column Layout: Shapes in Older vs. Newer PowerPoint Versions","bullet_points": [{"heading": "Older PowerPoint Versions","bullet_points": ["Limited shape types and formatting options","Less intuitive shape creation and manipulation"]},{"heading": "Newer PowerPoint Versions","bullet_points": ["Expanded shape library with more types and styles","Improved shape formatting and manipulation tools"]}],"key_message": "Compares the use of shapes in older and newer PowerPoint versions","img_keywords": "PowerPoint shapes, older versions, newer versions, comparison"},{"heading": "Tips for Effective Use of Shapes","bullet_points": ["Keep shapes simple and uncluttered","Use consistent colors and styles","Avoid overusing shapes, maintain balance with text and other elements"],"key_message": "Provides best practices for using shapes in presentations","img_keywords": "PowerPoint shapes, best practices, effective use"},{"heading": "Conclusion","bullet_points": ["Shapes are versatile tools in PowerPoint","Mastering shapes enhances presentation visuals","Practice and experimentation are key to improving shape usage"],"key_message": "Summarizes the importance of shapes in PowerPoint and encourages practice","img_keywords": "PowerPoint shapes, conclusion, importance"}]}'''temp = tempfile.NamedTemporaryFile(delete=False, suffix='.pptx')path = pathlib.Path(temp.name)1 unmodified linegenerate_powerpoint_presentation(json5.loads(_JSON_DATA),output_file_path=path,slides_template='Basic')print(f'File path: {path}')72 unmodified lines7374757677784 unmodified lines838485868788899091929394959697989949 unmodified lines14915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419536 unmodified lines23223323423523623723823924024124224324438 unmodified lines28328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231355 unmodified lines36937037137237337437537637737837938038138238327 unmodified lines41141241341441541641770 unmodified lines488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560157 unmodified lines7187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768771 unmodified line87988088188288388488572 unmodified lines# The structured "JSON" might contain trailing commas, so using json5parsed_data = json5.loads(structured_data)presentation = pptx.Presentation(GlobalConfig.PPTX_TEMPLATE_FILES[slides_template]['file'])slide_width_inch, slide_height_inch = _get_slide_width_height_inches(presentation)4 unmodified linessubtitle = slide.placeholders[1]title.text = parsed_data['title']logger.info('PPT title: %s | #slides: %d | template: %s',title.text, len(parsed_data['slides']),GlobalConfig.PPTX_TEMPLATE_FILES[slides_template]['file'])subtitle.text = 'by Myself and SlideDeck AI :)'all_headers = [title.text, ]# Add content in a loopfor a_slide in parsed_data['slides']:# The loop has a bug:# if any of this functions fail (i.e., returns False), an empty slide would still existis_processing_done = _handle_double_col_layout(presentation=presentation,slide_json=a_slide,49 unmodified linesreturn flat_listdef get_slide_placeholders(slide: pptx.slide.Slide,layout_number: int,is_debug: bool = False) -> List[Tuple[int, str]]:"""Return the index and name (lower case) of all placeholders present in a slide, exceptthe title placeholder.A placeholder in a slide is a place to add content. Each placeholder has a name and an index.This index is NOT a list index, rather a set of keys used to look up a dict. So, `idx` isnon-contiguous. Also, the title placeholder of a slide always has index 0. User-addedplaceholder get indices assigned starting from 10.With user-edited or added placeholders, their index may be difficult to track. This functionreturns the placeholders name as well, which could be useful to distinguish between thedifferent placeholder.:param slide: The slide.:param layout_number: The layout number used by the slide.:param is_debug: Whether to print debugging statements.:return: A list containing placeholders (idx, name) tuples, except the title placeholder."""if is_debug:print(f'Slide layout #{layout_number}:'f' # of placeholders: {len(slide.shapes.placeholders)} (including the title)')placeholders = [(shape.placeholder_format.idx, shape.name.lower()) for shape in slide.shapes.placeholders]placeholders.pop(0) # Remove the title placeholderif is_debug:print(placeholders)return placeholdersdef _handle_default_display(presentation: pptx.Presentation,slide_json: dict,36 unmodified linesshapes = slide.shapestitle_shape = shapes.titletry:body_shape = shapes.placeholders[1]except KeyError:placeholders = get_slide_placeholders(slide, layout_number=1)body_shape = shapes.placeholders[placeholders[0][0]]title_shape.text = remove_slide_number_from_heading(slide_json['heading'])text_frame = body_shape.text_frame38 unmodified linesimg_keywords = slide_json['img_keywords'].strip()slide = presentation.slide_layouts[8] # Picture with Captionslide = presentation.slides.add_slide(slide)placeholders = Nonetitle_placeholder = slide.shapes.titletitle_placeholder.text = remove_slide_number_from_heading(slide_json['heading'])try:pic_col: PicturePlaceholder = slide.shapes.placeholders[1]except KeyError:placeholders = get_slide_placeholders(slide, layout_number=8)pic_col = Nonefor idx, name in placeholders:if 'picture' in name:pic_col: PicturePlaceholder = slide.shapes.placeholders[idx]try:text_col: SlidePlaceholder = slide.shapes.placeholders[2]except KeyError:text_col = Noneif not placeholders:placeholders = get_slide_placeholders(slide, layout_number=8)for idx, name in placeholders:if 'content' in name:text_col: SlidePlaceholder = slide.shapes.placeholders[idx]flat_items_list = get_flat_list_of_contents(slide_json['bullet_points'], level=0)for idx, an_item in enumerate(flat_items_list):55 unmodified lines# Add a photo in the background, text in the foregroundslide = presentation.slides.add_slide(presentation.slide_layouts[1])title_shape = slide.shapes.titletry:body_shape = slide.shapes.placeholders[1]except KeyError:placeholders = get_slide_placeholders(slide, layout_number=1)# Layout 1 usually has two placeholders, including the titlebody_shape = slide.shapes.placeholders[placeholders[0][0]]title_shape.text = remove_slide_number_from_heading(slide_json['heading'])flat_items_list = get_flat_list_of_contents(slide_json['bullet_points'], level=0)27 unmodified linesslide=slide,slide_width_inch=slide_width_inch,slide_height_inch=slide_height_inch,text='Photo provided by Pexels',hyperlink=page_url)70 unmodified lines) and isinstance(double_col_content[0], dict) and isinstance(double_col_content[1], dict):slide = presentation.slide_layouts[4]slide = presentation.slides.add_slide(slide)placeholders = Noneshapes = slide.shapestitle_placeholder = shapes.titletitle_placeholder.text = remove_slide_number_from_heading(slide_json['heading'])try:left_heading, right_heading = shapes.placeholders[1], shapes.placeholders[3]except KeyError:# For manually edited/added master slides, the placeholder idx numbers in the dict# will be different (>= 10)left_heading, right_heading = None, Noneplaceholders = get_slide_placeholders(slide, layout_number=4)for idx, name in placeholders:if 'text placeholder' in name:if not left_heading:left_heading = shapes.placeholders[idx]elif not right_heading:right_heading = shapes.placeholders[idx]try:left_col, right_col = shapes.placeholders[2], shapes.placeholders[4]except KeyError:left_col, right_col = None, Noneif not placeholders:placeholders = get_slide_placeholders(slide, layout_number=4)for idx, name in placeholders:if 'content placeholder' in name:if not left_col:left_col = shapes.placeholders[idx]elif not right_col:right_col = shapes.placeholders[idx]left_col_frame, right_col_frame = left_col.text_frame, right_col.text_frameif 'heading' in double_col_content[0] and left_heading:left_heading.text = double_col_content[0]['heading']if 'bullet_points' in double_col_content[0]:flat_items_list = get_flat_list_of_contents(double_col_content[0]['bullet_points'], level=0)if not left_heading:left_col_frame.text = double_col_content[0]['heading']for idx, an_item in enumerate(flat_items_list):if left_heading and idx == 0:left_col_frame.text = an_item[0].removeprefix(STEP_BY_STEP_PROCESS_MARKER)else:paragraph = left_col_frame.add_paragraph()paragraph.text = an_item[0].removeprefix(STEP_BY_STEP_PROCESS_MARKER)paragraph.level = an_item[1]if 'heading' in double_col_content[1] and right_heading:right_heading.text = double_col_content[1]['heading']if 'bullet_points' in double_col_content[1]:flat_items_list = get_flat_list_of_contents(double_col_content[1]['bullet_points'], level=0)if not right_heading:right_col_frame.text = double_col_content[1]['heading']for idx, an_item in enumerate(flat_items_list):if right_col_frame and idx == 0:right_col_frame.text = an_item[0].removeprefix(STEP_BY_STEP_PROCESS_MARKER)else:paragraph = right_col_frame.add_paragraph()157 unmodified linesreturn slide_width_inch, slide_height_inchif __name__ == '__main__':_JSON_DATA = '''{"title": "The Fascinating World of Chess","slides": [{"heading": "Introduction to Chess","bullet_points": ["Chess is a strategic board game played between two players.",["Each player begins the game with 16 pieces: one king, one queen, two rooks, two knights, two bishops, and eight pawns.","The goal of the game is to checkmate your opponent's king. This means the king is in a position to be captured (in 'check') but has no move to escape (mate)."],"Chess is believed to have originated in northern India in the 6th century AD."],"key_message": "Understanding the basics of chess is crucial before delving into strategies.","img_keywords": "chessboard, chess pieces, king, queen, rook, knight, bishop, pawn"},{"heading": "The Chessboard","bullet_points": ["The chessboard is made up of 64 squares in an 8x8 grid.","Each player starts with their pieces on their home rank (row).","The board is divided into two camps: one for each player."],"key_message": "Knowing the layout of the chessboard is essential for understanding piece movement.","img_keywords": "chessboard layout, 8x8 grid, home rank, player camps"},{"heading": "Movement of Pieces","bullet_points": [">> Each piece moves differently. Learning these movements is key to playing chess.",">> The king moves one square in any direction.",">> The queen combines the moves of the rook and bishop.",">> The rook moves horizontally or vertically along a rank or file.",">> The bishop moves diagonally.",">> The knight moves in an L-shape: two squares in a horizontal or vertical direction, then one square perpendicular to that.",">> The pawn moves forward one square, but captures diagonally.",">> Pawns have the initial option of moving two squares forward on their first move."],"key_message": "Understanding how each piece moves is fundamental to playing chess.","img_keywords": "chess piece movements, king, queen, rook, bishop, knight, pawn"},{"heading": "Special Moves","bullet_points": [{"heading": "Castling","bullet_points": ["Castling is a unique move involving the king and a rook.","It involves moving the king two squares towards a rook, then moving that rook to the square the king skipped over."]},{"heading": "En Passant","bullet_points": ["En passant is a special pawn capture move.","It occurs when a pawn moves two squares forward from its starting position and lands beside an opponent's pawn, which could have captured it if the first pawn had only moved one square forward."]}],"key_message": "Understanding these special moves can add depth to your chess strategy.","img_keywords": "castling, en passant, special chess moves"},{"heading": "Chess Notation","bullet_points": ["Chess notation is a system used to record and communicate chess games.","It uses algebraic notation, where each square on the board is identified by a letter and a number.","Pieces are identified by their initial letters: K for king, Q for queen, R for rook, B for bishop, N for knight, and P for pawn."],"key_message": "Learning chess notation is helpful for recording, analyzing, and discussing games.","img_keywords": "chess notation, algebraic notation, chess symbols"},{"heading": "Chess Strategies","bullet_points": ["Develop your pieces quickly and efficiently.","Control the center of the board.","Castle early to protect your king.","Keep your king safe.","Think ahead and plan your moves."],"key_message": "Following these strategies can help improve your chess skills.","img_keywords": "chess strategies, piece development, center control, king safety, planning ahead"},{"heading": "Chess Tactics","bullet_points": ["Fork: attacking two enemy pieces with the same move.","Pin: restricting the movement of an enemy piece.","Skewer: forcing an enemy piece to move away from a threatened piece.","Discovered attack: moving a piece to reveal an attack by another piece behind it."],"key_message": "Mastering these tactics can help you gain an advantage in games.","img_keywords": "chess tactics, fork, pin, skewer, discovered attack"},{"heading": "Chess Openings","bullet_points": [{"heading": "Italian Game","bullet_points": ["1. e4 e5","2. Nf3 Nc6","3. Bc4 Bc5"]},{"heading": "Ruy Lopez","bullet_points": ["1. e4 e5","2. Nf3 Nc6","3. Bb5"]}],"key_message": "Learning popular chess openings can help you start games effectively.","img_keywords": "chess openings, Italian Game, Ruy Lopez"},{"heading": "Chess Endgames","bullet_points": [{"heading": "King and Pawn Endgame","bullet_points": ["This endgame involves a king and one or more pawns against a lone king.","The goal is to promote a pawn to a new queen."]},{"heading": "Rook Endgame","bullet_points": ["This endgame involves a rook against a lone king.","The goal is to checkmate the opponent's king using the rook."]}],"key_message": "Understanding common chess endgames can help you win games.","img_keywords": "chess endgames, king and pawn endgame, rook endgame"},{"heading": "Conclusion","bullet_points": ["Chess is a complex game that requires strategy, tactics, and planning.","Understanding the rules, piece movements, and common strategies can help improve your chess skills.","Practice regularly to improve your game."],"key_message": "To excel at chess, one must understand its fundamentals and practice regularly.","img_keywords": "chess fundamentals, chess improvement, regular practice"}]}'''temp = tempfile.NamedTemporaryFile(delete=False, suffix='.pptx')path = pathlib.Path(temp.name)1 unmodified linegenerate_powerpoint_presentation(json5.loads(_JSON_DATA),output_file_path=path,slides_template='Minimalist Sales Pitch')print(f'File path: {path}')
123version https://git-lfs.github.com/spec/v1oid sha256:2a6da48abf9a44bde11fa8337519435d51fe5f161e605d8f5ab00d4a914fc964size 1298028.gitattributes+1
global_config.py+8-4
helpers/image_search.py+8
helpers/pptx_helper.py+216-105
pptx_templates/Minimalist_sales_pitch.pptxAdded+3