getquotes 0.7.0

A simple cli tool to get quotes in your terminal using WikiQuotes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use getquotes::config::Config;
use schemars::schema_for;
use std::error::Error;
use std::fs;
use std::path::Path;

fn main() -> Result<(), Box<dyn Error>> {
    let schema = schema_for!(Config);
    let output_dir = Path::new("config");
    fs::create_dir_all(output_dir)?;
    let output_path = output_dir.join("config.schema.json");
    fs::write(output_path, serde_json::to_string_pretty(&schema)?)?;
    Ok(())
}