Created
February 7, 2024 16:17
-
-
Save lukasbm/ff2b32957aef32c10321e1988a2e9789 to your computer and use it in GitHub Desktop.
extract pdfpc notes to markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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