mirror of
https://github.com/caronc/apprise.git
synced 2025-03-04 10:01:39 +01:00
Updated CLI_Usage (markdown)
parent
013bf43acf
commit
9f36a0d465
25
CLI_Usage.md
25
CLI_Usage.md
@ -15,10 +15,13 @@ If you don't specify a **--body** (**-b**) then Apprise reads from **stdin** ins
|
||||
uptime | apprise mailto://user:password@hotmail.com
|
||||
```
|
||||
|
||||
By default Apprise is very silent; If you want to have a better understanding of what is going on, just add a `-v` switch to improve the verbosity. The more `v`'s you add, the more detailed output you'll get back.
|
||||
|
||||
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:
|
||||
apprise --body="Notify more than one service" \
|
||||
# Set a notification to a yahoo email account, Slack, and a Kodi Server
|
||||
# with a bit of added verbosity:
|
||||
apprise -v --body="Notify more than one service" \
|
||||
mailto://user:password@yahoo.com \
|
||||
slack://token_a/token_b/token_c \
|
||||
kodi://example.com
|
||||
@ -38,7 +41,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:
|
||||
apprise --body="Notify more than one service" \
|
||||
apprise -v --body="Notify more than one service" \
|
||||
--config=/path/to/your/apprise/config.txt
|
||||
```
|
||||
|
||||
@ -53,7 +56,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:
|
||||
apprise --body="Notify all of my services"
|
||||
apprise -v --body="Notify all of my services"
|
||||
```
|
||||
|
||||
#### Attachment Support
|
||||
@ -64,16 +67,18 @@ apprise --title="A photo of my family" --body="see attached" \
|
||||
--attach=/path/to/my/photo.jpeg
|
||||
|
||||
# You can attach as many file attachments as you like:
|
||||
apprise --title="Several great photo's of the gang" --body="see attached" \
|
||||
apprise -v --title="Several great photo's of the gang" --body="see attached" \
|
||||
--attach=/path/team1.jpeg \
|
||||
--attach=/path/teambuilding-event.jpg \
|
||||
--attach=/path/paintball-with-office.jpg
|
||||
```
|
||||
|
||||
**Note**: When using attachments, if one of them can't be found/retrieved for delivery then the message isn't sent.
|
||||
|
||||
The great thing with attachments is that Apprise is able to make a remote web-request for them (prior to attaching them). This is easily done by just using the `http://` or `https://` protocol. This works great for things like security camera images, or just content you want to pass along hosted online:
|
||||
```bash
|
||||
# A web-based attachment:
|
||||
apprise --title="A Great Github Cheatsheet" --body="see attached" \
|
||||
apprise -v --title="A Great Github Cheatsheet" --body="see attached" \
|
||||
--attach="https://github.github.com/training-kit/downloads/github-git-cheat-sheet.pdf"
|
||||
```
|
||||
|
||||
@ -125,12 +130,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
|
||||
apprise --body="Hi guys, I'm going to be late getting home tonight" \
|
||||
apprise -v --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
|
||||
apprise --body="Don't forget to buy eggs!" \
|
||||
apprise -v --body="Don't forget to buy eggs!" \
|
||||
--tag=me
|
||||
```
|
||||
|
||||
@ -138,7 +143,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
|
||||
apprise --title="Apprise Build" \
|
||||
apprise -v --title="Apprise Build" \
|
||||
--body="Build was a success!" \
|
||||
--tag=devops --tag=team
|
||||
```
|
||||
@ -148,7 +153,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.
|
||||
apprise --title="Meeting this Friday" \
|
||||
apprise -v --title="Meeting this Friday" \
|
||||
--body="Guys, there is a meeting this Friday with our director." \
|
||||
--tag=team,email
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user