Crate cornell_notes

Crate cornell_notes 

Source
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(&note).unwrap();

Structs§

Attachment
Attachment metadata
CornellNote
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
StructuredContent
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
ContentFormat
Content format for structured content
CornellNoteError
Errors that can occur when working with Cornell Notes
CueType
Type of cue entry
NoteType
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

Type Aliases§

Result