Skip to content

Commit 645baeb

Browse files
authored
Support both .yaml and .yml config files via CLI (#1073)
1 parent 26d8e45 commit 645baeb

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,30 +233,41 @@ No one wants to put their credentials out for everyone to see on the command lin
233233
# configuration files (if present) from:
234234
# ~/.apprise
235235
# ~/.apprise.yml
236+
# ~/.apprise.yaml
236237
# ~/.config/apprise
237238
# ~/.config/apprise.yml
239+
# ~/.config/apprise.yaml
238240
# /etc/apprise
239241
# /etc/apprise.yml
242+
# /etc/apprise.yaml
240243

241244
# Also a subdirectory handling allows you to leverage plugins
242245
# ~/.apprise/apprise
243246
# ~/.apprise/apprise.yml
247+
# ~/.apprise/apprise.yaml
244248
# ~/.config/apprise/apprise
245249
# ~/.config/apprise/apprise.yml
250+
# ~/.config/apprise/apprise.yaml
246251
# /etc/apprise/apprise
247252
# /etc/apprise/apprise.yml
253+
# /etc/apprise/apprise.yaml
248254

249255
# Windows users can store their default configuration files here:
250256
# %APPDATA%/Apprise/apprise
251257
# %APPDATA%/Apprise/apprise.yml
258+
# %APPDATA%/Apprise/apprise.yaml
252259
# %LOCALAPPDATA%/Apprise/apprise
253260
# %LOCALAPPDATA%/Apprise/apprise.yml
261+
# %LOCALAPPDATA%/Apprise/apprise.yaml
254262
# %ALLUSERSPROFILE%\Apprise\apprise
255263
# %ALLUSERSPROFILE%\Apprise\apprise.yml
264+
# %ALLUSERSPROFILE%\Apprise\apprise.yaml
256265
# %PROGRAMFILES%\Apprise\apprise
257266
# %PROGRAMFILES%\Apprise\apprise.yml
267+
# %PROGRAMFILES%\Apprise\apprise.yaml
258268
# %COMMONPROGRAMFILES%\Apprise\apprise
259269
# %COMMONPROGRAMFILES%\Apprise\apprise.yml
270+
# %COMMONPROGRAMFILES%\Apprise\apprise.yaml
260271

261272
# If you loaded one of those files, your command line gets really easy:
262273
apprise -vv -t 'my title' -b 'my notification body'

apprise/cli.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,26 @@
6868
# Legacy Path Support
6969
'~/.apprise',
7070
'~/.apprise.yml',
71+
'~/.apprise.yaml',
7172
'~/.config/apprise',
7273
'~/.config/apprise.yml',
74+
'~/.config/apprise.yaml',
7375

7476
# Plugin Support Extended Directory Search Paths
7577
'~/.apprise/apprise',
7678
'~/.apprise/apprise.yml',
79+
'~/.apprise/apprise.yaml',
7780
'~/.config/apprise/apprise',
7881
'~/.config/apprise/apprise.yml',
82+
'~/.config/apprise/apprise.yaml',
7983

8084
# Global Configuration Support
8185
'/etc/apprise',
8286
'/etc/apprise.yml',
87+
'/etc/apprise.yaml',
8388
'/etc/apprise/apprise',
8489
'/etc/apprise/apprise.yml',
90+
'/etc/apprise/apprise.yaml',
8591
)
8692

8793
# Define our paths to search for plugins
@@ -99,8 +105,10 @@
99105
DEFAULT_CONFIG_PATHS = (
100106
expandvars('%APPDATA%\\Apprise\\apprise'),
101107
expandvars('%APPDATA%\\Apprise\\apprise.yml'),
108+
expandvars('%APPDATA%\\Apprise\\apprise.yaml'),
102109
expandvars('%LOCALAPPDATA%\\Apprise\\apprise'),
103110
expandvars('%LOCALAPPDATA%\\Apprise\\apprise.yml'),
111+
expandvars('%LOCALAPPDATA%\\Apprise\\apprise.yaml'),
104112

105113
#
106114
# Global Support
@@ -109,14 +117,17 @@
109117
# C:\ProgramData\Apprise\
110118
expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise'),
111119
expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise.yml'),
120+
expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise.yaml'),
112121

113122
# C:\Program Files\Apprise
114123
expandvars('%PROGRAMFILES%\\Apprise\\apprise'),
115124
expandvars('%PROGRAMFILES%\\Apprise\\apprise.yml'),
125+
expandvars('%PROGRAMFILES%\\Apprise\\apprise.yaml'),
116126

117127
# C:\Program Files\Common Files
118128
expandvars('%COMMONPROGRAMFILES%\\Apprise\\apprise'),
119129
expandvars('%COMMONPROGRAMFILES%\\Apprise\\apprise.yml'),
130+
expandvars('%COMMONPROGRAMFILES%\\Apprise\\apprise.yaml'),
120131
)
121132

122133
# Default Plugin Search Path for Windows Users

packaging/man/apprise.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,18 +190,24 @@ in the following local locations for configuration files and loads them:
190190

191191
~/.apprise
192192
~/.apprise.yml
193+
~/.apprise.yaml
193194
~/.config/apprise
194195
~/.config/apprise.yml
196+
~/.config/apprise.yaml
195197

196198
~/.apprise/apprise
197199
~/.apprise/apprise.yml
200+
~/.apprise/apprise.yaml
198201
~/.config/apprise/apprise
199202
~/.config/apprise/apprise.yml
203+
~/.config/apprise/apprise.yaml
200204

201205
/etc/apprise
202206
/etc/apprise.yml
207+
/etc/apprise.yaml
203208
/etc/apprise/apprise
204209
/etc/apprise/apprise.yml
210+
/etc/apprise/apprise.yaml
205211

206212
If a default configuration file is referenced in any way by the **apprise**
207213
tool, you no longer need to provide it a Service URL. Usage of the **apprise**

0 commit comments

Comments
 (0)