summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-07-16 04:54:35 +0200
committerMatthias Beyer <mail@beyermatthias.de>2018-11-11 13:16:30 +0100
commitd704d7cc079eea2f2a71d9fcc905d1d67e188d2b (patch)
tree26ce98536ccd1366872b1378accd28aaa527392b
parent4e516ee19d682e77fa72a93cf15e3b8832346fbb (diff)
Add "imag-ingredient" CLI toolimag-ingredient
-rw-r--r--Cargo.toml1
-rw-r--r--bin/domain/imag-ingredient/Cargo.toml38
l---------bin/domain/imag-ingredient/README.md1
-rw-r--r--bin/domain/imag-ingredient/src/main.rs58
-rw-r--r--bin/domain/imag-ingredient/src/ui.rs24
-rw-r--r--doc/src/04020-module-ingredient.md4
6 files changed, 126 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 742f533..2f6234b 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-ingredient",
"bin/domain/imag-log",
"bin/domain/imag-mail",
"bin/domain/imag-notes",
diff --git a/bin/domain/imag-ingredient/Cargo.toml b/bin/domain/imag-ingredient/Cargo.toml
new file mode 100644
index 0000000..7fabb42
--- /dev/null
+++ b/bin/domain/imag-ingredient/Cargo.toml
@@ -0,0 +1,38 @@
+[package]
+name = "imag-ingredient"
+version = "0.9.0"
+authors = ["Matthias Beyer <mail@beyermatthias.de>"]
+
+description = "Part of the imag core distribution: imag-ingredient 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.9.0", path = "../../../lib/core/libimagrt" }
+libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }
+libimagbookmark = { version = "0.9.0", path = "../../../lib/domain/libimagbookmark" }
+libimagutil = { version = "0.9.0", path = "../../../lib/etc/libimagutil" }
+
+[dependencies.clap]
+version = "^2.29"
+default-features = false
+features = ["color", "suggestions", "wrap_help"]
+
diff --git a/bin/domain/imag-ingredient/README.md b/bin/domain/imag-ingredient/README.md
new file mode 120000
index 0000000..810c25c
--- /dev/null
+++ b/bin/domain/imag-ingredient/README.md
@@ -0,0 +1 @@
+../../../doc/src/04020-module-ingredient.md \ No newline at end of file
diff --git a/bin/domain/imag-ingredient/src/main.rs b/bin/domain/imag-ingredient/src/main.rs
new file mode 100644
index 0000000..535a7f2
--- /dev/null
+++ b/bin/domain/imag-ingredient/src/main.rs
@@ -0,0 +1,58 @@
+//
+// 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 libimagrt;
+
+use libimagrt::runtime::Runtime;
+use libimagrt::setup::generate_runtime_setup;
+
+mod ui;
+
+fn main() {
+ let version = make_imag_version!();
+ let rt = generate_runtime_setup("imag-ingredient",
+ &version,
+ "Helper for imag-recipe to track ingredients",
+ ui::build_ui);
+
+ let _ = rt
+ .cli()
+ .subcommand_name()
+ .map(|name| {
+ debug!("Call {}", name);
+ unimplemented!()
+ })
+}
diff --git a/bin/domain/imag-ingredient/src/ui.rs b/bin/domain/imag-ingredient/src/ui.rs
new file mode 100644
index 0000000..a0b9398
--- /dev/null
+++ b/bin/domain/imag-ingredient/src/ui.rs
@@ -0,0 +1,24 @@
+//
+// 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};
+
+pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
+ app
+}
diff --git a/doc/src/04020-module-ingredient.md b/doc/src/04020-module-ingredient.md
new file mode 100644
index 0000000..ac3175f
--- /dev/null
+++ b/doc/src/04020-module-ingredient.md
@@ -0,0 +1,4 @@
+## Ingredient {#sec:modules:ingredient}
+
+Helper for imag-recipe to track ingredients.
+