Last active
April 19, 2020 19:49
-
-
Save jameslittle230/8102a02f178a80fb40f8da03d9127455 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn temp_write_config(_args: &[String]) { | |
let config = Config { | |
input: InputConfig { | |
base_directory: ".".to_string(), | |
stemming: StemmingConfig{ | |
enabled: true, | |
language: Algorithm::French | |
}, | |
files: vec![ | |
stork::config::File { | |
title: "Title".to_string(), | |
url: "url".to_string(), | |
source: DataSource::FilePath("filepath.txt".to_string()), | |
filetype: Some(Filetype::SRTSubtitle), | |
..Default::default() | |
}, | |
stork::config::File { | |
title: "Title".to_string(), | |
url: "url".to_string(), | |
source: DataSource::FilePath("filepath.txt".to_string()), | |
filetype: Some(Filetype::SRTSubtitle), | |
..Default::default() | |
}, | |
], | |
..Default::default() | |
}, | |
output: OutputConfig { | |
filename: "something.st".to_string(), | |
..Default::default() | |
}, | |
}; | |
println!( | |
"{}", | |
match toml::to_string(&config) { | |
Ok(toml) => toml, | |
Err(e) => e.to_string(), | |
} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment