obscura_storage/
obscura_storage.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Copyright (C) 2025 DorotaC
 * SPDX-License-Identifier: MIT OR Apache-2.0
 */

/*! Shows the contents of the device definition files. 
 * 
 * If your libobscura is configured correctly, you should see some device rules.
 * 
 * To see the entire contents of the database for your device, see `obscura_configs`.
*/

use clap::Parser;
use std::io;
use vidi;
use vidi::storage::{FileConfig, Io};

/// Shows the contents of the device definition files.
///
/// Use the environment variable "LIBOBSCURA_DEVICES_DIR" to set the builtin file location.
#[derive(Parser)]
#[clap(about)]
struct Args {
}

fn main() -> io::Result<()> {
    let _args = Args::parse();
    let mut config_io = FileConfig;
    for (source, facts) in config_io.device_definitions() {
        println!("Facts from {}:", source);
        println!("{:?}", facts);
        println!("-----------------");
    }
    Ok(())
}