Skip to content
Snippets Groups Projects
Commit 2cbd06ab authored by Thomas Reifenberger's avatar Thomas Reifenberger
Browse files

Add docs on dist function

parent d1682f56
No related branches found
No related tags found
No related merge requests found
......@@ -8,9 +8,43 @@ The purpose of this library is to generate mkp files from source without having
## Installation
pip install mkp
## Usage
### Automatically pack mkp package
Create a executable script in the the top directory, e.g. `dist.py`
#!/usr/bin/env python
from mkp import dist
dist({
'author': 'John Doe',
'description': 'Test the automatic creation of packages',
'download_url': 'http://example.com/',
'name': 'test',
'title': 'Test',
'version': '1.0',
'version.min_required': '1.2.3',
})
Create a directory structure as follows:
├── agents/
├── checkman/
├── checks/
├── doc/
├── inventory/
├── notifications/
├── pnp-templates/
├── web/
└── dist.py
Empty directories can be omitted. Running `check.py` will pack all files in the
directories listed above to a mkp package with the canonical name and the
specified metadata. The mkp file will be written to the `dist` directory.
### Extract mkp package
import mkp
......@@ -21,6 +55,10 @@ The purpose of this library is to generate mkp files from source without having
### Pack files to mkp package
In contrast to `dist`, this provides the possibility to manually select the
files by replacing `find_files`. It is also possible to choose a different
output filename.
import mkp
info = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment