upd structs diagram
This commit is contained in:
parent
0713d49e7b
commit
a1375b17e0
Binary file not shown.
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 87 KiB |
|
@ -5,13 +5,14 @@ namespace book {
|
||||||
class MDBook {
|
class MDBook {
|
||||||
project_root: PathBuf,
|
project_root: PathBuf,
|
||||||
template_dir: PathBuf,
|
template_dir: PathBuf,
|
||||||
|
src_base: PathBuf,
|
||||||
dest_base: PathBuf,
|
dest_base: PathBuf,
|
||||||
render_intent: RenderIntent,
|
render_intent: RenderIntent,
|
||||||
|
|
||||||
translations: HashMap<String, Book>,
|
translations: HashMap<String, Book>,
|
||||||
|
|
||||||
indent_spaces: i32,
|
indent_spaces: i32,
|
||||||
livereload: bool,
|
pub livereload_script: Option<String>,
|
||||||
|
|
||||||
new(project_root)
|
new(project_root)
|
||||||
}
|
}
|
||||||
|
@ -24,15 +25,19 @@ class book::Book {
|
||||||
}
|
}
|
||||||
|
|
||||||
class book::Chapter {
|
class book::Chapter {
|
||||||
title: String,
|
pub title: String,
|
||||||
path: PathBuf,
|
pub content: Option<String>,
|
||||||
dest_path: Option<PathBuf>,
|
|
||||||
authors: Option<Vec<Author>>,
|
|
||||||
translators: Option<Vec<Author>>,
|
|
||||||
description: Option<String>,
|
|
||||||
css_class: Option<String>,
|
|
||||||
|
|
||||||
new(title, path)
|
src_path: Option<PathBuf>,
|
||||||
|
dest_path: Option<PathBuf>,
|
||||||
|
|
||||||
|
pub translation_links: Option<Vec<TranslationLink>>,
|
||||||
|
pub authors: Option<Vec<Author>>,
|
||||||
|
pub translators: Option<Vec<Author>>,
|
||||||
|
pub description: Option<String>,
|
||||||
|
pub css_class: Option<String>,
|
||||||
|
|
||||||
|
new(title, src_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,20 +45,20 @@ class book::Chapter {
|
||||||
namespace book::bookconfig {
|
namespace book::bookconfig {
|
||||||
|
|
||||||
class BookConfig {
|
class BookConfig {
|
||||||
dest: PathBuf,
|
pub dest: PathBuf,
|
||||||
src: PathBuf,
|
pub src: PathBuf,
|
||||||
|
|
||||||
title: String,
|
pub title: String,
|
||||||
subtitle: Option<String>,
|
pub subtitle: Option<String>,
|
||||||
description: Option<String>,
|
pub description: Option<String>,
|
||||||
language: Language,
|
pub language: Language,
|
||||||
authors: Vec<Author>,
|
pub authors: Vec<Author>,
|
||||||
translators: Option<Vec<Author>>,
|
pub translators: Option<Vec<Author>>,
|
||||||
publisher: Option<Publisher>,
|
pub publisher: Option<Publisher>,
|
||||||
number_format: NumberFormat,
|
pub number_format: NumberFormat,
|
||||||
section_names: Vec<String>,
|
pub section_names: Vec<String>,
|
||||||
is_main_book: bool,
|
pub is_main_book: bool,
|
||||||
is_multilang: bool,
|
pub is_multilang: bool,
|
||||||
|
|
||||||
new(project_root)
|
new(project_root)
|
||||||
}
|
}
|
||||||
|
@ -92,9 +97,9 @@ enum NumberFormat {
|
||||||
namespace book::toc {
|
namespace book::toc {
|
||||||
|
|
||||||
class TocContent {
|
class TocContent {
|
||||||
chapter: Chapter,
|
pub chapter: Chapter,
|
||||||
sub_items: Option<Vec<TocItem>>,
|
pub sub_items: Option<Vec<TocItem>>,
|
||||||
section: Option<Vec<i32>>,
|
pub section: Option<Vec<i32>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
enum TocItem {
|
enum TocItem {
|
||||||
|
|
Loading…
Reference in New Issue