Expand description
§Cornell Notes Library
A Rust library for reading, writing, and validating Cornell Notes in standardized JSON format.
This library implements the Cornell Notes Data Schema RFC, providing type-safe structures and validation for the three-section note-taking system.
§Example
use cornell_notes::{CornellNote, Metadata};
use std::fs;
// Read a Cornell Note from file
let json = fs::read_to_string("note.json").unwrap();
let note = cornell_notes::from_json(&json).unwrap();
// Validate the note
note.validate().unwrap();
// Write back to JSON
let output = cornell_notes::to_json(¬e).unwrap();Structs§
- Attachment
- Attachment metadata
- Cornell
Note - Complete Cornell Note document
- Cue
- A cue entry in the left column
- Metadata
- Metadata for the Cornell Note document
- Note
- A note entry in the right column
- Section
- A section containing cues and notes
- Structured
Content - Structured content with format and optional attachments
- Summary
- Summary section at the bottom
Enums§
- Content
- Content can be either a simple string or structured object
- Content
Format - Content format for structured content
- Cornell
Note Error - Errors that can occur when working with Cornell Notes
- CueType
- Type of cue entry
- Note
Type - Type of note entry
Functions§
- from_
json - Parse a Cornell Note from JSON string
- from_
json_ unchecked - Parse a Cornell Note from JSON string without validation
- read_
from_ file - Read a Cornell Note from a file
- to_json
- Serialize a Cornell Note to JSON string
- to_
json_ pretty - Serialize a Cornell Note to pretty-printed JSON string
- to_
markdown - Export a Cornell Note to Markdown format
- write_
to_ file - Write a Cornell Note to a file
- write_
to_ markdown_ file - Write a Cornell Note to a Markdown file