From 4bf0442b42784095fa7b2f8ac255bcfaaddd3dc7 Mon Sep 17 00:00:00 2001 From: aurc <54873456+aurc@users.noreply.github.com> Date: Thu, 23 Jun 2022 05:04:48 +1000 Subject: [PATCH] Additional README info and some convenience focusing defaults as template view is openened. (#6) --- README.md | 39 +++++++++++++++++++++++++--- internal/loggo/template_item_view.go | 3 +++ internal/loggo/template_view.go | 2 +- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3b93d42..3a4b82a 100644 --- a/README.md +++ b/README.md @@ -37,23 +37,51 @@ Interface (TUI). ## Getting Started -### macOS Systems: -The easiest way is to utilise [Homebrew](https://brew.sh/) package management system. Once -installed simply issue the following command: +### macOS/Linux with Homebrew/Linuxbrew: +The easiest way is to utilise [Homebrew](https://brew.sh/) **(macOS)** or [LinuxBrew](https://docs.brew.sh/Homebrew-on-Linux) **(Linux)** +package management system. Once installed simply issue the following command: ```` brew tap aurc/loggo brew install aurc/loggo/loggo ```` +### All Systems + +### Install with Go +Assuming you have [go](https://go.dev/) installed in your system (best choice if not homebrew) and bin packages +are in your `PATH`, just run: + +```` +go install github.com/aurc/loggo@latest +```` + ### Build from Source: Including **macOS**, build from source. Pre-Reqs: - [Golang](https://go.dev/) v1.8+ +- Checkout the project from [https://github.com/aurc/loggo/](https://github.com/aurc/loggo/) ```` go build -o loggo ```` +> Install the `loggo` binary in your system's binary bucket or add `loggo` binary to your +path. + +### Download Pre-Compiled binary + +This option might be suitable for you if you don't have Home/Linux-Brew or golang +readly available for you. In this case you can download a pre-compiled exectuable binary +for the following platforms: + +Latest Release [pre-build binaries here](https://github.com/aurc/loggo/releases/latest)! + +- Windows 11 plat (e.g. loggo_vx.y.z_linux_.tar.gz): +- Linux (both arm64 and amd64 plat): + - ubuntu: `tar.gz` file from releases (e.g. loggo_vx.y.z_linux_.tar.gz) + - debian: `*.deb` file from releases + - redhat: `*.rpm` file from releases + - alpine: `*.apk` file from releases ## Using l'oGGo @@ -130,3 +158,8 @@ prior the first release. - Copy single log entry to clipboard. - Browse/Load new log templates on the fly. - Create template with keys whose name contains `/` as it uses slashes to navigate to nested json branches. + +## Feedback + +Please let us know your **thoughts**, **feature requests** and **bug reports**! Use the issues report +link here: https://github.com/aurc/loggo/issues diff --git a/internal/loggo/template_item_view.go b/internal/loggo/template_item_view.go index e6a8779..cbe7219 100644 --- a/internal/loggo/template_item_view.go +++ b/internal/loggo/template_item_view.go @@ -149,6 +149,9 @@ func (t *TemplateItemView) makeUIComponents() { t.caseWhenLayout = tview.NewFlex().SetDirection(tview.FlexRow) t.caseWhenLayout.SetBackgroundColor(tcell.ColorBlack) t.caseWhenTable = tview.NewTable() + + t.app.SetFocus(t.form) + t.form.SetFocus(0) } func (t *TemplateItemView) makeCaseWhenForm() { diff --git a/internal/loggo/template_view.go b/internal/loggo/template_view.go index 27f9d85..882e609 100644 --- a/internal/loggo/template_view.go +++ b/internal/loggo/template_view.go @@ -143,7 +143,7 @@ func (t *TemplateView) makeLayouts() { AddItem(t.contextMenu, 30, 1, false). AddItem(t.table, 0, 2, true). SetBackgroundColor(color.ColorBackgroundField) - t.app.SetFocus(t.table) + go t.app.SetFocus(t.contextMenu) } func (t *TemplateView) makeSaveLayouts() {