Skip to content

Commit 2fb0aa0

Browse files
committed
Ran the pylint on the .py.
1 parent 101cf1d commit 2fb0aa0

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

ppt2video/convertor.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import sys
44

55
# PpSaveAsFileType enumeration (PowerPoint)
6-
ppSaveAsMP4 = 39
6+
ppSaveAsMP4 = 39
7+
78

89
def ppt2video(pptx, video, timing, duration, resolution, frames, quality):
910

@@ -26,27 +27,32 @@ def ppt2video(pptx, video, timing, duration, resolution, frames, quality):
2627

2728
# Presentation.CreateVideo method (PowerPoint)
2829
# https://docs.microsoft.com/en-us/office/vba/api/powerpoint.presentation.createvideo
29-
presentation.CreateVideo(video_path, timing, duration, resolution, frames, quality)
30+
presentation.CreateVideo(video_path, timing, duration,
31+
resolution, frames, quality)
3032
while True:
3133
try:
3234
# Update the video file, if already exists.
3335
os.rename(video_path, video_path)
34-
print(f'The video from PowerPoint Presentation {pptx} has been created.')
36+
print(f'The video from PowerPoint Presentation \
37+
{pptx} has been created.')
3538
break
3639
except Exception:
3740
pass
3841
presentation.Close()
3942
ppt.Quit()
4043
pass
4144

45+
4246
if __name__ == '__main__':
43-
file_name = "test.pptx" # PPT file expected to be in the root folder
44-
video_name = "test_video" # Video will be created in the root folder
45-
UseTimingsAndNarrations = False # Boolean value
46-
DefaultSlideDuration = 2 # Int
47-
VertResolution = 480 # Int
48-
FramesPerSecond = 24 # Int
49-
Quality = 60
47+
file_name = "" # e.g.:test.pptx, file expected to be in the root folder
48+
video_name = "" # e.g.: test_video, will be created in the root folder
49+
UseTimingsAndNarrations = False # Boolean value
50+
DefaultSlideDuration = 2 # Int
51+
VertResolution = 480 # Int
52+
FramesPerSecond = 24 # Int
53+
Quality = 60 # Int
5054

5155
ppt2video(f"./{file_name}", f"./{video_name}.mp4",
52-
UseTimingsAndNarrations, DefaultSlideDuration, VertResolution, FramesPerSecond, Quality)
56+
UseTimingsAndNarrations,
57+
DefaultSlideDuration, VertResolution,
58+
FramesPerSecond, Quality)

ppt2video/test.pptx

-734 KB
Binary file not shown.

0 commit comments

Comments
 (0)