Skip to content

Instantly share code, notes, and snippets.

@jameslittle230
Last active April 19, 2020 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameslittle230/8102a02f178a80fb40f8da03d9127455 to your computer and use it in GitHub Desktop.
Save jameslittle230/8102a02f178a80fb40f8da03d9127455 to your computer and use it in GitHub Desktop.
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