From 399ffb32bf4d5ebf0c2158d1dbbd58829b258759 Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Tue, 1 Oct 2019 17:41:41 -0400 Subject: [PATCH] Updated CLI_Usage (markdown) --- CLI_Usage.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/CLI_Usage.md b/CLI_Usage.md index 54c0587..04e3a16 100644 --- a/CLI_Usage.md +++ b/CLI_Usage.md @@ -5,20 +5,20 @@ This small tool wraps the apprise python library to allow individuals such as De Apprise in it's most basic form requires that you provide it a message and an Apprise URL which contains enough information to send the notification with. ```bash # Set a notification to a hotmail (email) account: -python apprise --body="My Message" mailto://user:password@hotmail.com +apprise --body="My Message" mailto://user:password@hotmail.com ``` If you don't specify a **--body** (**-b**) then Apprise reads from **stdin** instead: ```bash # without a --body, you can use a pipe | to redirect output # into you're notification: -uptime | python apprise mailto://user:password@hotmail.com +uptime | apprise mailto://user:password@hotmail.com ``` There is no limit to the number of services you want to notify, just keep adding/chaining them one after another: ```bash # Set a notification to a yahoo email account, Slack, and a Kodi Server: -python apprise --body="Notify more than one service" \ +apprise --body="Notify more than one service" \ mailto://user:password@yahoo.com \ slack://token_a/token_b/token_c \ kodi://example.com @@ -38,7 +38,7 @@ kodi://example.com Then you can notify all of your services like so: ```bash # Set a notification to a yahoo email account, Slack, and a Kodi Server: -python apprise --body="Notify more than one service" \ +apprise --body="Notify more than one service" \ --config=/path/to/your/apprise/config.txt ``` @@ -53,7 +53,7 @@ If you stick your configuration in the right locations, you don't even need to r With default configuration file(s) in place, reference to the Apprise CLI gets even easier: ```bash # Set a notification to a yahoo email account, Slack, and a Kodi Server: -python apprise --body="Notify all of my services" +apprise --body="Notify all of my services" ``` ### :label: Leverage Tagging @@ -104,12 +104,12 @@ Now there is a lot to ingest from the configuration above, but it will make more ```bash # This would notify the first 2 entries they have the tag `family` # It would 'NOT' send to any other entry defined -python apprise --body="Hi guys, I'm going to be late getting home tonight" \ +apprise --body="Hi guys, I'm going to be late getting home tonight" \ --tag=family # This would only notify the first entry as it is the only one # that has the tag: me -python apprise --body="Don't forget to buy eggs!" \ +apprise --body="Don't forget to buy eggs!" \ --tag=me ``` @@ -117,7 +117,7 @@ If you're building software, you can set up your continuous integration to notif ```bash # notify the services that have either a `devops` or `team` tag # If you check our our configuration; this matches 3 separate URLs -python apprise --title="Apprise Build" \ +apprise --title="Apprise Build" \ --body="Build was a success!" \ --tag=devops --tag=team ``` @@ -127,7 +127,7 @@ If you identify more than one element on the same **--tag** using a space and/or ```bash # notify only the services that have both a team and email tag # In this example, there is only one match. -python apprise --title="Meeting this Friday" \ +apprise --title="Meeting this Friday" \ --body="Guys, there is a meeting this Friday with our director." \ --tag=team,email ``` @@ -137,12 +137,12 @@ There is a special reserved tag called `all`. `all` will match ALL of your entr Here is another way of looking at it: ```bash # assuming you got your configuration in place; tagging works like so: -notify -b "has TagA" --tag=TagA -notify -b "has TagA OR TagB" --tag=TagA --tag=TagB +apprise -b "has TagA" --tag=TagA +apprise -b "has TagA OR TagB" --tag=TagA --tag=TagB # For each item you group with the same --tag value is AND'ed -notify -b "has TagA AND TagB" --tag="TagA, TagB" -notify -b "has (TagA AND TagB) OR TagC" --tag="TagA, TagB" --tag=TagC +apprise -b "has TagA AND TagB" --tag="TagA, TagB" +apprise -b "has (TagA AND TagB) OR TagC" --tag="TagA, TagB" --tag=TagC ``` ### Testing Configuration and Tags @@ -150,7 +150,7 @@ Once you've built your elaborate configuration file and assigned all your tags. ```bash # Test which services would have been notified if the tags team and email # were activated: -python apprise --title="Meeting this Friday" \ +apprise --title="Meeting this Friday" \ --body="Guys, there is a meeting this Friday with our director." \ --tag=team,email \ --dry-run @@ -160,7 +160,7 @@ If you use the **--dry-run** (**-d**) switch, then some rules don't apply. For o ```bash # Test which services would have been notified if the tags team and email # were activated: -python apprise --tag=team,email --dry-run +apprise --tag=team,email --dry-run ``` Happy notifying! \ No newline at end of file