2023-11-03 22:40:19 +01:00
|
|
|
use std::io;
|
|
|
|
|
2023-11-04 11:43:35 +01:00
|
|
|
mod overview;
|
2023-11-04 10:07:43 +01:00
|
|
|
mod par;
|
2023-11-03 22:40:19 +01:00
|
|
|
|
2023-11-04 10:07:43 +01:00
|
|
|
#[derive(Debug)]
|
2023-11-03 22:40:19 +01:00
|
|
|
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(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-04 00:05:38 +01:00
|
|
|
impl From<serde_json::Error> for Error {
|
|
|
|
fn from(value: serde_json::Error) -> Self {
|
|
|
|
Self {
|
|
|
|
msg: value.to_string(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-04 10:07:43 +01:00
|
|
|
impl From<roxmltree::Error> for Error {
|
|
|
|
fn from(value: roxmltree::Error) -> Self {
|
|
|
|
Self {
|
|
|
|
msg: value.to_string(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-03 22:40:19 +01:00
|
|
|
|
2023-11-03 13:45:25 +01:00
|
|
|
fn main() {
|
2023-11-04 11:43:35 +01:00
|
|
|
//overview::parse(10001899).unwrap(); //TEG
|
|
|
|
overview::parse(10001848).unwrap(); //UrhG
|
|
|
|
//par::parse("https://www.ris.bka.gv.at/Dokumente/Bundesnormen/NOR12025172/NOR12025172.xml");
|
2023-11-03 13:45:25 +01:00
|
|
|
}
|