attheme-rs
A Rust crate for parsing and serialization of .attheme files.
Add this in your Cargo.toml
:
toml
[dependencies]
attheme = "0.2"
```rs extern crate attheme;
use std::fs; use attheme::Attheme;
let contents = fs::read("path/to.attheme"); let mut theme = Attheme::from_bytes(&contents[..]);
theme.variables.insert("divider".to_string(), [0, 0, 0, 0x10]);
if let Some() = theme.variables.get("chatwallpaper".to_string()) { println!("The theme has a color wallpaper"); } ```
```rs extern crate attheme;
use std::fs; use attheme::Attheme;
let contents = fs::read("path/to.attheme"); let theme = Attheme::from_bytes(&contents[..]);
if let Some(wallpaper) = theme.wallpaper { fs::write("path/to/image.jpg", wallpaper); } ```
See the documentation on docs.rs.