Skip to content

Commit f1a56fc

Browse files
committed
html
1 parent 69dba37 commit f1a56fc

File tree

5 files changed

+884
-2
lines changed

5 files changed

+884
-2
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ commands = "0.0.5"
4242
env_logger = "0.10"
4343
log = { version = "~0.4", features = ["std"] }
4444
normpath = "1.1.0"
45+
liquid = "0.26.0"
46+
once_cell = "1.18.0"
47+
rayon = "1.7.0"
48+
regex = "1.9.1"
4549

4650
[dev-dependencies]
4751
tempfile = "3.3"

src/cli.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use clap::Parser;
33
use std::path::PathBuf;
44

55
use svdtools::{
6-
convert::convert_cli, html::htmlcompare_cli, interrupts::interrupts_cli,
6+
convert::convert_cli, html::html_cli, html::htmlcompare_cli, interrupts::interrupts_cli,
77
makedeps::makedeps_cli, mmap::mmap_cli, patch::patch_cli,
88
};
99

@@ -82,13 +82,23 @@ enum Command {
8282
#[clap(long)]
8383
format_config: Option<PathBuf>,
8484
},
85+
/// Generates webpage with tables of existing peripherals
8586
Htmlcompare {
86-
/// Path to output html files
87+
/// Path to write HTML files to
8788
htmldir: PathBuf,
8889

8990
/// Input SVD XML files
9091
svdfiles: Vec<PathBuf>,
9192
},
93+
/// Generates a webpage for a given SVD file containing details on every
94+
/// peripheral and register and their level of coverage.
95+
Html {
96+
/// Path to write HTML files to
97+
htmldir: PathBuf,
98+
99+
/// Path to patched SVD files
100+
svdfiles: Vec<PathBuf>,
101+
},
92102
}
93103

94104
impl Command {
@@ -133,6 +143,9 @@ impl Command {
133143
Self::Htmlcompare { htmldir, svdfiles } => {
134144
htmlcompare_cli::htmlcompare(htmldir, svdfiles)?;
135145
}
146+
Self::Html { htmldir, svdfiles } => {
147+
html_cli::svd2html(htmldir, svdfiles)?;
148+
}
136149
}
137150
Ok(())
138151
}

0 commit comments

Comments
 (0)