From 2cbd06ab3fed736f29538eea0d2401f299d2f42c Mon Sep 17 00:00:00 2001
From: Thomas Reifenberger <tom-mi@users.noreply.github.com>
Date: Fri, 20 Nov 2015 21:07:24 +0100
Subject: [PATCH] Add docs on dist function

---
 README.md | 40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 9a63270..cfc287f 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 = {
-- 
GitLab