Spaces:
Running
Running
Update helpers/pptx_helper.py
Browse files- helpers/pptx_helper.py +2 -23
helpers/pptx_helper.py
CHANGED
@@ -110,7 +110,7 @@ def generate_powerpoint_presentation(
|
|
110 |
title.text, len(parsed_data['slides']),
|
111 |
GlobalConfig.PPTX_TEMPLATE_FILES[slides_template]['file']
|
112 |
)
|
113 |
-
subtitle.text = 'by
|
114 |
all_headers = [title.text, ]
|
115 |
|
116 |
# Add content in a loop
|
@@ -363,13 +363,7 @@ def _handle_display_image__in_foreground(
|
|
363 |
ims.get_image_from_url(photo_url)
|
364 |
)
|
365 |
|
366 |
-
|
367 |
-
slide=slide,
|
368 |
-
slide_width_inch=slide_width_inch,
|
369 |
-
slide_height_inch=slide_height_inch,
|
370 |
-
text='Photo provided by Pexels',
|
371 |
-
hyperlink=page_url
|
372 |
-
)
|
373 |
except Exception as ex:
|
374 |
logger.error(
|
375 |
'*** Error occurred while running adding image to slide: %s',
|
@@ -439,13 +433,6 @@ def _handle_display_image__in_background(
|
|
439 |
width=pptx.util.Inches(slide_width_inch),
|
440 |
)
|
441 |
|
442 |
-
_add_text_at_bottom(
|
443 |
-
slide=slide,
|
444 |
-
slide_width_inch=slide_width_inch,
|
445 |
-
slide_height_inch=slide_height_inch,
|
446 |
-
text='Photo provided by Pexels',
|
447 |
-
hyperlink=page_url
|
448 |
-
)
|
449 |
|
450 |
# Move picture to background
|
451 |
# https://github.com/scanny/python-pptx/issues/49#issuecomment-137172836
|
@@ -560,14 +547,6 @@ def _handle_icons_ideas(
|
|
560 |
for run in paragraph.runs:
|
561 |
run.font.color.theme_color = pptx.enum.dml.MSO_THEME_COLOR.TEXT_2
|
562 |
|
563 |
-
_add_text_at_bottom(
|
564 |
-
slide=slide,
|
565 |
-
slide_width_inch=slide_width_inch,
|
566 |
-
slide_height_inch=slide_height_inch,
|
567 |
-
text='More icons available in the SlideDeck AI repository',
|
568 |
-
hyperlink='https://github.com/barun-saha/slide-deck-ai/tree/main/icons/png128'
|
569 |
-
)
|
570 |
-
|
571 |
return True
|
572 |
|
573 |
return False
|
|
|
110 |
title.text, len(parsed_data['slides']),
|
111 |
GlobalConfig.PPTX_TEMPLATE_FILES[slides_template]['file']
|
112 |
)
|
113 |
+
subtitle.text = 'by Rayyan's PowerPointAI:)'
|
114 |
all_headers = [title.text, ]
|
115 |
|
116 |
# Add content in a loop
|
|
|
363 |
ims.get_image_from_url(photo_url)
|
364 |
)
|
365 |
|
366 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
except Exception as ex:
|
368 |
logger.error(
|
369 |
'*** Error occurred while running adding image to slide: %s',
|
|
|
433 |
width=pptx.util.Inches(slide_width_inch),
|
434 |
)
|
435 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
|
437 |
# Move picture to background
|
438 |
# https://github.com/scanny/python-pptx/issues/49#issuecomment-137172836
|
|
|
547 |
for run in paragraph.runs:
|
548 |
run.font.color.theme_color = pptx.enum.dml.MSO_THEME_COLOR.TEXT_2
|
549 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
550 |
return True
|
551 |
|
552 |
return False
|