Skip to content

Instantly share code, notes, and snippets.

View cjudd's full-sized avatar

Christopher M. Judd cjudd

View GitHub Profile
@cjudd
cjudd / GrabBooks.py
Last active December 24, 2022 16:05
I have lots of PDF books and wanted to create a simple index that I can search. So this script generates a Markdown file containing filename, title, metadata and outline if it is available.
from pathlib import Path
from mdutils.mdutils import MdUtils
from mdutils import Html
from PyPDF2 import PdfReader
mdFile = MdUtils(file_name='books', title='My PDF Books')
def outline_list(outline):
result = []
for heading in outline: