trying to improve forge
This commit is contained in:
parent
a10b75d453
commit
44f860caa0
27
main.go
27
main.go
|
@ -31,17 +31,6 @@ var ARGNAME string = "gemini"
|
||||||
// using this for now. triggers config save
|
// using this for now. triggers config save
|
||||||
var configSave bool
|
var configSave bool
|
||||||
|
|
||||||
/*
|
|
||||||
func getVersion(repo *gitpb.Repo, name string) string {
|
|
||||||
cmd := []string{"git", "describe", "--tags", "--always", name}
|
|
||||||
result, _ := repo.RunQuiet(cmd)
|
|
||||||
output := strings.Join(result.Stdout, "\n")
|
|
||||||
log.Info("cmd =", cmd, output)
|
|
||||||
|
|
||||||
return strings.TrimSpace(output)
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
me = new(mainType)
|
me = new(mainType)
|
||||||
gui.InitArg()
|
gui.InitArg()
|
||||||
|
@ -65,20 +54,8 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if argv.Add != "" {
|
if argv.Add != "" {
|
||||||
log.Info("add new conversation to protobuf", argv.Add)
|
me.chats.AddFile(argv.Add)
|
||||||
pb := parseRichLog(argv.Add)
|
me.chats.ConfigSave()
|
||||||
verifyUuids(pb)
|
|
||||||
all := pb.SortByUuid()
|
|
||||||
for all.Scan() {
|
|
||||||
chat := all.Next()
|
|
||||||
log.Info("NEW CHAT", chat.From, chat.Uuid)
|
|
||||||
if test := me.chats.FindByContentFile(chat.ContentFile); test != nil {
|
|
||||||
log.Info("NOT NEW CHAT", test.ContentFile)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
me.chats.AppendByUuid(chat)
|
|
||||||
}
|
|
||||||
pb.ConfigSave()
|
|
||||||
okExit("")
|
okExit("")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue