mirror of
https://github.com/dtomlinson91/panaetius.git
synced 2025-12-22 04:55:44 +00:00
Merge branch 'master' into manual-header
This commit is contained in:
@@ -3,7 +3,7 @@ Configuration
|
||||
|
||||
panaetius is fairly easy to configure. There are just a couple of options to be aware of.
|
||||
|
||||
header.py
|
||||
__header__.py
|
||||
----------
|
||||
|
||||
You should set a ``__header__.py`` next to your script or module.
|
||||
@@ -16,6 +16,25 @@ E.g a ``__header__.py`` for the module ``plex_posters`` would look like:
|
||||
|
||||
__header__ = 'plex_posters'
|
||||
|
||||
Your config file can then be created at ``~/.config/__header__/config.toml``.
|
||||
|
||||
Your environment variables can be created with:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
HEADER_FOO = "bar"
|
||||
HEADER_SUBSECTION_FOO = "bar"
|
||||
|
||||
The headers of the toml file would look like:
|
||||
|
||||
.. code-block:: toml
|
||||
|
||||
[__header__]
|
||||
foo = bar
|
||||
|
||||
[__header__.subsection]
|
||||
foo = bar
|
||||
|
||||
If you are writing a script, simply place this ``__header__.py`` along side your script. Panaetius will pick this up when the script is ran.
|
||||
|
||||
If you are writing a module, you can either place the ``__header__.py`` alongside the script that uses your module. If this is not possible, panaetius will set the default ``__header__`` variable to the name of the virtualenv that the script is activated from.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
panaetius
|
||||
==========
|
||||
Introduction
|
||||
=============
|
||||
|
||||
.. image:: https://img.shields.io/readthedocs/panaetius?style=for-the-badge :target: https://panaetius.readthedocs.io/en/latest/?badge=latest
|
||||
:alt: Documentation Status
|
||||
|
||||
@@ -1 +1 @@
|
||||
__version__ = '1.0.1'
|
||||
__version__ = '1.0.2'
|
||||
|
||||
Reference in New Issue
Block a user