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 Global System (Apprise) Configuration #875

Merged
merged 2 commits into from
May 13, 2023

Conversation

caronc
Copy link
Owner

@caronc caronc commented May 13, 2023

Description:

Related issue (if applicable): #872

The request was to allow for global configuration references. This only impacts the CLI (apprise) and is only factored in alike the rest of the default configuration. Hence it is only applied if no other configuration wasn't otherwise specified.

All user bound configuration is always checked first before the information below is checked.

Added the following:
For Linux:

  • Configuration:
    • /etc/apprise
    • /etc/apprise.yml
    • /etc/apprise/apprise
    • /etc/apprise/apprise.yml
  • Plugin Path:
    • /var/lib/apprise/plugins/

For Microsoft Windows:

  • Configuration (processed in the following order after not finding a local copy):
    • %ALLUSERSPROFILE%\Apprise\apprise (roughly translates to C:\ProgramData\Apprise\apprise)
    • %ALLUSERSPROFILE%\Apprise\apprise.yml (roughly translates to C:\ProgramData\Apprise\apprise.yml)
    • %PROGRAMFILES%\Apprise\apprise (roughly translates to C:\Program Files\Apprise\apprise)
    • %PROGRAMFILES%\Apprise\apprise.yml (roughly translates to C:\Program Files\Apprise\apprise.yml)
    • %COMMONPROGRAMFILES%\Apprise\apprise (roughly translates to C:\Program Files\Common Files\Apprise\apprise)
    • %COMMONPROGRAMFILES%\Apprise\apprise.yml (roughly translates to C:\Program Files\Common Files\Apprise\apprise.yml)
  • Plugin Path: /var/lib/apprise/plugins/
    • %ALLUSERSPROFILE%\Apprise\plugins (roughly translates to C:\ProgramData\Apprise\plugins)
    • %PROGRAMFILES%\Apprise\plugins (roughly translates to C:\Program Files\Apprise\apprise)
    • %COMMONPROGRAMFILES%\Apprise\plugins (roughly translates to C:\Program Files\Common Files\Apprise\plugins)

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@872-global-configuration

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" "schema://"

@codecov-commenter
Copy link

codecov-commenter commented May 13, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (e83cba6) 100.00% compared to head (690c6bc) 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #875   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          118       118           
  Lines        15405     15405           
  Branches      3162      3162           
=========================================
  Hits         15405     15405           
Impacted Files Coverage Δ
apprise/cli.py 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@caronc caronc merged commit 1e30be3 into master May 13, 2023
16 checks passed
@caronc caronc deleted the 872-global-configuration branch May 13, 2023 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants