Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support APPRISE_URI environment variable #1228

Closed
visch opened this issue Oct 22, 2024 · 7 comments
Closed

Support APPRISE_URI environment variable #1228

visch opened this issue Oct 22, 2024 · 7 comments

Comments

@visch
Copy link

visch commented Oct 22, 2024

💡 The Idea
https://github.com/caronc/apprise?tab=readme-ov-file#command-line-usage

It'd be great if one of these were

export APPRISE_URI="ses://[email protected]/client_id/clietn_secret/to_email1/to_emailN"
apprise -vv -t 'my title' -b 'my notification body'

This is similar-ish to #1156 , but I think it's a much easier implementation.

I do this all the time with custom notifications with https://hub.meltano.com/loaders/target-apprise but right now I have a use case with GitHub actions that would be very nice. Someone made a GitHub action here: https://github.com/marketplace/actions/apprise-notification, which also does this, but I think implementing this feature would make this work in many CI automation use cases.

🔨 Breaking Feature
I don't think so

@visch visch changed the title Support APPRISE_URI Support APPRISE_URI environment variable Oct 22, 2024
@visch
Copy link
Author

visch commented Oct 22, 2024

  - name: Failure notifications
    if: ${{ failure() }}
    run: apprise -t "Title" -b "Body" ${{ secrets.APPRISE_URI }} -v

To be fair this was really easy too with a uv tool install apprise

@visch visch closed this as completed Oct 22, 2024
@caronc
Copy link
Owner

caronc commented Oct 22, 2024

Using the secrets is a much safer choice IMO, good on you for figuring out a very good workaround

@visch
Copy link
Author

visch commented Oct 23, 2024

@caronc I disagree but 🤷 to each their own, thanks for this tool I love it

@caronc
Copy link
Owner

caronc commented Oct 24, 2024

So do you feel the environment variable should still kick in if defined? Not sure why you closed the ticket a few hours after opening it then 🙃. I'll reopen and keep it queued.

This request is different than the issue you referenced. The one you linked to requests dynamic variables in the configuration file. You're proposing using pre loaded URLs if none were otherwise specified and no configuration file was found. Would that statement be correct?

@caronc
Copy link
Owner

caronc commented Oct 27, 2024

See attached PR; the good news is there actualy already is and APPRISE_URLS for you to use as an environment variable; it was not documented (but in the source code) :).

I updated the documentation and added more variables for the future.

@caronc
Copy link
Owner

caronc commented Oct 27, 2024

Code mered; closing ticket

@caronc caronc closed this as completed Oct 27, 2024
@visch
Copy link
Author

visch commented Oct 28, 2024

So do you feel the environment variable should still kick in if defined? Not sure why you closed the ticket a few hours after opening it then 🙃. I'll reopen and keep it queued.

I found a solution so I"m good to go, hate leaving something open if I don't need it.

This request is different than the issue you referenced. The one you linked to requests dynamic variables in the configuration file. You're proposing using pre loaded URLs if none were otherwise specified and no configuration file was found. Would that statement be correct?

Yeah that's why I said "similar-ish" and still opened a new ticket.

Code mered; closing ticket

Thank you so much! Will be really nice to use, I'm a bit nervous about the comma/space delimiter but most api keys are friendly enough about commas that we should be ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants