new logo and working code examples simplified

* New apprise logo

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 157 KiB