mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-27 20:36:29 -04:00
Sync with latest libmutton development version
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
MUTN
|
||||
Copyright (c) 2024-2025 Randall Winkhart
|
||||
Copyright (c) 2024-2026 Randall Winkhart
|
||||
|
||||
MUTN is licensed under the AGPL 3.0 due to its usage of
|
||||
a custom fork of https://github.com/jessp01/gohighlight.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH MUTN 1 "26 December 2025" "v0.D.0" "MUTN man page"
|
||||
.TH MUTN 1 "01 January 2026" "v0.D.0" "MUTN man page"
|
||||
|
||||
.SH NAME
|
||||
\fBmutn\fR - Simple, self-hosted, SSH-synchronized password and note management based on libmutton.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
**WARNING: AS LIBMUTTON HAS NOT YET REACHED v1.0.0, [BREAKING CHANGES](https://github.com/rwinkhart/libmutton/blob/main/wiki/breaking.md) IN FUTURE UPDATES ARE PLANNED**
|
||||
|
||||
**MUTN v0.4.0**
|
||||
Built with libmutton v0.5.0
|
||||
Release date TBD
|
||||
|
||||
This release syncs with libmutton v0.5.0 and adds a new multi-field copy menu.
|
||||
@@ -5,7 +5,7 @@ go 1.25.5
|
||||
require (
|
||||
github.com/charmbracelet/glamour v0.7.0
|
||||
github.com/rwinkhart/go-boilerplate v0.1.1-0.20251211171453-df1fb21b2366
|
||||
github.com/rwinkhart/libmutton v0.4.3-0.20251227024942-bdbdce61aa77
|
||||
github.com/rwinkhart/libmutton v0.4.3-0.20260102005208-28286788a045
|
||||
golang.org/x/term v0.38.0
|
||||
)
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ github.com/rwinkhart/go-highlite v0.1.1 h1:9TxbRhYVfD/3YaEgNk1BtEiZ0t8/5mxDUZqNM
|
||||
github.com/rwinkhart/go-highlite v0.1.1/go.mod h1:mWLMtCWcyV0BG4NeyPyAUGMjPvI0ds6vXmUq89QwBFA=
|
||||
github.com/rwinkhart/go-winio v0.1.0 h1:b72agLW+dETGmhR3VbcbwnStfgKfc5AfgJOXBJDkaHg=
|
||||
github.com/rwinkhart/go-winio v0.1.0/go.mod h1:ZWa7ssZJT30CCDGJ7fk/2SBTq9BIQrrVjrcss0UW2s0=
|
||||
github.com/rwinkhart/libmutton v0.4.3-0.20251227024942-bdbdce61aa77 h1:CQ9YH2g74HQnaXLKPgaxsp3PLRLpyOX2td58W/SpDP0=
|
||||
github.com/rwinkhart/libmutton v0.4.3-0.20251227024942-bdbdce61aa77/go.mod h1:nOEBckA0iNZePuXzkxpTlzBevKQlZqkvwstZjMB3yBU=
|
||||
github.com/rwinkhart/libmutton v0.4.3-0.20260102005208-28286788a045 h1:NIOFaievf9iYJgfZ8k4VaAZovQlqhtRWTuCpDWnlYtc=
|
||||
github.com/rwinkhart/libmutton v0.4.3-0.20260102005208-28286788a045/go.mod h1:nOEBckA0iNZePuXzkxpTlzBevKQlZqkvwstZjMB3yBU=
|
||||
github.com/rwinkhart/peercred-mini v0.1.2 h1:4cGWDbv0whvLeVvbUdx84V/9p+2fS+DEXgrA1KxlRFo=
|
||||
github.com/rwinkhart/peercred-mini v0.1.2/go.mod h1:LLHG7YshHEpbpJJP+Il9nx2dnGj5O3VGE32rWmflj0c=
|
||||
github.com/rwinkhart/rcw v0.2.4 h1:FrRSsl+ui1WLmDwqjLSROtFPKqSeGLEfF2SPENt4qP0=
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"github.com/rwinkhart/go-boilerplate/front"
|
||||
"github.com/rwinkhart/go-boilerplate/other"
|
||||
"github.com/rwinkhart/libmutton/age"
|
||||
"github.com/rwinkhart/libmutton/cfg"
|
||||
"github.com/rwinkhart/libmutton/clip"
|
||||
"github.com/rwinkhart/libmutton/config"
|
||||
"github.com/rwinkhart/libmutton/core"
|
||||
"github.com/rwinkhart/libmutton/crypt"
|
||||
"github.com/rwinkhart/libmutton/global"
|
||||
@@ -199,7 +199,7 @@ func main() {
|
||||
case "init":
|
||||
err := core.LibmuttonInit(front.Input,
|
||||
map[string]any{"mutnTextEditor": getTextEditorInput()},
|
||||
confirmRCWPassword("new"), false, false)
|
||||
confirmRCWPassword("new"), front.InputBinary("Preserve existing config directory?"), false)
|
||||
if err != nil {
|
||||
other.PrintError("Initialization failed: "+err.Error(), 0)
|
||||
}
|
||||
@@ -207,10 +207,10 @@ func main() {
|
||||
choice := front.InputMenuGen("Action:", []string{"Set text editor", "Change device ID", "Age all entries", "Change master password/Optimize entries"})
|
||||
switch choice {
|
||||
case 1:
|
||||
newCfg := &cfg.ConfigT{}
|
||||
newThirdPartyCfg := map[string]any{"mutnTextEditor": getTextEditorInput()}
|
||||
newCfg.ThirdParty = &newThirdPartyCfg
|
||||
err := cfg.WriteConfig(newCfg, true)
|
||||
newCfg := &config.CfgT{}
|
||||
newClientSpecificCfg := map[string]any{"mutnTextEditor": getTextEditorInput()}
|
||||
newCfg.ClientSpecific = &newClientSpecificCfg
|
||||
err := config.Write(newCfg, true)
|
||||
if err != nil {
|
||||
other.PrintError("Failed to set text editor: "+err.Error(), back.ErrorWrite)
|
||||
}
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/rwinkhart/go-boilerplate/back"
|
||||
"github.com/rwinkhart/go-boilerplate/front"
|
||||
"github.com/rwinkhart/go-boilerplate/other"
|
||||
"github.com/rwinkhart/libmutton/cfg"
|
||||
"github.com/rwinkhart/libmutton/config"
|
||||
"github.com/rwinkhart/libmutton/core"
|
||||
"github.com/rwinkhart/libmutton/syncclient"
|
||||
)
|
||||
@@ -95,12 +95,12 @@ func editNote(baseNote []string) ([]string, bool) {
|
||||
}(tempFile.Name())
|
||||
|
||||
// fetch the user's text editor
|
||||
config, err := cfg.LoadConfig()
|
||||
cfg, err := config.Load()
|
||||
if err != nil {
|
||||
other.PrintError("Failed to load libmuttoncfg.json: "+err.Error(), back.ErrorRead)
|
||||
}
|
||||
var editor string
|
||||
if value, exists := (*config.ThirdParty)["mutnTextEditor"]; !exists {
|
||||
if value, exists := (*cfg.ClientSpecific)["mutnTextEditor"]; !exists {
|
||||
other.PrintError("Failed to retrieve text editor from libmuttoncfg.json\n\nPlease specify one with \"mutn tweak\"", back.ErrorRead)
|
||||
} else {
|
||||
editor = value.(string)
|
||||
|
||||
@@ -15,7 +15,7 @@ const (
|
||||
)
|
||||
|
||||
func HelpMain() {
|
||||
fmt.Print(back.AnsiBold + "\nMUTN | Copyright (c) 2024-2025 Randall Winkhart\n" + back.AnsiReset + `
|
||||
fmt.Print(back.AnsiBold + "\nMUTN | Copyright (c) 2024-2026 Randall Winkhart\n" + back.AnsiReset + `
|
||||
This software exists under the MIT license; you may redistribute it under certain conditions.
|
||||
This program comes with absolutely no warranty; type "mutn version" for details.
|
||||
|
||||
@@ -156,7 +156,7 @@ func Version() {
|
||||
"\\" + ansiBlackOnWhite + " " + back.AnsiReset + ansiVersionOutline + "/\n" +
|
||||
"\\" + ansiBlackOnWhite + " Built with libmutton v" + global.LibmuttonVersion + " " + back.AnsiReset + ansiVersionOutline + "/\n" +
|
||||
"\\" + ansiBlackOnWhite + " " + back.AnsiReset + ansiVersionOutline + "/\n" +
|
||||
"\\" + ansiBlackOnWhite + " Copyright (c) 2024-2025: Randall Winkhart " + back.AnsiReset + ansiVersionOutline + "/\n" +
|
||||
"\\" + ansiBlackOnWhite + " Copyright (c) 2024-2026: Randall Winkhart " + back.AnsiReset + ansiVersionOutline + "/\n" +
|
||||
"\\" + ansiBlackOnWhite + " " + back.AnsiReset + ansiVersionOutline + "/\n" +
|
||||
"<><><><><><><><><><><><><><>-<><><><><><><><><><><><><><>\n" + back.AnsiReset +
|
||||
"\n For more information, see:\n\n" +
|
||||
|
||||
Reference in New Issue
Block a user