From 06c765d4691dd65b926343e5391f627ac8a9c983 Mon Sep 17 00:00:00 2001 From: Nikolaus Gotsche Date: Wed, 22 May 2019 23:46:20 +0200 Subject: interactive analysis --- interact.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'interact.go') diff --git a/interact.go b/interact.go index d849eca..b8e5903 100644 --- a/interact.go +++ b/interact.go @@ -754,6 +754,40 @@ func interact(fulldb bool) { c.Println(promptcol("______________________")) }, }) + // Analysis commands + + analcmd := &ishell.Cmd{ + Name: "analysis", + Help: "monthly / yearly", + LongHelp: ` Usage: show analysis `, +// Show all Projects with a small summary sorted by Customer.`, + } + analcmd.AddCmd(&ishell.Cmd{ + Name: "monthly", + Help: "Show a montly Report of all available data", + LongHelp: ` Usage: show analysis monthly + Show a monthly report of all available data.`, + Func: func(c *ishell.Context) { + MakeAnalysis() + ShowMonthlyAnalysis() + stdOut() + c.Println(promptcol("______________________")) + }, + }) + analcmd.AddCmd(&ishell.Cmd{ + Name: "yearly", + Help: "Show a yearly Report of all available data", + LongHelp: ` Usage: show analysis yearly + Show a yearly report of all available data.`, + Func: func(c *ishell.Context) { + MakeAnalysis() + ShowYearlyAnalysis() + stdOut() + c.Println(promptcol("______________________")) + }, + }) + + showcmd.AddCmd(analcmd) shell.AddCmd(showcmd) } /* -- cgit v1.2.3