]> git.vanrenterghem.biz Git - elgato-keylight-script.git/commitdiff
Add use cases, update usage
authorJonas Werme <jonas.werme@hoofbite.com>
Fri, 7 Jan 2022 06:45:06 +0000 (07:45 +0100)
committerJonas Werme <jonas.werme@hoofbite.com>
Fri, 7 Jan 2022 06:45:06 +0000 (07:45 +0100)
README.md

index d28a56a394af757f20f50db1cc412edca4ae0b2b..6dc1f82f752d584efe4020c3fa96717c48e59c56 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,8 +1,3 @@
-- [elagto-key-light-linux](#elagto-key-light-linux)
-  - [Installation](#installation)
-    - [Dependencies](#dependencies)
-  - [Usage](#usage)
-
 # elagto-key-light-linux
 
 Small bash script to manage elgato key light and key light air.
@@ -30,11 +25,12 @@ sudo apt-get install avahi-utils curl notify-send jq
 ## Usage
 
 Please see the docs sections to get examples and learn more about:
+
 * [output formats - Have it your way](docs/output-formats.md)
 * [-t/--target filters - The power of jq filtering](docs/target-filters.md)
 
 ```bash
-Usage: keylights.sh [-h] [-f <value>] [-l] [-p] [-s] [-t <value>][-v] [--<option>] [--<option> <value>] <action>
+Usage: keylights.sh [-h] [-f <value>] [-l <value>] [-p] [-s] [-t <value>][-v] [--<option>] [--<option> <value>] <action>
 
 Elgato Lights controller. Works for Key Light and Key Light Air.
 
@@ -60,10 +56,33 @@ Available formats:
 
 Available options:
 
--h, --help      Print this help and exit
--f  --format    Set output format
--p, --pretty    Pretty print console output
--s, --silent    Supress notifications
--t, --target    Only perform action on devices where value matches filter
--v, --verbose   Print script debug info
+-h, --help               Print this help and exit
+-f, --format             Set output format
+-l, --limit <list>       Limit top level output fields to the specified comma separated list
+-p, --pretty             Pretty print console output
+-s, --silent             Supress notifications
+-t, --target <filter>    Only perform action on devices where value matches filter
+-v, --verbose            Print script debug info
+```
+
+## Example use cases
+
+I have five lights in the room namned: Front Left, Front Right, front center, Rear Right, rear left.
+
+I want to turn all lights on with my StreamDeck by setting a command to:
+
+```bash
+./keylights.sh on
+```
+
+I want to see the displayName, productName, serialNumber and firmwareVersion of all the lights on the right side of the room in a table:
+
+```bash
+./keylights.sh --target '.displayName | contains("Right")' --limit "displayName, productName, serialNumber, firmwareVersion"  --format table list
+```
+
+I want to let my stream deck button turn off all lights in the front of the room:
+
+```bash
+./keylights.sh --target '.displayName | ascii_downcase | contains("front")' off
 ```