diff --git a/README.md b/README.md index 9a6327098764b9be4d664f7f492eb64724d7b308..cfc287f06d2015696ee6ad78c31003e0effce058 100644 --- a/README.md +++ b/README.md @@ -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 = {