attachment documentation update

This commit is contained in:
Chris Caron 2019-11-21 17:07:28 -05:00
parent c8a5d3b0c2
commit 1a83623e3c
3 changed files with 31 additions and 5 deletions

View File

@ -277,21 +277,21 @@ apobj.notify(
from apprise import AppriseAttachment
# Initialize our attachment object
aa = AppriseAttachment()
attachment = AppriseAttachment()
# Now add all of the entries we're intrested in:
# ?name= allows us to rename the actual jpeg as found on the site
# to be another name when sent to our receipient(s)
aa.add('https://i.redd.it/my2t4d2fx0u31.jpg?name=FlyingToMars.jpg')
attachment.add('https://i.redd.it/my2t4d2fx0u31.jpg?name=FlyingToMars.jpg')
# Now add another:
aa.add('/path/to/funny/joke.gif')
attachment.add('/path/to/funny/joke.gif')
# Send your multiple attachments with a single notify call:
apobj.notify(
title='Some good jokes.'
body='Hey guys, check out these!'
attach=aa,
attach=attachment,
tag=friends
)
```

View File

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "APPRISE" "1" "September 2019" "" ""
.TH "APPRISE" "1" "November 2019" "" ""
.
.SH "NAME"
\fBapprise\fR \- Push Notifications that work with just about every platform!
@ -41,6 +41,10 @@ Specify the message title\. This field is complete optional\.
Specify one or more configuration locations\.
.
.TP
\fB\-a\fR, \fB\-\-attach=\fR\fIATTACH\-URL\fR
Specify one or more file attachment locations\.
.
.TP
\fB\-n\fR, \fB\-\-notification\-type=\fR\fITYPE\fR
Specify the message type (default=info)\. Possible values are "info", "success", "failure", and "warning"\.
.
@ -129,6 +133,20 @@ $ apprise \-t \'my title\' \-b \'my notification body\' \e
.
.IP "" 0
.
.P
Include an attachment:
.
.IP "" 4
.
.nf
$ apprise \-t \'School Assignment\' \-b \'See attached\' \e
\-\-attach=Documents/FinalReport\.docx
.
.fi
.
.IP "" 0
.
.SH "BUGS"
\fBApprise\fR is written in Python with 100% test coverage; but it still makes it far from perfect since the notification services it talks to change all the time\. If you find any bugs, please make them known at: \fIhttps://github\.com/caronc/apprise/issues\fR
.

View File

@ -30,6 +30,9 @@ The Apprise options are as follows:
* `-c`, `--config=`<CONFIG-URL>:
Specify one or more configuration locations.
* `-a`, `--attach=`<ATTACH-URL>:
Specify one or more file attachment locations.
* `-n`, `--notification-type=`<TYPE>:
Specify the message type (default=info). Possible values are "info",
"success", "failure", and "warning".
@ -90,6 +93,11 @@ notification service URLs and only notify the ones tagged as _devops_.
--config=https://localhost/my/apprise/config \
-t devops
Include an attachment:
$ apprise -t 'School Assignment' -b 'See attached' \
--attach=Documents/FinalReport.docx
## BUGS
**Apprise** is written in Python with 100% test coverage; but it still makes