From 98cac2b56b293bcecb88b40f1b9db1b1c029cd47 Mon Sep 17 00:00:00 2001 From: zabackary <137591653+zabackary@users.noreply.github.com> Date: Sun, 29 Sep 2024 22:15:22 +0900 Subject: [PATCH] chore: improve docs --- README.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 30de82e..b3bb0ca 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,84 @@ [daktronics-singular-ui-demo.webm](https://github.com/user-attachments/assets/473b455a-af18-4af5-89aa-710fdfc68522) +## Usage + +Follow the directions in the app in order to use DSU. Basically, you need to +create a _profile_ which specifies a mapping between the fields received from +the Daktronics console (see +[the documentation](https://docs.rs/daktronics-allsport-5000/latest/daktronics_allsport_5000/sports/index.html) +for fields available per sport). This mapping is used to read the incoming +fields and output them as JSON for the Singular.Live datastream. For ease of +use, a template Singular.Live Composition Script is bundled in the app; see the +"Set up" tab. + +Daktronics Singular UI also supports a variety of command-line options for use +as a server application. As of September 2024, using DSU without a UI (i.e. +headless) mode is not supported, but other than that, it should be all set to be +used in an environment without human intervention. An example command can be +found below. + +``` +daktronics-singular-ui \ + --profile /path/to/profile.dsu \ # the path to the profile + --start \ # automatically start streaming + --serial-path /dev/USB0 \ # which serial port to use + --hide-header \ # hide the app header for small screens + --unattended \ # automatically restart on errors (default 3) + --fullscreen # fullscreen UI +``` + +See the output of `daktronics-singular-ui --help`. + +``` +$ ./daktronics-singular-ui --help +Links the output of an Daktronics AllSport 5000 to Singular.Live + +Usage: daktronics-singular-ui [OPTIONS] + +Options: + -l, --headless + Whether to hide the UI (run without a window). Must be used with --start + + -p, --profile + The profile configuration file path. If not provided, the UI will prompt for one + + -s, --start + Whether to start the stream immediately. Must be used with --profile and --serial-path + + -e, --serial-path + What serial path (e.g. /dev/xxx or COM1 on Windows) to use, when --start is used + + -f, --fullscreen + Whether to start the program in fullscreen mode + + --hide-header + Whether to hide the header and show a minimized video + + Useful for small display sizes + + -u, --unattended + Enable unattended mode, restarting automatically if there are many errors + + Passing a number indicates the maximum tolerated error count. Default 3. Max 15. + + -h, --help + Print help (see a summary with '-h') + + -V, --version + Print version + +``` + ## Setup ### Binaries -Grab the binaries from the [GitHub releases page](https://github.com/zabackary/daktronics-singular-ui/releases). +Grab the binaries from the +[GitHub releases page](https://github.com/zabackary/daktronics-singular-ui/releases). For now, a Linux binary and Windows binary are provided. Daktronics Singular UI -is highly portable, so a MacOS version is possible. However, [Apple does not make -cross-compiling easy](https://users.rust-lang.org/t/is-cross-compile-from-linux-to-mac-supported/95105) +is highly portable, so a MacOS version is possible. However, +[Apple does not make cross-compiling easy](https://users.rust-lang.org/t/is-cross-compile-from-linux-to-mac-supported/95105) and I don't own a MacOS machine (I do have an old Mac Mini, so I might turn that into a build server, but no promises). @@ -34,6 +104,8 @@ and the binary will be built at `target/release/daktronics-singular-ui`. The binary does not have any dependencies as everything (libraries, icons, etc.) is statically linked. +To cross compile, using `cross` should be supported. + ## Stack - [Iced](https://github.com/iced-rs/iced)