| Line | |
|---|
| 1 | Datafile format
|
|---|
| 2 | |
|
|---|
| 3 | A datafile is a file which is automatically loaded every few seconds
|
|---|
| 4 | and the values displayed on a page are updated. If the page name
|
|---|
| 5 | is <I>mypage.page</I> the name of the corresponding data file is
|
|---|
| 6 | <I>mypage.data</I>.
|
|---|
| 7 |
|
|---|
| 8 | The first line of the data file always contains a thirteen-digit number
|
|---|
| 9 | which is the time (in UTC) corresponding to the contained data
|
|---|
| 10 | as Unix time (milli-seconds since 1/1/1970). Seprated with tabs, it can
|
|---|
| 11 | contain to additional numbers. The first one defines if the warning
|
|---|
| 12 | sign is displayed (>=1 means that it is displayed) and the
|
|---|
| 13 | second defines whether the script stop sign is displayed in green or red.
|
|---|
| 14 | For data-files which are not guranteed to be updated in reasonable
|
|---|
| 15 | intervals, it is advisable to not write the two numbers at all.
|
|---|
| 16 |
|
|---|
| 17 | Each following line contains columns seperated by tabs. The first column
|
|---|
| 18 | contains the background color of the row. It can be given in any
|
|---|
| 19 | representation accepted by HTML, usually #rrggbb. The following columns
|
|---|
| 20 | contain values or text which will replace the $N in the format given
|
|---|
| 21 | in the page file, <i>e.g.</i>
|
|---|
| 22 |
|
|---|
| 23 | If the second line of the data file contains
|
|---|
| 24 |
|
|---|
| 25 | <pre>
|
|---|
| 26 | blue\t0\t42.0
|
|---|
| 27 | </pre>
|
|---|
| 28 |
|
|---|
| 29 | while \t here representas the ascii character 9 ('\t' in C and C++), and the format
|
|---|
| 30 | in the page files looks like
|
|---|
| 31 |
|
|---|
| 32 | <pre>
|
|---|
| 33 | $1 shoes and $0 socks
|
|---|
| 34 | </pre>
|
|---|
| 35 |
|
|---|
| 36 | the row displayed will be
|
|---|
| 37 |
|
|---|
| 38 | <pre>
|
|---|
| 39 | 42.0 shoes and 0 socks
|
|---|
| 40 | </pre>
|
|---|
| 41 |
|
|---|
| 42 | with a blue background.
|
|---|
| 43 | |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.