Download scripts/extract_all_speaker_notes.py from MHamdan/SPARKNET: direct link, hf CLI and curl.
- Browser
- Download file 854 Bytes
-
https://huggingface.co/spaces/MHamdan/SPARKNET/resolve/76c3b0a8cd44eb930c2ad41fc0e95acdb3cd2bab/scripts/extract_all_speaker_notes.py
- Command line
-
hf download hf://spaces/MHamdan/SPARKNET@76c3b0a8cd44eb930c2ad41fc0e95acdb3cd2bab/scripts/extract_all_speaker_notes.py
-
curl -L -o extract_all_speaker_notes.py https://huggingface.co/spaces/MHamdan/SPARKNET/resolve/76c3b0a8cd44eb930c2ad41fc0e95acdb3cd2bab/scripts/extract_all_speaker_notes.py
854 Bytes
| from pptx import Presentation | |
| pptx_path = "/home/mhamdan/SPARKNET/presentation/SPARKNET_Academic_Presentation_IMPROVED.pptx" | |
| prs = Presentation(pptx_path) | |
| print("=" * 80) | |
| print("SPARKNET PRESENTATION - COMPLETE SPEAKER NOTES") | |
| print("=" * 80) | |
| print() | |
| for idx, slide in enumerate(prs.slides, 1): | |
| print(f"\n{'='*80}") | |
| print(f"SLIDE {idx}") | |
| print('='*80) | |
| print() | |
| if slide.has_notes_slide: | |
| notes_slide = slide.notes_slide | |
| if notes_slide.notes_text_frame: | |
| notes = notes_slide.notes_text_frame.text.strip() | |
| if notes: | |
| print(notes) | |
| else: | |
| print("(No speaker notes)") | |
| else: | |
| print("(No notes text frame)") | |
| else: | |
| print("(No notes slide)") | |
| print() | |
| print("\n" + "="*80) | |
| print("END OF SPEAKER NOTES") | |
| print("="*80) | |