Override settings from the commandline

Add a --setting-overrides KEY=VAL commandline option to override
arbitrary items from pelicanconf.py settings files. This adds
flexibility in running pelican and helps reduce sprawl of settings
files. Cast int and str setting overrides to their respective types. Support other setting types by treating them as json. Fallback to json when an override typecast errors. This should make it
possible to set int values to None, resp. to json 'none'
This commit is contained in:
Peter Sabaini 2020-05-09 18:15:16 +02:00
commit 34edcdf33d
4 changed files with 65 additions and 3 deletions

1
.gitignore vendored
View file

@ -3,6 +3,7 @@
.*.swo
*.pyc
.DS_Store
.idea
docs/_build
docs/fr/_build
build