Skip to content

Instantly share code, notes, and snippets.

@lukasbm
Created February 7, 2024 16:17
Show Gist options
  • Save lukasbm/ff2b32957aef32c10321e1988a2e9789 to your computer and use it in GitHub Desktop.
Save lukasbm/ff2b32957aef32c10321e1988a2e9789 to your computer and use it in GitHub Desktop.
extract pdfpc notes to markdown
import sys
import json
from pprint import pprint
if len(sys.argv) != 2:
print("Usage: python pdfpc_parser.py <filename>")
exit(1)
filename = sys.argv[1]
with open(filename, 'r') as f:
data = json.load(f)
notes = set(map(lambda x: x["note"], list(data["pages"])))
with open("notes.md", "w") as f:
out = "\n\n---\n\n".join(notes)
f.write(out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment