Skip to content

Instantly share code, notes, and snippets.

View ssgosh's full-sized avatar
🌴
On vacation

Sabyasachi Ghosh ssgosh

🌴
On vacation
View GitHub Profile
@ssgosh
ssgosh / extract_pdf_highlights.py
Created July 15, 2024 06:15
Extract highlighted text from PDF files
"""
Extract highlighted text from PDFs in the given dir and its subdirs and save them
to text files with the same name as the PDFs, except with a .txt extension.
Tested with Python 3.10.4 and PyMuPDF==1.24.7
Created with the help of BingAI and various Stackoverflow and GitHub answers.
usage: extract_pdf_highlights.py [-h] dirname