[doc] refactor a bit the doc and use classic theme

Fri, 18 May 2018 00:05:28 +0200

author
David Douard <david.douard@logilab.fr>
date
Fri, 18 May 2018 00:05:28 +0200
changeset 95
c6b655d9b855
parent 94
1ac1457af83f
child 96
6ff321f0d37d

[doc] refactor a bit the doc and use classic theme

doc/_static/pygpibtoolkit.png file | annotate | diff | comparison | revisions
doc/conf.py file | annotate | diff | comparison | revisions
doc/index.rst file | annotate | diff | comparison | revisions
doc/introduction.rst file | annotate | diff | comparison | revisions
Binary file doc/_static/pygpibtoolkit.png has changed
--- a/doc/conf.py	Fri May 18 00:04:54 2018 +0200
+++ b/doc/conf.py	Fri May 18 00:05:28 2018 +0200
@@ -77,13 +77,19 @@
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
 #
-html_theme = 'alabaster'
+#html_theme = 'alabaster'
+html_theme = 'classic'
+html_logo = '_static/pygpibtoolkit.png'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
 # documentation.
 #
-# html_theme_options = {}
+html_theme_options = {
+#    'logo': 'pygpibtoolkit.png',
+#    'logo_name': True,
+#    'description': 'pygpibtoolkit',
+}
 
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
@@ -163,4 +169,4 @@
 # -- Options for todo extension ----------------------------------------------
 
 # If true, `todo` and `todoList` produce output, else they produce nothing.
-todo_include_todos = True
\ No newline at end of file
+todo_include_todos = True
--- a/doc/index.rst	Fri May 18 00:04:54 2018 +0200
+++ b/doc/index.rst	Fri May 18 00:05:28 2018 +0200
@@ -3,8 +3,63 @@
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
 
-Welcome to pygpibtoolkit's documentation!
-=========================================
+pygpibtoolkit
+=============
+
+pygpibtoolkit_ is a Python_ toolkit for talking with GPIB devices. It
+consist in a set of python modules (low-level and some more
+high-level) in order to ease writing python code to play with GPIB
+devices.
+
+There are also some utility commands and GUI tools written using this
+library (and PyQt5 for GUI tools).
+
+The aim of the project is to have an infrastructure that make it easy
+to write code to command/interact with GPIB-controlled devices, and,
+as a corrolary, make it easy to write "description" code for specific
+test equipments.
+
+Quick start
+===========
+
+The simplest way to install pygpibtoolkit_ is to use pip_. I strongly recommend
+you use virtualenvs_ for this, for example via virtualenvwrapper_ or pew_. Here
+is an example session using virtualenvwrapper_ on a Debian stretch machine:
+
+.. code-block:: bash
+
+   david@host:~$ mkvirtualenv -p /usr/bin/python3 pygpib
+   Already using interpreter /usr/bin/python3
+   Using base prefix '/usr'
+   New python executable in /home/david/.virtualenvs/pygpib/bin/python3
+   Also creating executable in /home/david/.virtualenvs/pygpib/bin/python
+   Installing setuptools, pkg_resources, pip, wheel...done.
+
+   (pygpib) david@host:~$ pip install pygpibtoolkit
+   [...]
+   Installing collected packages: pyserial, numpy, sip, PyQt5, pyqtgraph, pygpibtoolkit
+   Successfully installed PyQt5-5.10.1 numpy-1.14.3 pygpibtoolkit-0.1.0 pyqtgraph-0.10.0 pyserial-3.4 sip-4.19.8
+   (pygpib) david@pavo:~$ pygpib-detect --help
+   usage: A simple tool for detecting connected GPIB devices [-h] [-d DEVICE] [-v]
+
+   optional arguments:
+     -h, --help            show this help message and exit
+	 -d DEVICE, --device DEVICE
+                           Device of connected Prologix GPIB bundle
+                           [/dev/ttyUSB0]
+	 -v, --verbose
+   (pygpib) david@host:~$ python
+   Python 3.5.3 (default, Jan 19 2017, 14:11:04)
+   [GCC 6.3.0 20170118] on linux
+   Type "help", "copyright", "credits" or "license" for more information.
+   >>> from pygpibtoolkit.prologix import GPIB
+   >>> from pygpibtoolkit.gpibcontroller import GPIBController
+   >>> cnx = GPIB(device='/dev/ttyUSB0')
+   >>> ctl = GPIBController(cnx)
+   >>> dvm = c.register_device(24, "HP3456A")
+   >>> dvm.S0F1 # set DVM to DC Voltage mode
+
+
 
 .. toctree::
    :maxdepth: 2
@@ -20,3 +75,14 @@
 * :ref:`genindex`
 * :ref:`modindex`
 * :ref:`search`
+
+.. _pygpibtoolkit: https://bitbucket.org/dddouard/pygpibtoolkit
+.. _Prologix: http://www.prologix.com
+.. _Python: http://www.python.org
+.. _`user manual`: http://pygpibtoolkit.readthedocs.io
+.. _GPIB: https://en.wikipedia.org/wiki/IEEE-488
+.. _linux-gpib: https://linux-gpib.sourceforge.io
+.. _virtualenvs: https://docs.python.org/dev/library/venv.html
+.. _pip: https://packaging.python.org/key_projects/#pip
+.. _virtualenvwrapper: http://virtualenvwrapper.readthedocs.io
+.. _pew: https://github.com/berdario/pew
--- a/doc/introduction.rst	Fri May 18 00:04:54 2018 +0200
+++ b/doc/introduction.rst	Fri May 18 00:05:28 2018 +0200
@@ -1,22 +1,5 @@
 .. -*- coding: utf-8 -*-
 
-==============
- Introduction
-==============
-
-pygpibtoolkit_ is a Python_ toolkit for talking with GPIB devices. It
-consist in a set of python modules (low-level and some more
-high-level) in order to ease writing python code to play with GPIB
-devices.
-
-There are also some utility commands and GUI tools written using this
-library (and PyQt4 for GUI parts).
-
-The aim of the project is to have an infrastructure that make it easy
-to write code to command/interact with GPIB-controlled devices, and,
-as a corrolary, make it easy to write "description" code for specific
-test equipments.
-
 Features
 ========
 
@@ -47,10 +30,6 @@
  Tools
 =======
 
-Every tool presented in this section can be found in the `bin`
-directory, and can display a *help* message using the ``-h`` or
-``--help`` option.
-
 For the sake of testing these tools, some example files are proposed
 in the `example` directory.
 

mercurial