Skip to content
Snippets Groups Projects
Commit 605930ee authored by jkerdreu's avatar jkerdreu
Browse files

RST 2 HTML



git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2571 b32b6428-25c9-4566-ad07-03861ab6144f
parent f519f094
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<meta charset="utf-8"/>
<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>xAAL Python stack</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
/* Minimal style sheet for the HTML output of Docutils. */
/* */
/* :Author: Günter Milde, based on html4css1.css by David Goodger */
/* :Id: $Id: minimal.css 8397 2019-09-20 11:09:34Z milde $ */
/* :Copyright: © 2015 Günter Milde. */
/* :License: Released under the terms of the `2-Clause BSD license`_, */
/* in short: */
/* */
/* Copying and distribution of this file, with or without modification, */
/* are permitted in any medium without royalty provided the copyright */
/* notice and this notice are preserved. */
/* */
/* This file is offered as-is, without any warranty. */
/* */
/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
/* This CSS2.1_ stylesheet defines rules for Docutils elements without */
/* HTML equivalent. It is required to make the document semantic visible. */
/* */
/* .. _CSS2.1: http://www.w3.org/TR/CSS2 */
/* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
/* alignment of text and inline objects inside block objects*/
.align-left { text-align: left; }
.align-right { text-align: right; }
.align-center { clear: both; text-align: center; }
.align-top { vertical-align: top; }
.align-middle { vertical-align: middle; }
.align-bottom { vertical-align: bottom; }
/* titles */
h1.title, p.subtitle {
text-align: center;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
p.topic-title,
p.sidebar-title,
p.rubric,
p.admonition-title,
p.system-message-title {
font-weight: bold;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
}
h1 + p.subtitle,
h1 + p.section-subtitle {
font-size: 1.6em;
}
h2 + p.section-subtitle { font-size: 1.28em; }
p.subtitle,
p.section-subtitle,
p.sidebar-subtitle {
font-weight: bold;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
margin-top: -0.5em;
}
p.sidebar-title,
p.rubric {
font-size: larger;
}
p.rubric { color: maroon; }
a.toc-backref {
color: black;
text-decoration: none; }
/* Warnings, Errors */
div.caution p.admonition-title,
div.attention p.admonition-title,
div.danger p.admonition-title,
div.error p.admonition-title,
div.warning p.admonition-title,
div.system-messages h1,
div.error,
span.problematic,
p.system-message-title {
color: red;
font-weight: bold ;
font-family: sans-serif }
}
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
/* inline literals */
span.docutils.literal {
font-family: monospace;
white-space: pre-wrap;
}
/* do not wraph at hyphens and similar: */
.literal > span.pre { white-space: nowrap; }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
/* Lists */
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
/* compact and simple lists: no margin between items */
.simple li, .compact li,
.simple ul, .compact ul,
.simple ol, .compact ol,
.simple > li p, .compact > li p,
dl.simple > dd, dl.compact > dd {
margin-top: 0;
margin-bottom: 0;
}
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
/* Table of Contents */
div.topic.contents { margin: 0.5em 0; }
div.topic.contents ul {
list-style-type: none;
padding-left: 1.5em;
}
div.figure {
margin-left: 2em ;
margin-right: 2em }
/* Enumerated Lists */
ol.arabic { list-style: decimal }
ol.loweralpha { list-style: lower-alpha }
ol.upperalpha { list-style: upper-alpha }
ol.lowerroman { list-style: lower-roman }
ol.upperroman { list-style: upper-roman }
dt span.classifier { font-style: italic }
dt span.classifier:before {
font-style: normal;
margin: 0.5em;
content: ":";
}
div.footer, div.header {
clear: both;
font-size: smaller }
/* Field Lists and drivatives */
/* bold field name, content starts on the same line */
dl.field-list > dt,
dl.option-list > dt,
dl.docinfo > dt,
dl.footnote > dt,
dl.citation > dt {
font-weight: bold;
clear: left;
float: left;
margin: 0;
padding: 0;
padding-right: 0.5em;
}
/* Offset for field content (corresponds to the --field-name-limit option) */
dl.field-list > dd,
dl.option-list > dd,
dl.docinfo > dd {
margin-left: 9em; /* ca. 14 chars in the test examples */
}
/* start field-body on a new line after long field names */
dl.field-list > dd > *:first-child,
dl.option-list > dd > *:first-child
{
display: inline-block;
width: 100%;
margin: 0;
}
/* field names followed by a colon */
dl.field-list > dt:after,
dl.docinfo > dt:after {
content: ":";
}
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
/* Bibliographic Fields (docinfo) */
pre.address { font: inherit; }
dd.authors > p { margin: 0; }
/* Option Lists */
dl.option-list { margin-left: 1.5em; }
dl.option-list > dt { font-weight: normal; }
span.option { white-space: nowrap; }
/* Footnotes and Citations */
dl.footnote.superscript > dd {margin-left: 1em; }
dl.footnote.brackets > dd {margin-left: 2em; }
dl > dt.label { font-weight: normal; }
a.footnote-reference.brackets:before,
dt.label > span.brackets:before { content: "["; }
a.footnote-reference.brackets:after,
dt.label > span.brackets:after { content: "]"; }
a.footnote-reference.superscript,
dl.footnote.superscript > dt.label {
vertical-align: super;
font-size: smaller;
}
dt.label > span.fn-backref { margin-left: 0.2em; }
dt.label > span.fn-backref > a { font-style: italic; }
/* Line Blocks */
div.line-block { display: block; }
div.line-block div.line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em }
margin-left: 40px;
}
div.sidebar {
margin: 0 0 0.5em 1em ;
/* Figures, Images, and Tables */
.figure.align-left,
figure.align-left,
img.align-left,
object.align-left,
table.align-left {
margin-right: auto;
}
.figure.align-center,
figure.align-center,
img.align-center,
object.align-center,
table.align-center {
margin-left: auto;
margin-right: auto;
}
.figure.align-right,
figure.align-right,
img.align-right,
object.align-right,
table.align-right {
margin-left: auto;
}
.figure.align-center, .figure.align-right,
figure.align-center, figure.align-right,
img.align-center, img.align-right,
object.align-center, object.align-right {
display: block;
}
/* reset inner alignment in figures and tables */
.figure.align-left, .figure.align-right,
figure.align-left, figure.align-right,
table.align-left, table.align-center, table.align-right {
text-align: inherit;
}
/* Admonitions and System Messages */
div.admonition,
div.system-message,
div.sidebar,
aside.sidebar {
margin: 1em 1.5em;
border: medium outset;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-right: 1em;
padding-left: 1em;
}
/* Sidebar */
div.sidebar,
aside.sidebar {
width: 30%;
max-width: 26em;
float: right;
clear: right }
clear: right;
}
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
/* Text Blocks */
blockquote,
div.topic,
pre.literal-block,
pre.doctest-block,
pre.math,
pre.code {
margin-left: 1.5em;
margin-right: 1.5em;
}
pre.code .ln { color: gray; } /* line numbers */
/* Tables */
table { border-collapse: collapse; }
td, th {
border-style: solid;
border-color: silver;
padding: 0 1ex;
border-width: thin;
}
td > p:first-child, th > p:first-child { margin-top: 0; }
td > p, th > p { margin-bottom: 0; }
div.system-messages {
margin: 5em }
table > caption {
text-align: left;
margin-bottom: 0.25em
}
div.system-messages h1 {
color: red }
table.borderless td, table.borderless th {
border: 0;
padding: 0;
padding-right: 0.5em /* separate table cells */
}
div.system-message {
border: medium outset ;
padding: 1em }
/* Document Header and Footer */
/* div.header, */
/* header { border-bottom: 1px solid black; } */
/* div.footer, */
/* footer { border-top: 1px solid black; } */
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
/* new HTML5 block elements: set display for older browsers */
header, section, footer, aside, nav, main, article, figure {
display: block;
}
div.topic {
margin: 2em }
</style>
<style type="text/css">
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
/* CSS31_ style sheet for the output of Docutils HTML writers. */
/* Rules for easy reading and pre-defined style variants. */
/* */
/* :Author: Günter Milde, based on html4css1.css by David Goodger */
/* :Id: $Id: plain.css 8397 2019-09-20 11:09:34Z milde $ */
/* :Copyright: © 2015 Günter Milde. */
/* :License: Released under the terms of the `2-Clause BSD license`_, */
/* in short: */
/* */
/* Copying and distribution of this file, with or without modification, */
/* are permitted in any medium without royalty provided the copyright */
/* notice and this notice are preserved. */
/* */
/* This file is offered as-is, without any warranty. */
/* */
/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
/* .. _CSS3: http://www.w3.org/TR/CSS3 */
/* Document Structure */
/* ****************** */
/* "page layout" */
body {
margin: 0;
background-color: #dbdbdb;
}
div.document,
main {
line-height:1.3;
counter-reset: table;
/* counter-reset: figure; */
/* avoid long lines --> better reading */
/* OTOH: lines should not be too short because of missing hyphenation, */
max-width: 50em;
padding: 1px 2%; /* 1px on top avoids grey bar above title (mozilla) */
margin: auto;
background-color: white;
}
h1.title {
text-align: center }
/* Sections */
h2.subtitle {
text-align: center }
/* Transitions */
hr.docutils {
width: 75% }
width: 80%;
margin-top: 1em;
margin-bottom: 1em;
clear: both;
}
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
/* Paragraphs */
/* ========== */
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
/* vertical space (parskip) */
p, ol, ul, dl,
div.line-block,
div.topic,
table {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
p:first-child { margin-top: 0; }
/* (:last-child is new in CSS 3) */
p:last-child { margin-bottom: 0; }
table.align-center {
margin-left: auto;
margin-right: auto;
h1, h2, h3, h4, h5, h6,
dl > dd {
margin-bottom: 0.5em;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
/* Lists */
/* ===== */
.align-right {
text-align: right }
/* Definition Lists */
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* lists nested in definition lists */
/* (:only-child is new in CSS 3) */
dd > ul:only-child, dd > ol:only-child { padding-left: 1em; }
/* div.align-center * { */
/* text-align: left } */
/* Description Lists */
/* styled like in most dictionaries, encyclopedias etc. */
dl.description > dt {
font-weight: bold;
clear: left;
float: left;
margin: 0;
padding: 0;
padding-right: 0.5em;
}
.align-top {
vertical-align: top }
/* Field Lists */
.align-middle {
vertical-align: middle }
/* example for custom field-name width */
dl.field-list.narrow > dd {
margin-left: 5em;
}
/* run-in: start field-body on same line after long field names */
dl.field-list.run-in > dd p {
display: block;
}
.align-bottom {
vertical-align: bottom }
/* Bibliographic Fields */
ol.simple, ul.simple {
margin-bottom: 1em }
/* generally, bibliographic fields use special definition list dl.docinfo */
/* but dedication and abstract are placed into "topic" divs */
div.abstract p.topic-title {
text-align: center;
}
div.dedication {
margin: 2em 5em;
text-align: center;
font-style: italic;
}
div.dedication p.topic-title {
font-style: normal;
}
ol.arabic {
list-style: decimal }
/* Citations */
dl.citation dt.label {
font-weight: bold;
}
span.fn-backref {
font-weight: normal;
}
ol.loweralpha {
list-style: lower-alpha }
/* Text Blocks */
/* =========== */
ol.upperalpha {
list-style: upper-alpha }
/* Literal Blocks */
ol.lowerroman {
list-style: lower-roman }
pre.literal-block,
pre.doctest-block,
pre.math,
pre.code {
font-family: monospace;
}
ol.upperroman {
list-style: upper-roman }
/* Block Quotes */
p.attribution {
blockquote > table,
div.topic > table {
margin-top: 0;
margin-bottom: 0;
}
blockquote p.attribution,
div.topic p.attribution {
text-align: right;
margin-left: 50% }
margin-left: 20%;
}
p.caption {
font-style: italic }
/* Tables */
/* ====== */
p.credits {
font-style: italic ;
font-size: smaller }
/* th { vertical-align: bottom; } */
p.label {
white-space: nowrap }
table tr { text-align: left; }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
/* "booktabs" style (no vertical lines) */
table.booktabs {
border: 0;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.booktabs * {
border: 0;
}
table.booktabs th {
border-bottom: thin solid;
}
p.sidebar-title {
font-family: sans-serif ;
/* numbered tables (counter defined in div.document) */
table.numbered > caption:before {
counter-increment: table;
content: "Table " counter(table) ": ";
font-weight: bold;
font-size: larger }
}
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
/* Explicit Markup Blocks */
/* ====================== */
p.topic-title {
font-weight: bold }
/* Footnotes and Citations */
/* ----------------------- */
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
/* line on the left */
dl.footnote {
padding-left: 1ex;
border-left: solid;
border-left-width: thin;
}
/* Directives */
/* ---------- */
/* Body Elements */
/* ~~~~~~~~~~~~~ */
/* Images and Figures */
/* let content flow to the side of aligned images and figures */
.figure.align-left,
figure.align-left,
img.align-left,
object.align-left {
display: block;
clear: left;
float: left;
margin-right: 1em;
}
.figure.align-right,
figure.align-right,
img.align-right,
object.align-right {
display: block;
clear: right;
float: right;
margin-left: 1em;
}
/* Stop floating sidebars, images and figures at section level 1,2,3 */
h1, h2, h3 { clear: both; }
/* Sidebar */
/* Move right. In a layout with fixed margins, */
/* it can be moved into the margin. */
div.sidebar,
aside.sidebar {
width: 30%;
max-width: 26em;
margin-left: 1em;
margin-right: -2%;
background-color: #ffffee;
}
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
/* Code */
pre.code .ln { color: grey; } /* line numbers */
pre.code { padding: 0.7ex }
pre.code, code { background-color: #eeeeee }
pre.code .ln { color: gray; } /* line numbers */
/* basic highlighting: for a complete scheme, see */
/* http://docutils.sourceforge.net/sandbox/stylesheets/ */
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
......@@ -284,78 +543,55 @@ pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
/* Math */
/* styled separately (see math.css for math-output=HTML) */
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
/* Epigraph */
/* Highlights */
/* Pull-Quote */
/* Compound Paragraph */
/* Container */
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
/* can be styled in a custom stylesheet */
table.docinfo {
margin: 2em 4em }
/* Document Header and Footer */
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
footer, header,
div.footer, div.header {
font-size: smaller;
clear: both;
padding: 0.5em 2%;
background-color: #ebebee;
border: none;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
/* Inline Markup */
/* ============= */
/* Emphasis */
/* em */
/* Strong Emphasis */
/* strong */
/* Interpreted Text */
/* span.interpreted */
/* Title Reference */
/* cite */
/* Inline Literals */
/* possible values: normal, nowrap, pre, pre-wrap, pre-line */
/* span.docutils.literal { white-space: pre-wrap; } */
/* Hyperlink References */
a { text-decoration: none; }
/* External Targets */
/* span.target.external */
/* Internal Targets */
/* span.target.internal */
/* Footnote References */
/* a.footnote-reference */
/* Citation References */
/* a.citation-reference */
</style>
</head>
......@@ -365,21 +601,21 @@ ul.auto-toc {
<div class="section" id="requirements">
<h1>Requirements</h1>
<p>To install xAAL for Python, you need Python3. Python version 3 isn't mandatory
but highly recommended (some parts haven't be tested with Python 2 since a while).
Install the following packages:</p>
<p>To install xAAL for Python, you need Python3.</p>
</div>
<div class="section" id="un-x-like">
<h1>Un*x like</h1>
<p>Install the following packages:</p>
<ul class="simple">
<li>subversion</li>
<li>python3-dev</li>
<li>python3-setuptools</li>
<li>libsodium-dev</li>
<li><p>subversion</p></li>
<li><p>python3-dev</p></li>
<li><p>python3-setuptools</p></li>
<li><p>libsodium-dev</p></li>
</ul>
<p>For Debian / Ubuntu users:</p>
<pre class="code bash literal-block">
$ apt-get install subversion python3-dev libsodium-dev python3-setuptools gcc
<pre class="code bash literal-block"><code>$ apt-get install subversion python3-dev libsodium-dev python3-setuptools gcc
<span class="comment single"># recommended
</span>$ apt-get install python3-virtualenv python3-pip
</pre>
</span>$ apt-get install python3-venv python3-pip</code></pre>
</div>
<div class="section" id="install">
<h1>Install</h1>
......@@ -387,68 +623,43 @@ $ apt-get install subversion python3-dev libsodium-dev python3-setuptools gcc
you have to install things from SVN or archive.</p>
<p>You can use virtualenv (recommended).</p>
<p>First build a virtualenv :</p>
<pre class="code bash literal-block">
<span class="comment single"># for debian / ubuntu
</span>$ python3 -m virtualenv --python<span class="operator">=</span>python3 xaal_env
<span class="comment single"># or
</span>$ virtualenv3 xaal_env
</pre>
<pre class="code bash literal-block"><code>$ python3 -m venv xaal_env</code></pre>
<p>Everytime, you want to use the binding, you must source the activate script.</p>
<pre class="code bash literal-block">
$ <span class="name builtin">source</span> xaal_env/bin/activate
</pre>
<pre class="code bash literal-block"><code>$ <span class="name builtin">source</span> xaal_env/bin/activate</code></pre>
<p>Download sources from SVN:</p>
<pre class="code bash literal-block">
$ svn checkout https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/trunk/ xaal_svn
</pre>
<pre class="code bash literal-block"><code>$ svn checkout https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/trunk/ xaal_svn</code></pre>
<p>First, install the xaal.lib package:</p>
<pre class="code bash literal-block">
$ <span class="name builtin">cd</span> xaal_svn/libs/lib/
$ python setup.py develop
</pre>
<pre class="code bash literal-block"><code>$ <span class="name builtin">cd</span> xaal_svn/libs/lib/
$ python setup.py develop</code></pre>
<p>Install the monitor lib (needed by Dashboard, REST API..)</p>
<pre class="code bash literal-block">
$ <span class="name builtin">cd</span> xaal_svn/libs/monitor/
$ python setup.py develop
</pre>
<pre class="code bash literal-block"><code>$ <span class="name builtin">cd</span> xaal_svn/libs/monitor/
$ python setup.py develop</code></pre>
<p>Install the schemas (needed by some devices)</p>
<pre class="code bash literal-block">
$ <span class="name builtin">cd</span> xaal_svn/libs/schemas/
$ python setup.py develop
</pre>
<pre class="code bash literal-block"><code>$ <span class="name builtin">cd</span> xaal_svn/libs/schemas/
$ python setup.py develop</code></pre>
<p>Install the tools</p>
<pre class="code bash literal-block">
$ <span class="name builtin">cd</span> xaal_svn/apps/tools
$ python setup.py develop
</pre>
<pre class="code bash literal-block"><code>$ <span class="name builtin">cd</span> xaal_svn/apps/tools
$ python setup.py develop</code></pre>
<p>You can use the <em>python setup.py install</em> instead of <em>develop</em>, but modification
in source files, won't be applied, you have to re-install it. Right now develop,
is the best option.</p>
<p>Create the configuration file in your home directory:</p>
<pre class="code bash literal-block">
$ mkdir ~/.xaal/
<pre class="code bash literal-block"><code>$ mkdir ~/.xaal/
$ cp xaal_svn/libs/lib/xaal.ini.sample ~/.xaal/xaal.ini
$ xaal-keygen
</pre>
$ xaal-keygen</code></pre>
<p>xaal-keygen will compute an key for a given passphrase. Edit the xaal.ini
file according to your needs.</p>
</div>
<div class="section" id="tests">
<h1>Tests</h1>
<p>First, you can launch a message dumper with this tools</p>
<pre class="code bash literal-block">
$ xaal-dumper
$ or xaal-tail <span class="literal number">0</span>
</pre>
<pre class="code bash literal-block"><code>$ xaal-dumper
$ or xaal-tail <span class="literal number">0</span></code></pre>
<p>To start an fake lamp:</p>
<pre class="code bash literal-block">
$ <span class="name builtin">cd</span> xaal_svn/devices/test/DummyDevices/
$ python lamp.py
</pre>
<pre class="code bash literal-block"><code>$ <span class="name builtin">cd</span> xaal_svn/devices/test/DummyDevices/
$ python lamp.py</code></pre>
<p>To check devices, you can use:</p>
<pre class="code bash literal-block">
<span class="comment single"># search alive devices
<pre class="code bash literal-block"><code><span class="comment single"># search alive devices
</span>$ xaal-isalive
<span class="comment single"># search lamp.basic devices
......@@ -464,42 +675,55 @@ $ python lamp.py
</span>$ xaal-walker
<span class="comment single"># same but on for lamp devices
</span>$ xaal-walker lamp.any
</pre>
</span>$ xaal-walker lamp.any</code></pre>
</div>
<div class="section" id="windows">
<h1>Windows</h1>
<p>This code can be used w/ Windows (tested w/ Win10 and Python 3.8). You can build
the virtualenv with the same way. To activate the venv, you should run Scriptsactivate.bat.
For Powershell users (recommanded), you must tweak the ExecutionPolicy
to be able to run Activate.ps1.</p>
<blockquote>
<pre class="code literal-block"><code>Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser</code></pre>
</blockquote>
<p>To install libsodium. You can dowload it here: <a class="reference external" href="https://download.libsodium.org/libsodium/releases/">https://download.libsodium.org/libsodium/releases/</a>
Extract the DLL from the zip file (libsodium-1.0.18-stable-msvc.ziplibsodiumx64Releasev142dynamic)
in the Win32 DLL folder.</p>
<p>If everything is fine, you can use exactly the same commands on Un*x and Windows. The xaal-* commands
are just renamed with an exe extension (ie: xaal-dumper.exe)</p>
</div>
<div class="section" id="issues">
<h1>Issues:</h1>
<p>Right now some gateways won't work on Windows due to missing libaries (openZwave ie)</p>
</div>
<div class="section" id="coding-style">
<h1>Coding style</h1>
<p>Every xAAL program (device, gateway, apps) use a namespace. For example, xaal.rest,
or xaal.zwave. By convention, you can run everything just by calling the namespace
module.</p>
<pre class="code bash literal-block">
<span class="comment single"># to run the meta data sever:
<pre class="code bash literal-block"><code><span class="comment single"># to run the meta data sever:
</span>$ python -m xaal.metadb
<span class="comment single"># to run the dashboard (web interface)
</span>$ python -m xaal.dashboard
<span class="comment single"># to run the Zwave gateway
</span>$ python -m xaal.zwave
</pre>
<p>Of course, you find need to install needed packages.</p>
</span>$ python -m xaal.zwave</code></pre>
<p>Of course, you need to install packages first.</p>
</div>
<div class="section" id="notes">
<h1>Notes</h1>
<ul class="simple">
<li>If you use xAAL on multiple hosts, take care of the system clock. xAAL use
<li><p>If you use xAAL on multiple hosts, take care of the system clock. xAAL use
date/time to cypher the messages. If clocks differs, you will receive an error
message about a &quot;replay attack&quot;. In production, NTP is your best friend. A window
of 1 minutes is accepted, but no more.</li>
of 1 minutes is accepted, but no more.</p></li>
</ul>
</div>
<div class="section" id="faq">
<h1>FAQ</h1>
<ul>
<li><p class="first">Python terminated by signal SIGSEGV: You probably forgot to setup the key in
config file.</p>
</li>
<li><p class="first">Configuration files are hard to read / edit. Why don't you use YAML or XML
<li><p>Configuration files are hard to read / edit. Why don't you use YAML or XML
for config ?</p>
<p>First, we need something that support nested config so we can not use
ConfigParser. Next, we tested severals YAML packages, but they are really
......
......@@ -2,14 +2,14 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>xaal.lib</title>
<style type="text/css">
/* Minimal style sheet for the HTML output of Docutils. */
/* */
/* :Author: Günter Milde, based on html4css1.css by David Goodger */
/* :Id: $Id: minimal.css 8036 2017-02-14 13:05:46Z milde $ */
/* :Id: $Id: minimal.css 8397 2019-09-20 11:09:34Z milde $ */
/* :Copyright: © 2015 Günter Milde. */
/* :License: Released under the terms of the `2-Clause BSD license`_, */
/* in short: */
......@@ -40,10 +40,10 @@
h1.title, p.subtitle {
text-align: center;
}
p.admonition-title,
p.topic-title,
p.sidebar-title,
p.rubric,
p.admonition-title,
p.system-message-title {
font-weight: bold;
}
......@@ -101,10 +101,11 @@ dl.simple > dd, dl.compact > dd {
}
/* Table of Contents */
div.topic.contents { margin: 0; }
ul.auto-toc {
div.topic.contents { margin: 0.5em 0; }
div.topic.contents ul {
list-style-type: none;
padding-left: 1.5em; }
padding-left: 1.5em;
}
/* Enumerated Lists */
ol.arabic { list-style: decimal }
......@@ -159,7 +160,7 @@ pre.address { font: inherit; }
dd.authors > p { margin: 0; }
/* Option Lists */
dl.option-list { margin-left: 40px; }
dl.option-list { margin-left: 1.5em; }
dl.option-list > dt { font-weight: normal; }
span.option { white-space: nowrap; }
......@@ -189,45 +190,56 @@ div.line-block div.line-block {
/* Figures, Images, and Tables */
.figure.align-left,
figure.align-left,
img.align-left,
object.align-left,
table.align-left {
margin-right: auto;
}
.figure.align-center,
figure.align-center,
img.align-center,
object.align-center {
margin-left: auto;
margin-right: auto;
display: block;
}
object.align-center,
table.align-center {
margin-left: auto;
margin-right: auto;
}
.figure.align-right,
figure.align-right,
img.align-right,
object.align-right,
table.align-right {
margin-left: auto;
}
.figure.align-center, .figure.align-right,
figure.align-center, figure.align-right,
img.align-center, img.align-right,
object.align-center, object.align-right {
display: block;
}
/* reset inner alignment in figures and tables */
/* div.align-left, div.align-center, div.align-right, */
table.align-left, table.align-center, table.align-right
{ text-align: inherit }
.figure.align-left, .figure.align-right,
figure.align-left, figure.align-right,
table.align-left, table.align-center, table.align-right {
text-align: inherit;
}
/* Admonitions and System Messages */
div.admonition,
div.system-message,
div.sidebar{
margin: 40px;
div.sidebar,
aside.sidebar {
margin: 1em 1.5em;
border: medium outset;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-right: 1em;
padding-left: 1em;
}
/* Sidebar */
div.sidebar {
div.sidebar,
aside.sidebar {
width: 30%;
max-width: 26em;
float: right;
......@@ -235,13 +247,14 @@ div.sidebar {
}
/* Text Blocks */
blockquote,
div.topic,
pre.literal-block,
pre.doctest-block,
pre.math,
pre.code {
margin-right: 40px;
margin-left: 40px;
margin-left: 1.5em;
margin-right: 1.5em;
}
pre.code .ln { color: gray; } /* line numbers */
......@@ -267,6 +280,17 @@ table.borderless td, table.borderless th {
padding-right: 0.5em /* separate table cells */
}
/* Document Header and Footer */
/* div.header, */
/* header { border-bottom: 1px solid black; } */
/* div.footer, */
/* footer { border-top: 1px solid black; } */
/* new HTML5 block elements: set display for older browsers */
header, section, footer, aside, nav, main, article, figure {
display: block;
}
</style>
<style type="text/css">
......@@ -274,7 +298,7 @@ table.borderless td, table.borderless th {
/* Rules for easy reading and pre-defined style variants. */
/* */
/* :Author: Günter Milde, based on html4css1.css by David Goodger */
/* :Id: $Id: plain.css 8120 2017-06-22 21:02:40Z milde $ */
/* :Id: $Id: plain.css 8397 2019-09-20 11:09:34Z milde $ */
/* :Copyright: © 2015 Günter Milde. */
/* :License: Released under the terms of the `2-Clause BSD license`_, */
/* in short: */
......@@ -294,17 +318,20 @@ table.borderless td, table.borderless th {
/* "page layout" */
body {
padding: 0 5%;
margin: 8px 0;
margin: 0;
background-color: #dbdbdb;
}
div.document {
div.document,
main {
line-height:1.3;
counter-reset: table;
/* counter-reset: figure; */
/* avoid long lines --> better reading */
/* OTOH: lines should not be too short because of missing hyphenation, */
max-width: 50em;
padding: 1px 2%; /* 1px on top avoids grey bar above title (mozilla) */
margin: auto;
background-color: white;
}
/* Sections */
......@@ -324,26 +351,27 @@ hr.docutils {
/* vertical space (parskip) */
p, ol, ul, dl,
div.line-block,
div.topic,
table {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
p:first-child { margin-top: 0; }
/* (:last-child is new in CSS 3) */
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4, h5, h6,
dl > dd {
margin-bottom: 0.5em;
}
/* Lists */
/* ========== */
/* ===== */
/* Definition Lists */
dl > dd > p:first-child { margin-top: 0; }
/* :last-child is not part of CSS 2.1 (introduced in CSS 3) */
dl > dd > p:last-child { margin-bottom: 0; }
/* lists nested in definition lists */
/* :only-child is not part of CSS 2.1 (introduced in CSS 3) */
/* (:only-child is new in CSS 3) */
dd > ul:only-child, dd > ol:only-child { padding-left: 1em; }
/* Description Lists */
......@@ -393,22 +421,19 @@ span.fn-backref {
}
/* Text Blocks */
/* ============ */
/* =========== */
/* Literal Blocks */
pre.literal-block, pre.doctest-block,
pre.math, pre.code {
margin-left: 1.5em;
margin-right: 1.5em
pre.literal-block,
pre.doctest-block,
pre.math,
pre.code {
font-family: monospace;
}
/* Block Quotes */
blockquote,
div.topic {
margin-left: 1.5em;
margin-right: 1.5em
}
blockquote > table,
div.topic > table {
margin-top: 0;
......@@ -471,38 +496,42 @@ dl.footnote {
/* let content flow to the side of aligned images and figures */
.figure.align-left,
figure.align-left,
img.align-left,
object.align-left {
display: block;
clear: left;
float: left;
margin-right: 1em
margin-right: 1em;
}
.figure.align-right,
figure.align-right,
img.align-right,
object.align-right {
display: block;
clear: right;
float: right;
margin-left: 1em
margin-left: 1em;
}
/* Stop floating sidebars, images and figures at section level 1,2,3 */
h1, h2, h3 { clear: both; }
/* Sidebar */
/* Move into the margin. In a layout with fixed margins, */
/* it can be moved into the margin completely. */
div.sidebar {
/* Move right. In a layout with fixed margins, */
/* it can be moved into the margin. */
div.sidebar,
aside.sidebar {
width: 30%;
max-width: 26em;
margin-left: 1em;
margin-right: -5.5%;
margin-right: -2%;
background-color: #ffffee;
}
/* Code */
pre.code { padding: 0.7ex }
pre.code, code { background-color: #eeeeee }
pre.code .ln { color: gray; } /* line numbers */
/* basic highlighting: for a complete scheme, see */
......@@ -527,9 +556,13 @@ pre.code .inserted, code .inserted { background-color: #A3D289}
/* Document Header and Footer */
footer, header,
div.footer, div.header {
clear: both;
font-size: smaller;
clear: both;
padding: 0.5em 2%;
background-color: #ebebee;
border: none;
}
/* Inline Markup */
......@@ -543,6 +576,7 @@ div.footer, div.header {
/* span.interpreted */
/* Title Reference */
/* cite */
/* Inline Literals */
/* possible values: normal, nowrap, pre, pre-wrap, pre-line */
/* span.docutils.literal { white-space: pre-wrap; } */
......@@ -573,13 +607,9 @@ with the xAAL protocol.</p>
<h1>Dependencies</h1>
<p>xaal.lib depends on :</p>
<ul class="simple">
<li><p>ujson</p></li>
<li><p>pysodium</p></li>
<li><p>configobj</p></li>
</ul>
<p>But ujson compiled by hand (with pip install ie), will lead in a slow startup.
I'm unable to know exactly why. Using package distribution is really recommended.
If you can't, simply use json in place.</p>
</div>
<div class="section" id="install">
<h1>Install</h1>
......@@ -595,7 +625,7 @@ this:</p>
<pre class="code python literal-block"><code><span class="keyword namespace">from</span> <span class="name namespace">xaal.lib</span> <span class="keyword namespace">import</span> <span class="name">Engine</span>
<span class="keyword">def</span> <span class="name function">display</span><span class="punctuation">(</span><span class="name">msg</span><span class="punctuation">):</span>
<span class="keyword">print</span><span class="punctuation">(</span><span class="name">msg</span><span class="punctuation">)</span>
<span class="name builtin">print</span><span class="punctuation">(</span><span class="name">msg</span><span class="punctuation">)</span>
<span class="name">eng</span> <span class="operator">=</span> <span class="name">Engine</span><span class="punctuation">()</span>
<span class="name">eng</span><span class="operator">.</span><span class="name">add_rx_handler</span><span class="punctuation">(</span><span class="name">display</span><span class="punctuation">)</span>
......@@ -615,10 +645,10 @@ this:</p>
<span class="comment single"># declare two device methods ON &amp; OFF</span>
<span class="keyword">def</span> <span class="name function">on</span><span class="punctuation">():</span>
<span class="name">light</span><span class="operator">.</span><span class="name">value</span> <span class="operator">=</span> <span class="name builtin pseudo">True</span>
<span class="name">light</span><span class="operator">.</span><span class="name">value</span> <span class="operator">=</span> <span class="keyword constant">True</span>
<span class="keyword">def</span> <span class="name function">off</span><span class="punctuation">():</span>
<span class="name">light</span><span class="operator">.</span><span class="name">value</span> <span class="operator">=</span> <span class="name builtin pseudo">False</span>
<span class="name">light</span><span class="operator">.</span><span class="name">value</span> <span class="operator">=</span> <span class="keyword constant">False</span>
<span class="name">dev</span><span class="operator">.</span><span class="name">add_method</span><span class="punctuation">(</span><span class="literal string single">'on'</span><span class="punctuation">,</span><span class="name">on</span><span class="punctuation">)</span>
<span class="name">dev</span><span class="operator">.</span><span class="name">add_method</span><span class="punctuation">(</span><span class="literal string single">'off'</span><span class="punctuation">,</span><span class="name">off</span><span class="punctuation">)</span>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment