aboutsummaryrefslogtreecommitdiff
path: root/apps/koffice/invoice/src/base.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/koffice/invoice/src/base.rs')
-rw-r--r--apps/koffice/invoice/src/base.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/koffice/invoice/src/base.rs b/apps/koffice/invoice/src/base.rs
new file mode 100644
index 000000000000..a29af6480bf8
--- /dev/null
+++ b/apps/koffice/invoice/src/base.rs
@@ -0,0 +1,20 @@
+//! 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)
+}