From 82cfed9c222f723dcc36c5c7eb206c18e0209498 Mon Sep 17 00:00:00 2001
From: Benjamin Bertrand <benjamin.bertrand@esss.se>
Date: Fri, 21 Jul 2017 12:26:58 +0200
Subject: [PATCH] Add documentation about pyscan

---
 README.rst             | 30 ++++++++++++++++++++++++++++--
 client/environment.yml | 28 ++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 2 deletions(-)
 create mode 100644 client/environment.yml

diff --git a/README.rst b/README.rst
index 56a9f34..799e2bc 100644
--- a/README.rst
+++ b/README.rst
@@ -20,11 +20,11 @@ You can use docker for development:
     # Create the database
     $ docker-compose run web flask initdb
 
-4. Start the application::
+3. Start the application::
 
     $ docker-compose up
 
-5. Open your browser and go to `http://localhost:8000
+4. Open your browser and go to `http://localhost:8000
    <http://localhost:8000>`_.
 
 
@@ -44,3 +44,29 @@ To restore the database::
 
     $ gunzip -c inventory_db.dump.g | docker run --rm --link inventory_postgres:postgres --net inventory_default
       -e PGPASSWORD="<inventory_password>" -i postgres:9.6 psql -h postgres -U inventory inventory_db
+
+
+Client
+------
+
+The `pyscan.py` client can be found under the "client" directory.
+You should first create a configuration file::
+
+    $ cat ~/.pyscan.yml
+    device: /dev/tty.usbmodem1421
+    url: http://localhost:8000/api
+    username: yourusername
+
+
+To install the requirements, conda_ is recommended::
+
+    $ cd client
+    $ conda env create -n pyscan
+    $ source activate pyscan
+
+Run::
+
+    $ python pyscan.py
+
+
+.. _conda: https://conda.io/miniconda.html
diff --git a/client/environment.yml b/client/environment.yml
new file mode 100644
index 0000000..c9e9e1d
--- /dev/null
+++ b/client/environment.yml
@@ -0,0 +1,28 @@
+name: pyscan
+channels: !!python/tuple
+- conda-forge
+- defaults
+dependencies:
+- conda-forge::ca-certificates=2017.4.17=0
+- conda-forge::certifi=2017.4.17=py36_0
+- conda-forge::chardet=3.0.2=py36_1
+- conda-forge::click=6.7=py36_0
+- conda-forge::idna=2.5=py36_0
+- conda-forge::ncurses=5.9=10
+- conda-forge::openssl=1.0.2l=0
+- conda-forge::pip=9.0.1=py36_0
+- conda-forge::python=3.6.1=3
+- conda-forge::pyyaml=3.12=py36_1
+- conda-forge::readline=6.2=0
+- conda-forge::requests=2.18.1=py36_0
+- conda-forge::setuptools=33.1.1=py36_0
+- conda-forge::sqlite=3.13.0=1
+- conda-forge::tk=8.5.19=1
+- conda-forge::urllib3=1.21.1=py36_0
+- conda-forge::wheel=0.29.0=py36_0
+- conda-forge::xz=5.2.2=0
+- conda-forge::yaml=0.1.6=0
+- conda-forge::zlib=1.2.11=0
+- pip:
+  - daiquiri==1.2.1
+  - pyserial==3.3
-- 
GitLab