From: José Bollo Date: Sun, 29 May 2016 08:11:06 +0000 (+0200) Subject: improves documentation formatting X-Git-Tag: 2.0.2~21 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-main.git;a=commitdiff_plain;h=f45bd5fbf8d1fe440b1855d93b387755d63ac8f0 improves documentation formatting Change-Id: I819dfdc98dab5fc75c8858b2afb1484e8d6b3b5a Signed-off-by: José Bollo --- diff --git a/doc/afm-system-daemon.html b/doc/afm-system-daemon.html index dac4315..00cf81a 100644 --- a/doc/afm-system-daemon.html +++ b/doc/afm-system-daemon.html @@ -8,10 +8,31 @@

The afm-system-daemon

version: 1
-Date:    15 March 2016
+Date:    29 mai 2016
 Author:  José Bollo
 
+

+

Foreword

@@ -76,30 +97,30 @@ located at /lib/systemd/system/afm-system-daemon.service.

-r
 --root directory
 
-     Set the root application directory.
+ Set the root application directory.
 
-     Note that the default root directory is defined
-     to be /usr/share/afm/applications (may change).
+ Note that the default root directory is defined
+ to be /usr/share/afm/applications (may change).
 
 -d
 --daemon
 
-     Daemonizes the process. It is not needed by sytemd.
+ Daemonizes the process. It is not needed by sytemd.
 
 -q
 --quiet
 
-     Reduces the verbosity (can be repeated).
+ Reduces the verbosity (can be repeated).
 
 -v
 --verbose
 
-     Increases the verbosity (can be repeated).
+ Increases the verbosity (can be repeated).
 
 -h
 --help
 
-     Prints a short help.
+ Prints a short help.
 
@@ -143,9 +164,9 @@ returns a dbus error that is a string.

installed applications.

dbus-send --session --print-reply \
-    --dest=org.AGL.afm.system \
-    /org/AGL/afm/system \
-    org.AGL.afm.system.install 'string:"/tmp/appli.wgt"'
+--dest=org.AGL.afm.system \
+/org/AGL/afm/system \
+org.AGL.afm.system.install 'string:"/tmp/appli.wgt"'
 
diff --git a/doc/afm-system-daemon.md b/doc/afm-system-daemon.md index 9a22add..7589574 100644 --- a/doc/afm-system-daemon.md +++ b/doc/afm-system-daemon.md @@ -3,9 +3,10 @@ The afm-system-daemon ===================== version: 1 - Date: 15 March 2016 + Date: 29 mai 2016 Author: José Bollo +TABLE-OF-CONTENT-HERE Foreword diff --git a/doc/afm-user-daemon.html b/doc/afm-user-daemon.html index 29001bb..77af347 100644 --- a/doc/afm-user-daemon.html +++ b/doc/afm-user-daemon.html @@ -8,10 +8,55 @@

The afm-user-daemon

version: 1
-Date:    15 March 2016
+Date:    29 mai 2016
 Author:  José Bollo
 
+

+

Foreword

@@ -149,48 +194,48 @@ located at /usr/lib/systemd/user/afm-user-daemon.service.

-a
 --application directory
 
-     Includes the given application directory to
-     the database base of applications.
+ Includes the given application directory to
+ the database base of applications.
 
-     Can be repeated.
+ Can be repeated.
 
 -r
 --root directory
 
-     Includes the root application directory to
-     the database base of applications.
+ Includes the root application directory to
+ the database base of applications.
 
-     Note that the default root directory for
-     applications is always added. It is defined
-     to be /usr/share/afm/applications (may change).
+ Note that the default root directory for
+ applications is always added. It is defined
+ to be /usr/share/afm/applications (may change).
 
-     Can be repeated.
+ Can be repeated.
 
 -m
 --mode (local|remote)
 
-     Set the default launch mode.
-     The default value is 'local'
+ Set the default launch mode.
+ The default value is 'local'
 
 -d
 --daemon
 
-     Daemonizes the process. It is not needed by sytemd.
+ Daemonizes the process. It is not needed by sytemd.
 
 -q
 --quiet
 
-     Reduces the verbosity (can be repeated).
+ Reduces the verbosity (can be repeated).
 
 -v
 --verbose
 
-     Increases the verbosity (can be repeated).
+ Increases the verbosity (can be repeated).
 
 -h
 --help
 
-     Prints a short help.
+ Prints a short help.
 
@@ -257,11 +302,11 @@ to launch an application declared of types application/x-executable, application/x-executable text/x-shellscript - %r/%c +%r/%c text/html - /usr/bin/afb-daemon --mode=local --readyfd=%R --alias=/icons:%I --port=%P --rootdir=%r --token=%S --sessiondir=%D/.afb-daemon - /usr/bin/web-runtime http://localhost:%P/%c?token=%S +/usr/bin/afb-daemon --mode=local --readyfd=%R --alias=/icons:%I --port=%P --rootdir=%r --token=%S --sessiondir=%D/.afb-daemon +/usr/bin/web-runtime http://localhost:%P/%c?token=%S

This shows that:

@@ -443,9 +488,9 @@ returns a dbus error that is a string.

installed applications.

dbus-send --session --print-reply \
-    --dest=org.AGL.afm.user \
-    /org/AGL/afm/user \
-    org.AGL.afm.user.runnables string:true
+--dest=org.AGL.afm.user \
+/org/AGL/afm/user \
+org.AGL.afm.user.runnables string:true
 
diff --git a/doc/afm-user-daemon.md b/doc/afm-user-daemon.md index b7b6636..590b511 100644 --- a/doc/afm-user-daemon.md +++ b/doc/afm-user-daemon.md @@ -3,9 +3,10 @@ The afm-user-daemon =================== version: 1 - Date: 15 March 2016 + Date: 29 mai 2016 Author: José Bollo +TABLE-OF-CONTENT-HERE Foreword -------- diff --git a/doc/application-framework.html b/doc/application-framework.html index 3b62cb7..d2e19c5 100644 --- a/doc/application-framework.html +++ b/doc/application-framework.html @@ -8,10 +8,36 @@

Application framework

version: 1
-Date:    15 March 2016
+Date:    29 mai 2016
 Author:  José Bollo
 
+

+

Foreword

diff --git a/doc/application-framework.md b/doc/application-framework.md index ac6d40d..278df60 100644 --- a/doc/application-framework.md +++ b/doc/application-framework.md @@ -3,9 +3,11 @@ Application framework ===================== version: 1 - Date: 15 March 2016 + Date: 29 mai 2016 Author: José Bollo +TABLE-OF-CONTENT-HERE + Foreword -------- diff --git a/doc/doc.css b/doc/doc.css index 19699bf..27be9dc 100644 --- a/doc/doc.css +++ b/doc/doc.css @@ -1,9 +1,39 @@ body { - background: #fff url(triskel_iot_bzh.svg) no-repeat fixed right top; - font-family: "Verdana"; - color: #000; + background: #fff url(triskel_iot_bzh.svg) no-repeat fixed right top; + font-family: "Verdana"; + color: #000; } -h1, h2, h3 { color: #306; } +h1, h2, h3, h4 { + color: #306; + text-decoration: underline; +} + +pre { + border: medium dashed #306; + border-width: 0.1em; + background-color: #eee; + margin-left: 2em; + margin-right: 2em; + padding: 1em; + outline: #555; +} +pre:first-of-type { width: 20em; } +blockquote { + border-left: solid thick black; + background-color: #ff8; + font: bolder; + padding: 0.7em 1.5em; +} + +table { + margin-left: 2em; + background-color: #dff; + outline: 0.25em solid #a6f; +/* padding: 0.25em;*/ +} +thead {background-color: #a6f;} +tr:nth-child(even) {background-color: #aee;} +td { padding: 0.1em 0.5em; } diff --git a/doc/overview.html b/doc/overview.html index 0c67b63..999b247 100644 --- a/doc/overview.html +++ b/doc/overview.html @@ -8,10 +8,23 @@

AGL framework, overview of the proposal of IoT.bzh

version: 1
-Date:    15 March 2016
+Date:    29 mai 2016
 Author:  José Bollo
 
+

+

Foreword

@@ -71,14 +84,14 @@ The 3 layers are providing components for:

The figure below shows the history of these layers.

-
                  2014         2015
+
              2014         2015
 Tizen OBS ----------+--------------------------->
-                     \
-                      \
-     Tizen Yocto       +---------+-------------->
-                                  \
-                                   \
-       meta-intel-iot-security      +----------->
+                 \
+                  \
+ Tizen Yocto       +---------+-------------->
+                              \
+                               \
+   meta-intel-iot-security      +----------->
 

We took the decision to use these security layers that provides the diff --git a/doc/overview.md b/doc/overview.md index 22d8d81..6dc65bb 100644 --- a/doc/overview.md +++ b/doc/overview.md @@ -3,9 +3,11 @@ AGL framework, overview of the proposal of IoT.bzh ================================================== version: 1 - Date: 15 March 2016 + Date: 29 mai 2016 Author: José Bollo +TABLE-OF-CONTENT-HERE + Foreword -------- diff --git a/doc/security-framework.html b/doc/security-framework.html index 98598f0..38fb2f9 100644 --- a/doc/security-framework.html +++ b/doc/security-framework.html @@ -8,10 +8,16 @@

The security framework

version: 1
-Date:    15 March 2016
+Date:    29 mai 2016
 Author:  José Bollo
 
+

+

Setting Smack rules for the application

diff --git a/doc/security-framework.md b/doc/security-framework.md index 7407c17..ad20742 100644 --- a/doc/security-framework.md +++ b/doc/security-framework.md @@ -3,10 +3,12 @@ The security framework ====================== version: 1 - Date: 15 March 2016 + Date: 29 mai 2016 Author: José Bollo +TABLE-OF-CONTENT-HERE + Setting Smack rules for the application ======================================= diff --git a/doc/updt.sh b/doc/updt.sh index a6292c8..1c9d023 100755 --- a/doc/updt.sh +++ b/doc/updt.sh @@ -1,25 +1,47 @@ -#!/bin/sh +#!/bin/bash -fmd() { -cat << EOC - +# the HTML template +main=' -$(cat) +GENERATED-MARKDOWN-HERE - -EOC +' + +# substitute the pattern $1 by the content of the file $2 +subst() { + awk -v pat="$1" -v rep="$(sed 's:\\:\\\\:g' $2)" '{gsub(pat,rep);gsub(pat,"\\&");print}' +} + +# 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 } +# make the html file for $1 +mkhtml() { + local x=$1 + local h=${x%%.md}.html + expand -i $x | sed 's:^ : :' > $h.pre + markdown -f toc,autolink $h.pre > $h.toc.no + markdown -Tf toc,autolink $h.pre > $h.toc.yes + head --bytes=-$(stat -c %s $h.toc.no) $h.toc.yes > $h.toc + echo "$main" | + subst GENERATED-MARKDOWN-HERE $h.toc.no | + subst TABLE-OF-CONTENT-HERE $h.toc > $h + rm $h.* +} +# apply for x in *.md; do - t=$(stat -c %Y $x) - t=$(git log -n 1 --format=%ct $x) - d=$(LANG= date -d @$t +"%d %B %Y") - sed -i "s/^\( Date: *\).*/\1$d/" $x - markdown -f toc,autolink $x | fmd > ${x%%.md}.html + updadate $x + mkhtml $x done diff --git a/doc/widgets.html b/doc/widgets.html index 77bf236..e0f68f9 100644 --- a/doc/widgets.html +++ b/doc/widgets.html @@ -8,10 +8,31 @@

The widgets

version: 1
-Date:    15 March 2016
+Date:    29 mai 2016
 Author:  José Bollo
 
+

+

The widgets

diff --git a/doc/widgets.md b/doc/widgets.md index 6016a0d..1b2df87 100644 --- a/doc/widgets.md +++ b/doc/widgets.md @@ -3,9 +3,11 @@ The widgets =========== version: 1 - Date: 15 March 2016 + Date: 29 mai 2016 Author: José Bollo +TABLE-OF-CONTENT-HERE + The widgets -----------