Compare commits

..

No commits in common. "master" and "v1.0" have entirely different histories.
master ... v1.0

5 changed files with 11 additions and 14 deletions

View File

@ -32,3 +32,7 @@ package:
GOARCH=386 GOOS=linux go build -o _out/kpsync_linux-386 ./cmd/cli # Linux - 32 bit
GOARCH=amd64 GOOS=linux go build -o _out/kpsync_linux-amd64 ./cmd/cli # Linux - 64 bit
GOARCH=arm64 GOOS=linux go build -o _out/kpsync_linux-arm64 ./cmd/cli # Linux - ARM
GOARCH=amd64 GOOS=openbsd go build -o _out/kpsync_openbsd-amd64 ./cmd/cli # OpenBSD - 64 bit
GOARCH=arm64 GOOS=openbsd go build -o _out/kpsync_openbsd-arm64 ./cmd/cli # OpenBSD - ARM
GOARCH=amd64 GOOS=freebsd go build -o _out/kpsync_freebsd-amd64 ./cmd/cli # FreeBSD - 64 bit
GOARCH=arm64 GOOS=freebsd go build -o _out/kpsync_freebsd-arm64 ./cmd/cli # FreeBSD - ARM

View File

@ -8,14 +8,13 @@ A small util to launch keepassXC while the database file is on a remote webDAV s
1. simply start `kpsync`
2. On first start a example config in `~/.config/kpsync.json` will be created, probably needs to be edited
3. Afterwards start it again
4. You can access the logs, functionality, state etc via the tray icon
# Functionality
kpsync starts by downloading the latest db file from the webDAV to the (configured) temp directory
(if there already exists a local file, matching with the server version (via ETag), the download will be skipped)
If the download fails, the user gets the option to open a local (fallback) file (e.g. if the computer has no network)
If teh download fails, teh user gets the option to open a local (fallback) file (e.g. if the computer has no network)
Then KeepassXC is launched.
@ -43,8 +42,4 @@ Needs `keepassxc` to be installed. duh.
"debounce": 3500,
"terminal_emulator": "konsole -e"
}
```
# Screenshot
<img width="539" height="406" alt="image" src="https://github.com/user-attachments/assets/283ec720-d45d-412a-9be4-b92e9008c9ee" />
```

View File

@ -60,12 +60,10 @@ func (app *Application) LogDebug(msg string) {
app.logInternal("[D]", msg, termext.Gray)
}
func (app *Application) logInternal(pf string, msg string, cf func(_ string) string) {
func (app *Application) logInternal(pf string, msg string, c func(_ string) string) {
app.logLock.Lock()
defer app.logLock.Unlock()
c := cf
if !termext.SupportsColors() && !app.config.ForceColors {
c = func(s string) string { return s }
}
@ -73,24 +71,24 @@ func (app *Application) logInternal(pf string, msg string, cf func(_ string) str
for i, s := range strings.Split(msg, "\n") {
if i == 0 {
println(c(pf + " " + s))
app.logList = append(app.logList, LogMessage{i, pf, s, cf})
app.logList = append(app.logList, LogMessage{i, pf, s, c})
if app.logFile != nil {
_, err := app.logFile.WriteString(pf + " " + s + "\n")
if err != nil {
app.fallbackLog("[!] Failed to write logfile: " + err.Error())
}
}
app.logBroadcaster.Publish("", LogMessage{i, pf, s, cf})
app.logBroadcaster.Publish("", LogMessage{i, pf, s, c})
} else {
println(c(langext.StrRepeat(" ", len(pf)+1) + s))
app.logList = append(app.logList, LogMessage{i, pf, s, cf})
app.logList = append(app.logList, LogMessage{i, pf, s, c})
if app.logFile != nil {
_, err := app.logFile.WriteString(langext.StrRepeat(" ", len(pf)+1) + s + "\n")
if err != nil {
app.fallbackLog("[!] Failed to write logfile: " + err.Error())
}
}
app.logBroadcaster.Publish("", LogMessage{i, pf, s, cf})
app.logBroadcaster.Publish("", LogMessage{i, pf, s, c})
}
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB