Register a GoodNotes PDF folder in the AI Study Buddy registry, verify inferred metadata with a dry run, and then link the registered GoodNotes mains to mirrored DaydreamEdu templates. Use when the user wants a GoodNotes folder scanned into the registry or wants the matching DaydreamEdu template links created for that folder.
Use this workflow for one explicit GoodNotes folder at a time.
Prefer the pdf_file_manager utility through its Python API or the MCP pdf_* tools. Do not query the registry SQLite database directly for normal lookup or mutation work.
This skill is for folders like:
.../GoodNotes/<subject>/<student-email>/<grade-or-scope>/Book/<book name>
.../GoodNotes/<subject>/<student-email>/<grade-or-scope>/Exam
.../GoodNotes/<subject>/<student-email>/<grade-or-scope>/Exercise
Important scan behavior:
scan_for_new_files(...) scans only direct *.pdf children of the supplied folder.Check whether the exact folder is already configured as a scan root.
PdfFileManager().list_scan_roots()pdf_list_scan_rootsIf missing, add that exact folder as a scan root. When the folder is student-specific, set student_id.
PdfFileManager().add_scan_root(path, student_id=...)pdf_add_scan_rootDo not assume a parent or sibling root is enough; use the exact leaf folder the user wants scanned.
Run a dry run on the explicit folder first.
PdfFileManager().scan_for_new_files(roots=[root], dry_run=True)pdf_scan_for_new_filesReport:
For .../Book/<book name>/... paths, expect doc_type='book'. For student-email paths, expect the student-specific student_id and usually is_template=False.
If the dry run looks correct, run the real scan on that same explicit root.
PdfFileManager().scan_for_new_files(roots=[root], dry_run=False)pdf_scan_for_new_filesAfter the scan, summarize:
main filesdoc_type, student_id, subject, is_templatemetadata fields such as grade_or_scope and unitFor GoodNotes c_ / _c_ files, it is normal for them to register as main without creating raw archives.
After registration, link the GoodNotes mains to their mirrored DaydreamEdu templates.
PdfFileManager().link_goodnotes_template_for_file(main_path, auto_fix_template=True, inherit_metadata=True)PdfFileManager().link_goodnotes_templates_for_root(root, dry_run=False, auto_fix_template=True, inherit_metadata=True)pdf_link_goodnotes_template_for_file, pdf_link_goodnotes_templates_for_rootPreferred order:
dry_run=True) and review which files would link vs fail.Useful helper:
PdfFileManager().resolve_goodnotes_template_path(main_path)pdf_resolve_goodnotes_templateWhen finishing, tell the user: