parent
0f5341835f
commit
316c79cb88
1
main.go
1
main.go
@ -11,6 +11,7 @@ import (
|
||||
func main() {
|
||||
|
||||
if slices.Contains(os.Args, "--help") {
|
||||
cli.ShowHelpText();
|
||||
} else if slices.Contains(os.Args, "--version") {
|
||||
cli.ShowVersion();
|
||||
} else if slices.Contains(os.Args, "--check-update") {
|
||||
|
32
src/cli/ShowHelpText.go
Normal file
32
src/cli/ShowHelpText.go
Normal file
@ -0,0 +1,32 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func ShowHelpText() {
|
||||
|
||||
fmt.Println(`museum-digital uploader
|
||||
|
||||
A tool to manage the configuration of imports to museum-digital and simplify the upload process.
|
||||
|
||||
Commands:
|
||||
|
||||
(no command), --webui Runs a small dashboard and opens a browser to view it.
|
||||
Use this for using the app without the command line.
|
||||
--show-config Show current config in JSON format.
|
||||
--run-manual-setup Opens a CLI-based settings dialogue.
|
||||
--set-additional-setting Allows setting optional, parser-specific settings.
|
||||
--upload Upload data for import.
|
||||
--webdav-remote-list-toplevel Show folder contents of the WebDAV share used for imports.
|
||||
--webdav-remote-list-metadata-dir Show folder contents of the WebDAV share used for imports (metadata subdirectory).
|
||||
--webdav-remote-list-media-dir Show folder contents of the WebDAV share used for imports (media subdirectory).
|
||||
--local-list-metadata Lists metadata files currently present in the upload directory.
|
||||
--local-list-media Lists media files currently present in the upload directory.
|
||||
--help Print help message.
|
||||
--check-update Check for updates to this application.
|
||||
|
||||
Links:
|
||||
Source code: https://gitea.armuli.eu/museum-digital/museum-digital-webdav-uploader`)
|
||||
|
||||
}
|
11
src/cli/ShowVersion.go
Normal file
11
src/cli/ShowVersion.go
Normal file
@ -0,0 +1,11 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gitea.armuli.eu/museum-digital/museum-digital-webdav-uploader/src/meta"
|
||||
)
|
||||
|
||||
// Prints current version.
|
||||
func ShowVersion() {
|
||||
fmt.Println(meta.GetVersion())
|
||||
}
|
@ -372,11 +372,6 @@ func ListLocalMedia() {
|
||||
|
||||
}
|
||||
|
||||
// Prints current version.
|
||||
func ShowVersion() {
|
||||
fmt.Println(meta.GetVersion())
|
||||
}
|
||||
|
||||
// Prints, if there is a current version.
|
||||
func CheckVersionIsUpToDate() {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user