Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

domi

domi provides abstractions and utilities for domain-list-community data source.

Example

use std::{fs, path::Path};

use domi::Entries;

const BASE: &str = "alphabet";

fn main() {
    let data_root = Path::new("data");

    let content = fs::read_to_string(data_root.join(BASE)).unwrap();

    let mut entries = Entries::parse(BASE, content);

    while let Some(i) = entries.next_include() {
        entries.parse_include_with(i.target(), || {
            fs::read_to_string(data_root.join(i.target())).unwrap()
        });
    }

    println!("{:?}", entries)
}

find more examples at examples/

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

domi provides abstractions and utilities for domain-list-community data source.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages