mirror of
https://github.com/caronc/apprise.git
synced 2024-12-12 09:51:05 +01:00
Updated CLI_Usage (markdown)
parent
035d9fb129
commit
a51f16e99b
19
CLI_Usage.md
19
CLI_Usage.md
@ -50,19 +50,19 @@ If you stick your configuration in the right locations, you don't even need to r
|
||||
* `%APPDATA%/Apprise/apprise`
|
||||
* `%LOCALAPPDATA%/Apprise/apprise`
|
||||
|
||||
Now your reference to the Apprise CLI got even easier:
|
||||
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"
|
||||
```
|
||||
|
||||
### :label: Leverage Tagging
|
||||
Consider the case where you've defined all of your Apprise URLs in one file, but you don't want to notify all of them every time.
|
||||
* Maybe you have special notifications that only fire when a download completed.
|
||||
* Maybe you have home monitoring that requires you to notify several different locations
|
||||
* Perhaps you work as an Administrative, Developer, and/or Devops role and you want to just notify certain people at certain times (such as when a software build completes, or a unit test fails, etc).
|
||||
Consider the case where you've defined all of your Apprise URLs in one file, but you don't want to notify all of them each and every time.
|
||||
* :inbox_tray: Maybe you have special notifications that only fire when a download completed.
|
||||
* :rotating_light: Maybe you have home monitoring that requires you to notify several different locations
|
||||
* :construction_worker_man: Perhaps you work as an Administrative, Developer, and/or Devops role and you want to just notify certain people at certain times (such as when a software build completes, or a unit test fails, etc).
|
||||
|
||||
Apprise makes this easy by simply allowing you to tag your URLs. There is no limit to the number of tags associate with a URL. Let's make apprise a configuration file for a Work/Home account and fill it with tags:
|
||||
Apprise makes this easy by simply allowing you to tag your URLs. There is no limit to the number of tags associate with a URL. Let's make a simple apprise configuration file; this can be done with any text editor of your choice:
|
||||
```apache
|
||||
# Tags in a Text configuration sit in front of the URL
|
||||
# - They are comma and/or space separated (if more than one
|
||||
@ -92,9 +92,12 @@ team,email=mailto://user:password@yahoo.com/john@mycompany.com/jack@mycompany.co
|
||||
# Maybe we have home automation at home, and we want to notify our
|
||||
# kodi box when stuff becomes available to it
|
||||
mytv=kodi://example.com
|
||||
|
||||
# There is no limit... fill this file to your hearts content following
|
||||
# the simple logic identified above
|
||||
```
|
||||
|
||||
Now there is a lot to ingest from the above, but here is a great (relatively simple) example of how you can use this:
|
||||
Now there is a lot to ingest from the configuration above, but it will make more sense when you see how the content is referenced. Here are a few examples (based on config above):
|
||||
```bash
|
||||
# Send an alert to yourself and your spouse; this would trigger
|
||||
# the first 2 entries because they have the tag `family`
|
||||
@ -152,7 +155,7 @@ python apprise --title="Meeting this Friday" \
|
||||
--dry-run
|
||||
```
|
||||
|
||||
If you use the `--dry-run` (`-d`) switch, then some rules don't apply. For one, the --body is not even a required option. The above could have been re-written like so:
|
||||
If you use the **--dry-run** (**-d**) switch, then some rules don't apply. For one, the **--body** (**-b**) is not even a required option. The above could have been re-written like so:
|
||||
```bash
|
||||
# Test which services would have been notified if the tags team and email
|
||||
# were activated:
|
||||
|
Loading…
Reference in New Issue
Block a user