Add background mount path helpers
This commit is contained in:
@@ -16,6 +16,7 @@ type config struct {
|
||||
PasswordCommandArgs []string
|
||||
User string
|
||||
DocspellURL string
|
||||
MountPath string
|
||||
ArchiveDirectory string
|
||||
ImportDirectories []string
|
||||
}
|
||||
@@ -36,13 +37,6 @@ type DocspellItem struct {
|
||||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("##################### START #####################")
|
||||
fmt.Println(" Docspell Import - v0.3")
|
||||
fmt.Println(" by jacob1123")
|
||||
fmt.Println(" (based on work by totti4ever) ")
|
||||
fmt.Println("#################################################")
|
||||
fmt.Println()
|
||||
|
||||
cfg, password := loadConfigAndPassword()
|
||||
|
||||
if len(os.Args) > 1 && os.Args[1] == "mount" {
|
||||
@@ -52,6 +46,27 @@ func main() {
|
||||
}
|
||||
return
|
||||
}
|
||||
if len(os.Args) > 1 && os.Args[1] == "get-local-path" {
|
||||
if err := runGetLocalPathCommand(os.Args[2:], cfg, password); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "get-local-path failed:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return
|
||||
}
|
||||
if len(os.Args) > 1 && os.Args[1] == "get-url" {
|
||||
if err := runGetURLCommand(os.Args[2:], cfg, password); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "get-url failed:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println("##################### START #####################")
|
||||
fmt.Println(" Docspell Import - v0.3")
|
||||
fmt.Println(" by jacob1123")
|
||||
fmt.Println(" (based on work by totti4ever) ")
|
||||
fmt.Println("#################################################")
|
||||
fmt.Println()
|
||||
|
||||
runImportCommand(cfg, password, os.Args[1:])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user