Skip to content

Instantly share code, notes, and snippets.

View avneeshchaudhary's full-sized avatar
🏠
Working from home

Avneesh avneeshchaudhary

🏠
Working from home
View GitHub Profile
@avneeshchaudhary
avneeshchaudhary / pptx2pdf.py
Last active April 15, 2024 18:20
Converts PPTX files to PDF on Mac
import os
def pptx2pdf():
"""
Install unoconv on your system.
"""
for filename in os.listdir(os.getcwd()):
if filename.endswith(".pptx"):
os.system(f'unoconv -f pdf "{os.path.join(os.getcwd(), filename)}"')
print(f"Converted {filename} to {os.path.splitext(filename)[0]}.pdf")