You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
442 B
21 lines
442 B
3 years ago
|
//! Basing application initialisation
|
||
|
|
||
|
use libko::*;
|
||
|
use std::path::PathBuf;
|
||
|
|
||
|
pub fn init(pid: Option<&str>, tf: Option<&str>, t: Option<&str>, rev: Option<&str>) -> Meta {
|
||
|
let mut meta = initialise();
|
||
|
|
||
|
meta.project_id = pid.map(Into::into);
|
||
|
|
||
|
if let Some(tfpath) = tf {
|
||
|
meta.load_timefile(tfpath);
|
||
|
}
|
||
|
|
||
|
if let Some(template) = t {
|
||
|
meta.template = Some(PathBuf::new().join(template));
|
||
|
}
|
||
|
|
||
|
dbg!(meta)
|
||
|
}
|