1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//! Course Map - A tool to visualize course dependencies from Quarto/Markdown documents
//!
//! This library provides functionality to parse Quarto/Markdown documents and generate
//! visual dependency graphs showing the relationships between courses. It's designed to
//! help educators and course designers understand and visualize curriculum structures.
//!
//! ## Multi-Language Support
//!
//! This Rust library serves as the core for bindings in multiple languages:
//! - 🦀 **Rust**: Core library and command-line tool
//! - 🐍 **Python**: `pip install coursemap` - Object-oriented API with `CourseMap.show()` and `CourseMap.save()`
//! - 📊 **R**: `install.packages("coursemap")` - R package with Quarto integration
//!
//! ## Rust API Example
//!
//! ```rust,no_run
//! use coursemap::{Config, App};
//!
//! // Load configuration
//! let config = Config::load_default().unwrap();
//!
//! // Create app instance
//! let app = App::new(config);
//!
//! // Generate course map
//! app.run("./courses", "course_map.svg", "svg").unwrap();
//! ```
//!
//! ## Python API (Recommended)
//!
//! ```python
//! import coursemap
//!
//! # Quick display (like matplotlib.pyplot.show())
//! coursemap.show("./courses")
//!
//! # Object-oriented approach (recommended)
//! cm = coursemap.CourseMap("./courses")
//! cm.show() # Display inline in Jupyter/Quarto
//! cm.save("course_map.svg") # Save to file
//! ```
//!
//! ## R API
//!
//! ```r
//! library(coursemap)
//!
//! # Object-oriented approach (recommended)
//! cm <- coursemap("./courses")
//! plot(cm) # Display in RStudio/knitr
//! write_map(cm, "course_map.svg") # Save to file
//! ```
//!
//! ## Document Format
//!
//! Course documents should include frontmatter with course metadata:
//!
//! ```yaml
//! ---
//! title: "Introduction to Economics"
//! course-map:
//! id: intro
//! phase: Pre
//! prerequisites: []
//! ---
//! ```
pub use ;
pub use Config;
/// The main application structure