From b65403243a8524f0ae2367e05bd941a6baa01da4 Mon Sep 17 00:00:00 2001 From: Brad Arant Date: Tue, 19 Nov 2024 16:44:15 -0800 Subject: [PATCH] updated some documentation. --- JetCore.txt | 106 +++++++++++++++++++++++++++++++++++++++++++--- compile | 2 - tests/testjet.jet | 2 +- 3 files changed, 102 insertions(+), 8 deletions(-) diff --git a/JetCore.txt b/JetCore.txt index bc62a90..c9da8cd 100644 --- a/JetCore.txt +++ b/JetCore.txt @@ -111,15 +111,22 @@ operators, as follows: \section{Function Reference} -\subsection{left(string, number-of-characters)} +\subsection{concat} -\subsection{random()} +\subsection{integer} + +\subsection{left} + +\subsection{random} Use the random function to return a random number between 0 and 1. -\subsection{substring(string, start-position, number-of-characters} +\subsection{round} +Use the round function to round a numeric value to the specified +number of digits after the decimal point. +\subsection{substring} Use the substring operation to extract a portion of a string and return the value as a string. @@ -170,6 +177,8 @@ name input +error + \begin{verbatim} \end{verbatim} @@ -182,26 +191,72 @@ a variable named 'listing'. Use the comment tag to create a section in the jet script that can be used for making comments and is ignored by the jet reader. +The comments tag has no attributes. + \section{for} Use the for tag to iterate a tag container for a logical number of times. +The attributes are: + +start + +end + +step + +name + \section{header} Use the header tag to output a header prior to outputting the process buffer to the requester. +The attributes are: + +name + +expr + +value + +container + \section{if/else} Use the if tag to perform a conditional output on the tag container. An optional else container provides alternate output in the event the condition is not met. +The attributes are: + +value1 + +value2 + +type + +expr + \section{ifrow/else} Use the ifrow tag to output the tag container if a row exists in the -mysql tag. +mysql tag. An optional else container provides alternate output in the +event that there is no row for the sql result. + +The attributes are: + +sessionid + +\section{include} + +Use the include tag to include another content file at the location of +the include tag. + +The attributes are: + +file \section{jet} @@ -213,19 +268,50 @@ to control the output options. Use the mysql tag to specify parameters for connecting to a mysql server. The container of the tag is where you can specify the sql statement and method of processing the result output of the executed -sql statement. +sql statement. The mysql session created is valid only withon the +container of this tag. + +The attributes are: + +host + +database + +user + +password + +sessionid \section{read} Use the read tag to read the contents of a file contained on the local file system into a variable for further output or processing. +The attributes are: + +file + +name + \section{set} Use the set tag to store initialize a variable to a value contained in a value attribute, the result of an expression (expr) attribute or the contents of the set tag container. +The attributes are: + +name + +expr + +value + +container + +scope + \section{sql} Use the sql tag to specify an sql statement to run on the sql server @@ -235,6 +321,12 @@ As long as sql statements are executed within the same mysql containing tag then the same mysql session is used for each sql statement. +The attributes are: + +sessionid + +container + \section{stream} Use stream tag to output data from the server without waiting for the @@ -242,6 +334,10 @@ standard output buffering and processing of the JET script. This is useful for outputting images and streams for audio and video without the server having to load the whole thing into RAM first. +The attributes are: + +file + \section{system} Use the system tag to execute a bash shell command within the JET diff --git a/compile b/compile index 197152f..2df9a61 100755 --- a/compile +++ b/compile @@ -29,5 +29,3 @@ fi rm *.o rm *~ - - diff --git a/tests/testjet.jet b/tests/testjet.jet index 27e7a6d..b326d0e 100755 --- a/tests/testjet.jet +++ b/tests/testjet.jet @@ -1,4 +1,4 @@ -#!../jet-2.0 +#!/home/barant/Development/JetCore/jet-2.0
This is a comment and should not show up in the output.