Date: 27 mai 2016
Author: José Bollo
-TABLE-OF-CONTENT-HERE
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
- <title></title>
+ <title>### Inititial Build</title>
<style type="text/css">code{white-space: pre;}</style>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<link rel="stylesheet" href="doc.css">
</head>
<body>
+<header>
+<h1 class="title">### Inititial Build</h1>
+</header>
<nav id="TOC">
<ul>
<li><a href="#inititial-build">Inititial Build</a></li>
<li><a href="#copy-nbprojet-at-project-base">Copy nbprojet at project base</a></li>
</ul>
</nav>
+<p>mkdir build cd build cmake .. ### Netbeans % Fulup Ar Foll % 14 décembre 2015</p>
<h3 id="inititial-build">Inititial Build</h3>
<p>mkdir build cd build cmake ..</p>
<h3 id="netbeans">Netbeans</h3>
<meta name="generator" content="pandoc">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="author" content="José Bollo">
+ <meta name="author" content="Fulup Ar Foll">
<title>HOWTO WRITE an APPLICATION above AGL FRAMEWORK</title>
<style type="text/css">code{white-space: pre;}</style>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
+ <style type="text/css">
+table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
+ margin: 0; padding: 0; vertical-align: baseline; border: none; }
+table.sourceCode { width: 100%; line-height: 100%; }
+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
+td.sourceCode { padding-left: 5px; }
+code > span.kw { color: #007020; font-weight: bold; }
+code > span.dt { color: #902000; }
+code > span.dv { color: #40a070; }
+code > span.bn { color: #40a070; }
+code > span.fl { color: #40a070; }
+code > span.ch { color: #4070a0; }
+code > span.st { color: #4070a0; }
+code > span.co { color: #60a0b0; font-style: italic; }
+code > span.ot { color: #007020; }
+code > span.al { color: #ff0000; font-weight: bold; }
+code > span.fu { color: #06287e; }
+code > span.er { color: #ff0000; font-weight: bold; }
+ </style>
<link rel="stylesheet" href="doc.css">
</head>
<body>
<header>
<h1 class="title">HOWTO WRITE an APPLICATION above AGL FRAMEWORK</h1>
<h2 class="author">José Bollo</h2>
+<h2 class="author">Fulup Ar Foll</h2>
<h3 class="date">09 juin 2016</h3>
</header>
<nav id="TOC">
<li><a href="#example-of-session-management">Example of session management</a></li>
</ul></li>
<li><a href="#format-of-replies">Format of replies</a><ul>
+<li><a href="#template">Template</a></li>
<li><a href="#field-jtype">Field jtype</a></li>
<li><a href="#field-request">Field request</a></li>
<li><a href="#field-response">Field response</a></li>
-<li><a href="#template">Template</a></li>
+</ul></li>
+<li><a href="#format-of-events">Format of events</a><ul>
+<li><a href="#template-1">Template</a></li>
+<li><a href="#field-jtype-1">Field jtype</a></li>
+<li><a href="#field-event">Field event</a></li>
+<li><a href="#field-data">Field data</a></li>
</ul></li>
</ul></li>
</ul>
}
}</code></pre>
<h4 id="using-afb-client-demo">Using afb-client-demo</h4>
+<blockquote>
+<p>The program is packaged within AGL in the rpm <strong>libafbwsc-dev</strong></p>
+</blockquote>
<p>Here is an example of exchange using <strong>afb-client-demo</strong>:</p>
<pre><code>$ afb-client-demo ws://localhost:1234/api?token=123456
auth connect
<h2 id="format-of-replies">Format of replies</h2>
<p>Replies use javascript object returned as serialized JSON.</p>
<p>This object contains at least 2 mandatory fields of name <strong>jtype</strong> and <strong>request</strong> and one optional field of name <strong>response</strong>.</p>
+<h3 id="template">Template</h3>
+<p>This is a template of replies:</p>
+<pre class="sourceCode json"><code class="sourceCode json"><span class="fu">{</span>
+ <span class="dt">"jtype"</span><span class="fu">:</span> <span class="st">"afb-reply"</span><span class="fu">,</span>
+ <span class="dt">"request"</span><span class="fu">:</span> <span class="fu">{</span>
+ <span class="dt">"status"</span><span class="fu">:</span> <span class="st">"success"</span><span class="fu">,</span>
+ <span class="dt">"info"</span><span class="fu">:</span> <span class="st">"informationnal text"</span><span class="fu">,</span>
+ <span class="dt">"token"</span><span class="fu">:</span> <span class="st">"e83b36f8-d945-463d-b983-5d8ed73ba52"</span><span class="fu">,</span>
+ <span class="dt">"uuid"</span><span class="fu">:</span> <span class="st">"5fcc3f3d-4b84-4fc7-ba66-2d8bd34ae7d1"</span><span class="fu">,</span>
+ <span class="dt">"reqid"</span><span class="fu">:</span> <span class="st">"application-generated-id-23456"</span>
+ <span class="fu">},</span>
+ <span class="dt">"response"</span><span class="fu">:</span> <span class="er">....any</span> <span class="er">response</span> <span class="er">object....</span>
+<span class="fu">}</span></code></pre>
<h3 id="field-jtype">Field jtype</h3>
<p>The field <strong>jtype</strong> must have a value of type string equal to <strong>"afb-reply"</strong>.</p>
<h3 id="field-request">Field request</h3>
<p><strong>reqid</strong> is of type string. It is sent in response to HTTP requests that added a parameter of name <strong>reqid</strong> or <strong>x-afb-reqid</strong> at request time. Value returns in the reply has the exact same value as the one received in the request.</p>
<h3 id="field-response">Field response</h3>
<p>This field response optionally contains an object returned when request succeeded.</p>
-<h3 id="template">Template</h3>
-<p>This is a template of replies:</p>
-<pre><code>{
- "jtype": "afb-reply",
- "request": {
- "status": "success",
- "info": "informationnal text",
- "token": "e83b36f8-d945-463d-b983-5d8ed73ba52",
- "uuid": "5fcc3f3d-4b84-4fc7-ba66-2d8bd34ae7d1",
- "reqid": "application-generated-id-23456"
- },
- "response": ....any response object....
-}</code></pre>
+<h2 id="format-of-events">Format of events</h2>
+<p>Events are javascript object serialized as JSON.</p>
+<p>This object contains at least 2 mandatory fields of name <strong>jtype</strong> and <strong>event</strong> and one optional field of name <strong>data</strong>.</p>
+<h3 id="template-1">Template</h3>
+<p>Here is a template of event:</p>
+<pre class="sourceCode json"><code class="sourceCode json"><span class="fu">{</span>
+ <span class="dt">"jtype"</span><span class="fu">:</span> <span class="st">"afb-event"</span><span class="fu">,</span>
+ <span class="dt">"event"</span><span class="fu">:</span> <span class="st">"sample_api_name/sample_event_name"</span><span class="fu">,</span>
+ <span class="dt">"data"</span><span class="fu">:</span> <span class="er">...any</span> <span class="er">event</span> <span class="er">data...</span>
+<span class="fu">}</span></code></pre>
+<h3 id="field-jtype-1">Field jtype</h3>
+<p>The field <strong>jtype</strong> must have a value of type string equal to <strong>"afb-event"</strong>.</p>
+<h3 id="field-event">Field event</h3>
+<p>The field <strong>event</strong> carries the event's name.</p>
+<p>The name of the event is made of two parts separated by a slash: the name of the name of the API that generated the event and the name of event within the API.</p>
+<h3 id="field-data">Field data</h3>
+<p>This field data if present holds the data carried by the event.</p>
</body>
</html>
Date: 09 juin 2016
Author: José Bollo
-TABLE-OF-CONTENT-HERE
+
Programmation Languages for Applications
-----------------------------------------
#### Using afb-client-demo
+> The program is packaged within AGL in the rpm **libafbwsc-dev**
+
Here is an example of exchange using **afb-client-demo**:
$ afb-client-demo ws://localhost:1234/api?token=123456
This object contains at least 2 mandatory fields of name **jtype** and **request**
and one optional field of name **response**.
+### Template
+
+This is a template of replies:
+
+```json
+{
+ "jtype": "afb-reply",
+ "request": {
+ "status": "success",
+ "info": "informationnal text",
+ "token": "e83b36f8-d945-463d-b983-5d8ed73ba52",
+ "uuid": "5fcc3f3d-4b84-4fc7-ba66-2d8bd34ae7d1",
+ "reqid": "application-generated-id-23456"
+ },
+ "response": ....any response object....
+}
+```
+
### Field jtype
The field **jtype** must have a value of type string equal to **"afb-reply"**.
This field response optionally contains an object returned when request succeeded.
+Format of events
+----------------
+
+Events are javascript object serialized as JSON.
+
+This object contains at least 2 mandatory fields of name **jtype** and **event**
+and one optional field of name **data**.
+
### Template
-This is a template of replies:
+Here is a template of event:
- {
- "jtype": "afb-reply",
- "request": {
- "status": "success",
- "info": "informationnal text",
- "token": "e83b36f8-d945-463d-b983-5d8ed73ba52",
- "uuid": "5fcc3f3d-4b84-4fc7-ba66-2d8bd34ae7d1",
- "reqid": "application-generated-id-23456"
- },
- "response": ....any response object....
- }
+```json
+{
+ "jtype": "afb-event",
+ "event": "sample_api_name/sample_event_name",
+ "data": ...any event data...
+}
+```
+
+### Field jtype
+
+The field **jtype** must have a value of type string equal to **"afb-event"**.
+
+### Field event
+
+The field **event** carries the event's name.
+
+The name of the event is made of two parts separated by a slash:
+the name of the name of the API that generated the event
+and the name of event within the API.
+
+### Field data
+
+This field data if present holds the data carried by the event.
Date: 27 mai 2016
Author: José Bollo
-TABLE-OF-CONTENT-HERE
+
## Event
Date: 30 mai 2016
Author: José Bollo
-TABLE-OF-CONTENT-HERE
+
Roles of afb-daemon
-------------------
<meta name="generator" content="pandoc">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="author" content="José Bollo">
+ <meta name="author" content="Fulup Ar Foll">
<title>HOWTO WRITE a PLUGIN for AFB-DAEMON</title>
<style type="text/css">code{white-space: pre;}</style>
<!--[if lt IE 9]>
<header>
<h1 class="title">HOWTO WRITE a PLUGIN for AFB-DAEMON</h1>
<h2 class="author">José Bollo</h2>
-<h3 class="date">30 mai 2016</h3>
+<h2 class="author">Fulup Ar Foll</h2>
+<h3 class="date">09 juin 2016</h3>
</header>
<nav id="TOC">
<ul>
</nav>
<h1 id="howto-write-a-plugin-for-afb-daemon">HOWTO WRITE a PLUGIN for AFB-DAEMON</h1>
<pre><code>version: 1
-Date: 30 mai 2016
+Date: 09 juin 2016
Author: José Bollo</code></pre>
<h2 id="summary">Summary</h2>
<p>Afb-daemon binders serve files through HTTP protocol and offers to developers the capability to expose application API methods through HTTP or WebSocket protocol.</p>
HOWTO WRITE a PLUGIN for AFB-DAEMON
===================================
version: 1
- Date: 30 mai 2016
+ Date: 09 juin 2016
Author: José Bollo
-TABLE-OF-CONTENT-HERE
+
Summary
-------
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
- <title></title>
+ <meta name="author" content="Manuel Bachmann">
+ <meta name="author" content="José Bollo">
+ <title>Overview of plugins shipped with AFB-Daemon</title>
<style type="text/css">code{white-space: pre;}</style>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<link rel="stylesheet" href="doc.css">
</head>
<body>
+<header>
+<h1 class="title">Overview of plugins shipped with AFB-Daemon</h1>
+<h2 class="author">Manuel Bachmann</h2>
+<h2 class="author">José Bollo</h2>
+<h3 class="date">09 juin 2016</h3>
+</header>
<nav id="TOC">
<ul>
<li><a href="#overview-of-plugins-shipped-with-afb-daemon">Overview of plugins shipped with AFB-Daemon</a><ul>
-# Overview of plugins shipped with AFB-Daemon
+Overview of plugins shipped with AFB-Daemon
+===========================================
Version: 1
Date: 09 juin 2016
Author: Manuel Bachmann
-## List of plugins
+List of plugins
+---------------
Here are the plugins shipped in the source tree:
All plugins may not be built, depending on the development libraries present on the system at build time.
-## Detail of plugins
+Detail of plugins
+-----------------
### Hello World
<meta name="generator" content="pandoc">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="author" content="Manuel Bachmann">
+ <meta name="author" content="José Bollo">
<title>Overview of tests shipped with AFB-Daemon</title>
<style type="text/css">code{white-space: pre;}</style>
<!--[if lt IE 9]>
<header>
<h1 class="title">Overview of tests shipped with AFB-Daemon</h1>
<h2 class="author">Manuel Bachmann</h2>
-<h3 class="date">30 mai 2016</h3>
+<h2 class="author">José Bollo</h2>
+<h3 class="date">09 juin 2016</h3>
</header>
<nav id="TOC">
<ul>
</nav>
<h1 id="overview-of-tests-shipped-with-afb-daemon">Overview of tests shipped with AFB-Daemon</h1>
<pre><code>Version: 1
-Date: 30 mai 2016
+Date: 09 juin 2016
Author: Manuel Bachmann</code></pre>
<h2 id="list-of-tests">List of tests</h2>
<p>Here are the tests shipped in the source tree:</p>
Overview of tests shipped with AFB-Daemon
=========================================
Version: 1
- Date: 30 mai 2016
+ Date: 09 juin 2016
Author: Manuel Bachmann
#!/bin/bash
-meta() {
- awk '
- NR == 1 { t = $0; next }
- NR == 2 && $1 ~ "======" { next }
- NR == 2 { exit }
- $1 == "Date:" { d = $2; for(i = 3 ; i <= NF ; i++) d = d " " $i; next }
- $1 == "Author:" { a = $2; for(i = 3 ; i <= NF ; i++) a = a " " $i; next }
- $1 == "version" || $1 == "Version" {next}
- /^[ \t]*$/ { printf "%% %s\n%% %s\n%% %s\n", t, a, d; exit }
- ' "$1"
+title() {
+ sed '/^[ \t]*$/d' "$1" |
+ sed '/^===/Q' |
+ sed '/^---/Q' |
+ sed 's/^# //;T;Q' |
+ sed 's/^## //;T;Q' |
+ sed '/^---/Q'
}
-# update the date field of file $1
-updadate() {
- local x=$1
- local t=$(git log -n 1 --format=%ct $x)
- [[ -n "$t" ]] || t=$(stat -c %Y $x)
- local d=$(LANG= date -d @$t +"%d %B %Y")
- sed -i "s/^\( Date: *\).*/\1$d/" $x
+authors() {
+ git log --numstat --format='A %aN' -- "$1" |
+ awk '$1=="A"{sub(/^A /,"");a=$0; s[a]+=0; next}NF==3{s[a]+=($1+0)}END{for(a in s)print s[a]" : "a}' |
+ sort -nr |
+ sed 's/[^:]* : //' |
+ sed '1!s/^/; /' |
+ tr -d '\n'
+}
+
+dateof() {
+ local file="$1"
+ local t=$(git log -n 1 --format=%ct "$file")
+ [[ -n "$t" ]] || t=$(stat -c %Y "$file")
+ LANG= date -d @$t +"%d %B %Y"
}
+meta() {
+ local file="$1"
+ local t=$(title "$file")
+ local a=$(authors "$file")
+ local d=$(dateof "$file")
+ echo "% $t"
+ echo "% $a"
+ echo "% $d"
+ cat "$file"
+}
+
+
# make the html file for $1
mkhtml() {
local x=$1
local h=${x%%.md}.html
- { meta "$x"; sed 's/TABLE-OF-CONTENT-HERE//' "$x"; } |
+ meta "$x" |
pandoc --css doc.css -f markdown -t html5 --toc > "$h"
}
# apply
for x in *.md; do
- updadate $x
mkhtml $x
done