49 lines
823 B
Rust
49 lines
823 B
Rust
use std::io;
|
|
|
|
use law::LawBuilder;
|
|
|
|
mod law;
|
|
mod overview;
|
|
mod par;
|
|
|
|
#[derive(Debug)]
|
|
pub struct Error {
|
|
msg: String,
|
|
}
|
|
|
|
impl From<ureq::Error> for Error {
|
|
fn from(value: ureq::Error) -> Self {
|
|
Self {
|
|
msg: value.to_string(),
|
|
}
|
|
}
|
|
}
|
|
impl From<io::Error> for Error {
|
|
fn from(value: io::Error) -> Self {
|
|
Self {
|
|
msg: value.to_string(),
|
|
}
|
|
}
|
|
}
|
|
impl From<serde_json::Error> for Error {
|
|
fn from(value: serde_json::Error) -> Self {
|
|
Self {
|
|
msg: value.to_string(),
|
|
}
|
|
}
|
|
}
|
|
impl From<roxmltree::Error> for Error {
|
|
fn from(value: roxmltree::Error) -> Self {
|
|
Self {
|
|
msg: value.to_string(),
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
env_logger::init();
|
|
let law = LawBuilder::new("UrhG");
|
|
|
|
law.to_md();
|
|
}
|