summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-07-17 21:03:04 -0700
committerMatthias Beyer <mail@beyermatthias.de>2018-11-11 13:16:25 +0100
commit4b7db6716174818c512086d0e4753e61dbb53c75 (patch)
tree1f23e9f95c63f41eee124bf049e8f5dbfe16debe
parent4e516ee19d682e77fa72a93cf15e3b8832346fbb (diff)
Init imag-health
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--Cargo.toml1
-rw-r--r--bin/domain/imag-health/Cargo.toml38
-rw-r--r--bin/domain/imag-health/src/main.rs57
-rw-r--r--bin/domain/imag-health/src/ui.rs38
4 files changed, 134 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 742f533..e366ffe 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,6 +20,7 @@ members = [
"bin/domain/imag-contact",
"bin/domain/imag-diary",
"bin/domain/imag-habit",
+ "bin/domain/imag-health",
"bin/domain/imag-log",
"bin/domain/imag-mail",
"bin/domain/imag-notes",
diff --git a/bin/domain/imag-health/Cargo.toml b/bin/domain/imag-health/Cargo.toml
new file mode 100644
index 0000000..c531d49
--- /dev/null
+++ b/bin/domain/imag-health/Cargo.toml
@@ -0,0 +1,38 @@
+[package]
+name = "imag-health"
+version = "0.8.0"
+authors = ["Matthias Beyer <mail@beyermatthias.de>"]
+
+description = "Part of the imag core distribution: imag-health command"
+
+keywords = ["imag", "PIM", "personal", "information", "management"]
+readme = "../../../README.md"
+license = "LGPL-2.1"
+
+documentation = "https://imag-pim.org/doc/"
+repository = "https://github.com/matthiasbeyer/imag"
+homepage = "http://imag-pim.org"
+
+build = "../../../build.rs"
+
+[badges]
+travis-ci = { repository = "matthiasbeyer/imag" }
+is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }
+is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
+maintenance = { status = "actively-developed" }
+
+[dependencies]
+log = "0.4.0"
+toml = "0.4"
+toml-query = "0.6"
+
+libimagrt = { version = "0.8.0", path = "../../../lib/core/libimagrt" }
+libimagerror = { version = "0.8.0", path = "../../../lib/core/libimagerror" }
+libimagstore = { version = "0.8.0", path = "../../../lib/core/libimagstore" }
+libimagutil = { version = "0.8.0", path = "../../../lib/etc/libimagutil" }
+
+[dependencies.clap]
+version = "^2.29"
+default-features = false
+features = ["color", "suggestions", "wrap_help"]
+
diff --git a/bin/domain/imag-health/src/main.rs b/bin/domain/imag-health/src/main.rs
new file mode 100644
index 0000000..f4fc980
--- /dev/null
+++ b/bin/domain/imag-health/src/main.rs
@@ -0,0 +1,57 @@
+//
+// imag - the personal information management suite for the commandline
+// Copyright (C) 2015-2018 Matthias Beyer <mail@beyermatthias.de> and contributors
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; version
+// 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#![deny(
+ non_camel_case_types,
+ non_snake_case,
+ path_statements,
+ trivial_numeric_casts,
+ unstable_features,
+ unused_allocation,
+ unused_import_braces,
+ unused_imports,
+ unused_must_use,
+ unused_mut,
+ unused_qualifications,
+ while_true,
+)]
+
+extern crate clap;
+#[macro_use] extern crate log;
+extern crate toml;
+extern crate toml_query;
+
+#[macro_use] extern crate libimagrt;
+extern crate libimagerror;
+extern crate libimagutil;
+
+mod ui;
+
+use ui::build_ui;
+
+fn main() {
+ let version = make_imag_version!();
+ let rt = generate_runtime_setup("imag-health",
+ &version,
+ "Health tracking subsuite of imag",
+ build_ui);
+
+ unimplemented!()
+}
+
diff --git a/bin/domain/imag-health/src/ui.rs b/bin/domain/imag-health/src/ui.rs
new file mode 100644
index 0000000..19fd3fc
--- /dev/null
+++ b/bin/domain/imag-health/src/ui.rs
@@ -0,0 +1,38 @@
+//
+// imag - the personal information management suite for the commandline
+// Copyright (C) 2015-2018 Matthias Beyer <mail@beyermatthias.de> and contributors
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; version
+// 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+use clap::{Arg, App, SubCommand};
+
+use libimagutil::cli_validators::*;
+
+pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
+ app
+ .subcommand(SubCommand::with_name("weight")
+ .about("Weight tracking tool")
+ .version("0.1")
+ )
+ .subcommand(SubCommand::with_name("workout")
+ .about("Workout tracking and planning tool")
+ .version("0.1")
+ )
+ .subcommand(SubCommand::with_name("diet")
+ .about("Diet tracking and planning tool")
+ .version("0.1")
+ )
+}