Bladeren bron

Document logging interface

Bob Mottram 7 jaren geleden
bovenliggende
commit
b42080788a
2 gewijzigde bestanden met toevoegingen van 45 en 24 verwijderingen
  1. 10
    0
      doc/EN/devguide.org
  2. 35
    24
      website/EN/devguide.html

+ 10
- 0
doc/EN/devguide.org Bestand weergeven

@@ -89,6 +89,16 @@ myappname_variables=(ONION_ONLY
89 89
                      MYAPPNAME_ONION_PORT
90 90
                      MYAPPNAME_DB_PASSWORD)
91 91
 
92
+function logging_on_xmpp {
93
+    echo -n ''
94
+    # Commands to turn on logging go here
95
+}
96
+
97
+function logging_off_xmpp {
98
+    echo -n ''
99
+    # Commands to turn off logging go here
100
+}
101
+
92 102
 function change_password_myappname {
93 103
     PASSWORD_USERNAME="$1"
94 104
     PASSWORD_NEW="$2"

+ 35
- 24
website/EN/devguide.html Bestand weergeven

@@ -3,7 +3,7 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2016-11-23 Wed 23:19 -->
6
+<!-- 2017-07-01 Sat 20:23 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 9
 <title></title>
@@ -71,6 +71,7 @@
71 71
   pre.src-fortran:before { content: 'Fortran'; }
72 72
   pre.src-gnuplot:before { content: 'gnuplot'; }
73 73
   pre.src-haskell:before { content: 'Haskell'; }
74
+  pre.src-hledger:before { content: 'hledger'; }
74 75
   pre.src-java:before { content: 'Java'; }
75 76
   pre.src-js:before { content: 'Javascript'; }
76 77
   pre.src-latex:before { content: 'LaTeX'; }
@@ -188,7 +189,7 @@
188 189
 @licstart  The following is the entire license notice for the
189 190
 JavaScript code in this tag.
190 191
 
191
-Copyright (C) 2012-2013 Free Software Foundation, Inc.
192
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
192 193
 
193 194
 The JavaScript code in this tag is free software: you can
194 195
 redistribute it and/or modify it under the terms of the GNU
@@ -245,17 +246,17 @@ for the JavaScript code in this tag.
245 246
 
246 247
 <center><h1>Developers Guide</h1></center>
247 248
 
248
-<div id="outline-container-org1fc2c1f" class="outline-2">
249
-<h2 id="org1fc2c1f">Introduction</h2>
250
-<div class="outline-text-2" id="text-org1fc2c1f">
249
+<div id="outline-container-orge96e638" class="outline-2">
250
+<h2 id="orge96e638">Introduction</h2>
251
+<div class="outline-text-2" id="text-orge96e638">
251 252
 <p>
252 253
 Freedombone consists of a set of bash scripts. There are a lot of them, but they're not very complicated. If you're familiar with the GNU/Linux commandline and can hack a bash script then you can probably add a new app or fix a bug in the system. There are no trendy development frameworks to learn or to get in your way.
253 254
 </p>
254 255
 </div>
255 256
 </div>
256
-<div id="outline-container-org3f49a43" class="outline-2">
257
-<h2 id="org3f49a43">Community Statement</h2>
258
-<div class="outline-text-2" id="text-org3f49a43">
257
+<div id="outline-container-orgc332597" class="outline-2">
258
+<h2 id="orgc332597">Community Statement</h2>
259
+<div class="outline-text-2" id="text-orgc332597">
259 260
 <p>
260 261
 This project doesn't require you to take any special pledge of allegiance or subscribe to any guru's list of commandments. It does not care about your gender, race, national flag or political alignment. It is agnostic towards your religion or lack thereof. It doesn't give one hoot as to whether you are young or old, rich or poor, gay, trans, straight or just "other". It does not care if you like your eggs sunny side up or if you are a vegan.
261 262
 </p>
@@ -273,9 +274,9 @@ This project also has a no bullshit policy. Anyone trying to cause a ruckus by t
273 274
 </p>
274 275
 </div>
275 276
 </div>
276
-<div id="outline-container-orgd57ea28" class="outline-2">
277
-<h2 id="orgd57ea28">Adding extra apps</h2>
278
-<div class="outline-text-2" id="text-orgd57ea28">
277
+<div id="outline-container-org97b40ca" class="outline-2">
278
+<h2 id="org97b40ca">Adding extra apps</h2>
279
+<div class="outline-text-2" id="text-org97b40ca">
279 280
 <p>
280 281
 Suppose you have some internet application which you want to add to the system. To do this you need to create an app script which tells the system how to install/remove and also backup/restore. The script should be designed to work with the current stable version of Debian.
281 282
 </p>
@@ -285,8 +286,8 @@ On an installed system the app scripts go into the directory:
285 286
 </p>
286 287
 
287 288
 <div class="org-src-container">
288
-<pre class="src src-bash">/usr/share/freedombone/apps
289
-</pre>
289
+<pre><code class="src src-bash">/usr/share/freedombone/apps
290
+</code></pre>
290 291
 </div>
291 292
 
292 293
 <p>
@@ -294,8 +295,8 @@ and within the project repo they appear within the <i>src</i> directory. Your ne
294 295
 </p>
295 296
 
296 297
 <div class="org-src-container">
297
-<pre class="src src-bash">freedombone-app-[myappname]
298
-</pre>
298
+<pre><code class="src src-bash">freedombone-app-[myappname]
299
+</code></pre>
299 300
 </div>
300 301
 
301 302
 <p>
@@ -307,7 +308,7 @@ An example template for an app script is shown below. Copy this and add whatever
307 308
 </p>
308 309
 
309 310
 <div class="org-src-container">
310
-<pre class="src src-bash"><span class="org-comment-delimiter">#</span><span class="org-comment">!/bin/</span><span class="org-keyword">bash</span>
311
+<pre><code class="src src-bash"><span class="org-comment-delimiter">#</span><span class="org-comment">!/bin/</span><span class="org-keyword">bash</span>
311 312
 <span class="org-comment-delimiter"># </span><span class="org-comment">Copyright (C) Year YourName &lt;YourEmail&gt;</span>
312 313
 <span class="org-comment-delimiter">#</span>
313 314
 <span class="org-comment-delimiter"># </span><span class="org-comment">This program is free software: you can redistribute it</span>
@@ -352,6 +353,16 @@ An example template for an app script is shown below. Copy this and add whatever
352 353
                      MYAPPNAME_ONION_PORT
353 354
                      MYAPPNAME_DB_PASSWORD)
354 355
 
356
+<span class="org-keyword">function</span> <span class="org-function-name">logging_on_xmpp</span> {
357
+    <span class="org-builtin">echo</span> -n <span class="org-string">''</span>
358
+    <span class="org-comment-delimiter"># </span><span class="org-comment">Commands to turn on logging go here</span>
359
+}
360
+
361
+<span class="org-keyword">function</span> <span class="org-function-name">logging_off_xmpp</span> {
362
+    <span class="org-builtin">echo</span> -n <span class="org-string">''</span>
363
+    <span class="org-comment-delimiter"># </span><span class="org-comment">Commands to turn off logging go here</span>
364
+}
365
+
355 366
 <span class="org-keyword">function</span> <span class="org-function-name">change_password_myappname</span> {
356 367
     <span class="org-variable-name">PASSWORD_USERNAME</span>=<span class="org-string">"$1"</span>
357 368
     <span class="org-variable-name">PASSWORD_NEW</span>=<span class="org-string">"$2"</span>
@@ -508,7 +519,7 @@ An example template for an app script is shown below. Copy this and add whatever
508 519
 }
509 520
 
510 521
 <span class="org-comment-delimiter"># </span><span class="org-comment">NOTE: deliberately no exit 0</span>
511
-</pre>
522
+</code></pre>
512 523
 </div>
513 524
 
514 525
 <p>
@@ -516,8 +527,8 @@ To test your app log into your system, select <b>Exit to command line</b> then g
516 527
 </p>
517 528
 
518 529
 <div class="org-src-container">
519
-<pre class="src src-bash">sudo su
520
-</pre>
530
+<pre><code class="src src-bash">sudo su
531
+</code></pre>
521 532
 </div>
522 533
 
523 534
 <p>
@@ -529,8 +540,8 @@ And run the admin control panel:
529 540
 </p>
530 541
 
531 542
 <div class="org-src-container">
532
-<pre class="src src-bash">control
533
-</pre>
543
+<pre><code class="src src-bash">control
544
+</code></pre>
534 545
 </div>
535 546
 
536 547
 <p>
@@ -543,9 +554,9 @@ Submit your working app to <b><a href="https://github.com/bashrc/freedombone/iss
543 554
 </div>
544 555
 </div>
545 556
 
546
-<div id="outline-container-orgf5d4a43" class="outline-2">
547
-<h2 id="orgf5d4a43">Customising mesh images</h2>
548
-<div class="outline-text-2" id="text-orgf5d4a43">
557
+<div id="outline-container-org285c2d1" class="outline-2">
558
+<h2 id="org285c2d1">Customising mesh images</h2>
559
+<div class="outline-text-2" id="text-org285c2d1">
549 560
 <p>
550 561
 If you want to make your own specially branded version of the mesh images, such as for a particular event, then to change the default desktop backgrounds edit the images within <b>img/backgrounds</b> and to change the available avatars and desktop icons edit the images within <b>img/avatars</b>. Re-create disk images using the instructions shown previously.
551 562
 </p>