From fffc7a3b8a8a3ead3992d400ec9ed035f1f93b39 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 3 Oct 2023 09:31:05 +0200 Subject: use yaml for configuration --- import/Cargo.toml | 1 + import/src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'import') diff --git a/import/Cargo.toml b/import/Cargo.toml index 89d3ea9..9f0912a 100644 --- a/import/Cargo.toml +++ b/import/Cargo.toml @@ -16,6 +16,7 @@ reqwest = { version = "0.11.20", features = ["blocking", "json"] } serde = { version = "1.0.188", features = ["derive"] } serde_json = "1.0.107" +serde_yaml = "0.9.25" bincode = { version = "2.0.0-rc.3", features = ["serde"] } base64 = "0.21.4" rand = "0.8.5" diff --git a/import/src/main.rs b/import/src/main.rs index f017407..3affabd 100644 --- a/import/src/main.rs +++ b/import/src/main.rs @@ -94,8 +94,8 @@ fn main() -> anyhow::Result<()> { std::fs::create_dir_all(path.join("assets"))?; File::create_new(path.join("assets/front.htm"))? .write_fmt(format_args!("

My very own jellything instance

"))?; - serde_json::to_writer( - File::create_new(path.join("config.json"))?, + serde_yaml::to_writer( + File::create_new(path.join("config.yaml"))?, &GlobalConfig { brand: brand.clone(), slogan: "Creative slogan here".to_string(), -- cgit v1.2.3-70-g09d2