new logo and working code examples simplified

* New apprise logo

* simplified attachment references
This commit is contained in:
Chris Caron 2020-06-09 17:22:47 -04:00 committed by GitHub
parent aac8455a5f
commit 4aa00f3704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 20 deletions

View File

@ -240,7 +240,7 @@ apobj.notify(
# Tagging allows you to specifically target only specific notification
# services you've loaded:
apobj.notify(
body='send a notification to our admin group'
body='send a notification to our admin group',
title='Attention Admins',
# notify any services tagged with the 'admin' tag
tag='admin',
@ -249,7 +249,7 @@ apobj.notify(
# If you want to notify absolutely everything (reguardless of whether
# it's been tagged or not), just use the reserved tag of 'all':
apobj.notify(
body='send a notification to our admin group'
body='send a notification to our admin group',
title='Attention Admins',
# notify absolutely everything loaded, reguardless on wether
# it has a tag associated with it or not:
@ -286,7 +286,7 @@ apobj.notify(
)
```
To send more than one attachment, you just need the **AppriseAttachment** object:
To send more than one attachment, just use a list, set, or tuple instead:
```python
import apprise
@ -296,22 +296,21 @@ apobj = apprise.Apprise()
# Add at least one service you want to notify
apobj.add('mailto://myuser:mypass@hotmail.com')
# Initialize our attachment object
attachment = apprise.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)
attachment.add('https://i.redd.it/my2t4d2fx0u31.jpg?name=FlyingToMars.jpg')
attach = (
# ?name= allows us to rename the actual jpeg as found on the site
# to be another name when sent to our receipient(s)
'https://i.redd.it/my2t4d2fx0u31.jpg?name=FlyingToMars.jpg',
# Now add another:
attachment.add('/path/to/funny/joke.gif')
# Now add another:
'/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=attachment,
title='Some good jokes.',
body='Hey guys, check out these!',
attach=attach,
)
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 157 KiB