From 0529b0dca08efddf0591ebf3a1bf11a303f10277 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 4 Mar 2025 20:29:23 -0600 Subject: [PATCH] docs --- README.md | 20 +++++++++++++++----- windowRepos.go | 33 +++++++++++++++++---------------- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 1e5ed17..007c188 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # forge +## Design Goals + +* Software engineering is the art of making things work. +* Release engineering is the art of making things perfect. + +## Notes + This can be used to maintain git repositories expiremental work on federated git @@ -9,22 +16,25 @@ expiremental work on federated git * uses a GUI or the console(console display needs work) * always wrap around 'git' -- it basically just types 'git' commands really fast -## Notes & Goals: +## Development Goals -* use a GUI that also works on the command line -* andlabs GTK gui plugin starts breaking around 200 repos +* have a GUI that also works on the command line ## Install: * go install go.wit.com/apps/forge@latest -## building from sources (may work Jan 2026) +## building from sources ``` +# note as of Feb 2025. Forge has an option in forge to build itself. +# The instructions below are out of date, but provide the general idea. +# accurate instructions are in the forge code itself + go install go.wit.com/apps/go-clone@latest # this tool makes it easier to 'git clone' repos and recursively 'git clone' the dependancies go install go.wit.com/apps/autogenpb@latest # this tool will generate the protobuf *pb.go files (also Marshal(), Sort(), etc.) -go-clone --recursive go.wit.com/apps/forge # this will 'git clone' about 20 repos into ~/go/src (or where your go.work file is) +go-clone go.wit.com/apps/forge # this will 'git clone' about 20 repos into ~/go/src (or where your go.work file is) cd go.wit.com/lib/protobuf/forgepb make # autogenpb will make .pb.go, marshal.pb.go and sort.pb.go files diff --git a/windowRepos.go b/windowRepos.go index 2e76a24..5d619d5 100644 --- a/windowRepos.go +++ b/windowRepos.go @@ -95,25 +95,26 @@ func makeReposWin() *gadgets.GenericWindow { log.Info("test delete window here") } grid := insertWin.Group.RawGrid() - grid.NewButton("do something", func() { - log.Info("do something on each pb row") - }) - grid.NewButton("attempt to insert table", func() { - // make the window for the first time - found := new(gitpb.Repos) - all := me.forge.Repos.SortByFullPath() - for all.Scan() { - repo := all.Next() - if me.forge.Config.IsReadOnly(repo.GetGoPath()) { - continue - } - - found.AppendByGoPath(repo) - + var t *gitpb.ReposTable + found := new(gitpb.Repos) + all := me.forge.Repos.SortByFullPath() + for all.Scan() { + repo := all.Next() + if me.forge.Config.IsReadOnly(repo.GetGoPath()) { + continue } - t := addWindowPB(insertWin, found) + + found.AppendByGoPath(repo) + + } + grid.NewButton("insert table", func() { + // make the window for the first time + t = addWindowPB(insertWin, found) log.Info("table has uuid", t.GetUuid()) }) + grid.NewButton("attempt to delete table", func() { + t.Delete() + }) }) grid.NewButton("Configure", func() {