mirror of
https://github.com/Mikescher/kpsync.git
synced 2025-08-26 00:48:06 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
675cead3c6 | |||
da9f6e6dbe | |||
5f97ca1e3c | |||
b948055048 |
4
Makefile
4
Makefile
@ -32,7 +32,3 @@ package:
|
|||||||
GOARCH=386 GOOS=linux go build -o _out/kpsync_linux-386 ./cmd/cli # Linux - 32 bit
|
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=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=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
|
|
||||||
|
@ -8,13 +8,14 @@ A small util to launch keepassXC while the database file is on a remote webDAV s
|
|||||||
1. simply start `kpsync`
|
1. simply start `kpsync`
|
||||||
2. On first start a example config in `~/.config/kpsync.json` will be created, probably needs to be edited
|
2. On first start a example config in `~/.config/kpsync.json` will be created, probably needs to be edited
|
||||||
3. Afterwards start it again
|
3. Afterwards start it again
|
||||||
|
4. You can access the logs, functionality, state etc via the tray icon
|
||||||
|
|
||||||
# Functionality
|
# Functionality
|
||||||
|
|
||||||
kpsync starts by downloading the latest db file from the webDAV to the (configured) temp directory
|
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 there already exists a local file, matching with the server version (via ETag), the download will be skipped)
|
||||||
|
|
||||||
If teh download fails, teh user gets the option to open a local (fallback) file (e.g. if the computer has no network)
|
If the download fails, the user gets the option to open a local (fallback) file (e.g. if the computer has no network)
|
||||||
|
|
||||||
Then KeepassXC is launched.
|
Then KeepassXC is launched.
|
||||||
|
|
||||||
@ -42,4 +43,8 @@ Needs `keepassxc` to be installed. duh.
|
|||||||
"debounce": 3500,
|
"debounce": 3500,
|
||||||
"terminal_emulator": "konsole -e"
|
"terminal_emulator": "konsole -e"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Screenshot
|
||||||
|
|
||||||
|
<img width="539" height="406" alt="image" src="https://github.com/user-attachments/assets/283ec720-d45d-412a-9be4-b92e9008c9ee" />
|
||||||
|
@ -60,10 +60,12 @@ func (app *Application) LogDebug(msg string) {
|
|||||||
app.logInternal("[D]", msg, termext.Gray)
|
app.logInternal("[D]", msg, termext.Gray)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *Application) logInternal(pf string, msg string, c func(_ string) string) {
|
func (app *Application) logInternal(pf string, msg string, cf func(_ string) string) {
|
||||||
app.logLock.Lock()
|
app.logLock.Lock()
|
||||||
defer app.logLock.Unlock()
|
defer app.logLock.Unlock()
|
||||||
|
|
||||||
|
c := cf
|
||||||
|
|
||||||
if !termext.SupportsColors() && !app.config.ForceColors {
|
if !termext.SupportsColors() && !app.config.ForceColors {
|
||||||
c = func(s string) string { return s }
|
c = func(s string) string { return s }
|
||||||
}
|
}
|
||||||
@ -71,24 +73,24 @@ func (app *Application) logInternal(pf string, msg string, c func(_ string) stri
|
|||||||
for i, s := range strings.Split(msg, "\n") {
|
for i, s := range strings.Split(msg, "\n") {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
println(c(pf + " " + s))
|
println(c(pf + " " + s))
|
||||||
app.logList = append(app.logList, LogMessage{i, pf, s, c})
|
app.logList = append(app.logList, LogMessage{i, pf, s, cf})
|
||||||
if app.logFile != nil {
|
if app.logFile != nil {
|
||||||
_, err := app.logFile.WriteString(pf + " " + s + "\n")
|
_, err := app.logFile.WriteString(pf + " " + s + "\n")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
app.fallbackLog("[!] Failed to write logfile: " + err.Error())
|
app.fallbackLog("[!] Failed to write logfile: " + err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
app.logBroadcaster.Publish("", LogMessage{i, pf, s, c})
|
app.logBroadcaster.Publish("", LogMessage{i, pf, s, cf})
|
||||||
} else {
|
} else {
|
||||||
println(c(langext.StrRepeat(" ", len(pf)+1) + s))
|
println(c(langext.StrRepeat(" ", len(pf)+1) + s))
|
||||||
app.logList = append(app.logList, LogMessage{i, pf, s, c})
|
app.logList = append(app.logList, LogMessage{i, pf, s, cf})
|
||||||
if app.logFile != nil {
|
if app.logFile != nil {
|
||||||
_, err := app.logFile.WriteString(langext.StrRepeat(" ", len(pf)+1) + s + "\n")
|
_, err := app.logFile.WriteString(langext.StrRepeat(" ", len(pf)+1) + s + "\n")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
app.fallbackLog("[!] Failed to write logfile: " + err.Error())
|
app.fallbackLog("[!] Failed to write logfile: " + err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
app.logBroadcaster.Publish("", LogMessage{i, pf, s, c})
|
app.logBroadcaster.Publish("", LogMessage{i, pf, s, cf})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
assets/icon.xcf
BIN
assets/icon.xcf
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Loading…
x
Reference in New Issue
Block a user