question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Read Notification URLs from predefined YAML file(s) and/or URL(s)

See original GitHub issue

One would simply utilize the file://, http:// and/or https:// URLs as part of their apprise syntax; however their meaning would be interpreted as read to fetch the notifications to load.

The idea is you lock all of your tokens, passwords and usernames in a yaml file that has permissions that only you can access. It’s better than passing this information on the command line.

Here would be an example:

# Open up apprise.yaml and read in the notification URLs
# From there construct all of the notifications to alert:
apprise -b "test body" -t "test title" \
    file:///path/to/yaml/config/file/apprise.yaml

http:// and https:// would work the same as file:// except they’d go to the URL you specify and hope to find a YAML file to read. Ideally you should be passing back the correct mime type for this such as one of the following:

text/yaml
text/x-yaml
application/yaml
application/x-yaml

The most minimal apprise syntax would be as follows:

# A version would be important so that I can anticipate future changes and/or
# ideas if this value is left out, then 'version: 1' would be implied. 
version: 1

# Now the meat and potatos: simply define your notification urls:
urls:
  - pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b
  - mailto://test:password@gmail.com

To take this feature a step further, the URL should be allowed to be constructed through options. This allows for an easier read (and doesn’t require you to escape special characters such as slashes (/) or ampersands (&) since they otherwise conflict with the URL.

# our version definition
version: 1

urls:
  - pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b

    # adding a colon to the end of our URL now makes it something we can apply
    # additional configuration to (thanks to YAML).
  - mailto://test:password@gmail.com:

    # associate our mailto object with the tag profile_changes. Without this entry,
    # the profile gets added automatically to the 'default' tag. This will be important
    # when https://github.com/caronc/apprise/issues/34 gets implemented.
    # Right now it's just on standby (and ready to be supported). :)
    tags:
      - profile_changes

    # These over-ride anything otherwise defined in the URL string.
    args:
      # optional over-rides
      - user: caronc
      - password: /234j3jkada52:3&
      - smtp_server: example.com

If we allow all of this, then we might as well additionally support the override of the apprise asset object too. So if we take this configuration one step further:

# our version definition
version: 1

# allow one to over-ride the asset object too
asset:
  # optional asset over-ride
  app_id: MyApp
  app_desc: MyApp Description
  app_url: https://my/apps/website/
  theme: default
  default_extension: .png
  image_path_mask: /optional/path/to/{THEME}/apprise-{TYPE}-{XY}{EXTENSION}
  image_url_mask: https://my/path/to/{THEME}/apprise-{TYPE}-{XY}{EXTENSION}

# You've seen the below already; but lets just stick it in to show a complete
# configuration file:
urls:
  - pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b
  - mailto://test:password@gmail.com:
    # associate with tags. Without this entry, the
    # profile gets added automatically to the 'default'
    # tag.
    tags:
      - profile_changes

    args:
      # optional over-rides
      - smtp_server: example.com

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
philbormancommented, Feb 6, 2019

At the moment our apprise telegram notifier looks like this…
newstyle

and the old notifier looked like this… oldstyle

I think it’s a lot easier for the user to handle the old style with clearly defined fields and let the app construct the url. Probably have a dropdown select box to choose the new notifier type from the service_names in apobj.details()[‘schemas’] and then add input boxes for the appropriate arguments for that schema.

0reactions
caronccommented, Mar 6, 2019

Merged into master branch; closing issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - APP.YAML: Combine different URLs-same file, static ...
So I need: access to my static files via python so I can read the img and make thumbnails on the fly. URL...
Read more >
Spring Data Redis
The Spring Data Redis project applies core Spring concepts to the development of solutions by using a key-value style data store.
Read more >
A url scheme that uses yaml to allow for stronger urls
The “yaml-uri” should allow me to create a URL that links to the id of the file. That way, so long as that...
Read more >
Untitled
Teaching numbers 11-20, Dimbath taschen, Target 1154 s clark st chicago il 60605, ... Receipt voucher format pdf, 14 arpents fromage, Braderie lille ......
Read more >
Version history — Bio-Formats 6.10.0 documentation
allowed partial planes to be read from truncated files. MetaMorph ... By default the option is set to true and missing wells are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found