The Paralog Template Language (PTL) is a simple syntax providing two parts: references, a formalism for accessing values from your jump log; and directives, a set of statements used for control and action. PTL has been intentionally kept simple and small.
References in the template access data. They freely mix with the template's non-PTL content. Formally defined, a reference is one of the allowed keywords embedded in '@@' characters together with any parameters. If an invalid keyword is encountered, an error message is renedered into the output file.
Here is a short template containing a simple reference mixed with non-PTL content:
This is @@USER@@'s log book.
Here, the reference is @@USER@@.
Paralog replaces @@USER@@ in the template
with the name of the registered user.
Assuming the registered user is 'John Doe', this example will be parsed
to:
This is John Doe's log book.
Directives are PTL's other major part. Like references, they freely mix with other non-PTL content in templates and have to be embedded in '@@'.
Directives are similar to references as they get usually replaced with a value which is the result of that directive, but they are different in as they also perform additional actions, e.g. include and parse another template file or loop through the log book.
Here is a short template containing a simple directive mixed with non-PTL content:
@@FOREACHJUMP FROM:1022 TO:1025 REVERSE@@
Jump @@JUMP NUMBER@@
@@/FOREACHJUMP@@
This example will be parsed to:
Jump 1022
Jump 1023
Jump 1024
Jump 1025
All keywords have to be enclosed in double ampersands (@@) together with their parameters, e.g. @@TIMESTAMP CHECK@@. Keywords enclosed in square brackets ([]) are optional, e.g. TIMESTAMP [CHECK]. When several keywords are seperated by a vertical bar (|), one must be chosen, e.g. DELIMITER CSV|MOVIEOFFSET. Keywords enclosed in angled brackets (<>) have to be replaced by their proper value, e.g. INCLUDE <value>.
The explanation states the value the keyword is replaced with. If the keyword is a directive, it's action will be given after 'Action:'.
These keywords are used in a general context, e.g. to retrieve the user, log timestamp, units used, etc. from the logbook and to control overall actions, e.g. include and copy files.
| Keyword | Will be replaced with... |
|---|---|
| USER | ... the name of the registered user. |
| CREATIONDATE | ... the date when the file was generated. |
| CREATIONTIME | ... the time when this file was generated. |
| UNITS HEIGHT|DISTANCE|SPEED|WINDSPEED|TIME|ANGLE | ... the localised units used for heighs/distances/speeds/wind speeds/time and angles. The units reflects Paralog's settings (Imperial/Metric units, Display speed in seconds) |
| DELIMITER CSV|MOVIEOFFSET | ... the delimiter used between values of CSV files/a movie's name and it's zero offset. |
| INCLUDE [SUPPRESS] <file> | ... with the name of file,
unless the optional parameter SUPRESS is used and the generation the file
is supressed because of TIMESTAMP
CHECK, JUMP
TIMESTAMP CHECK, or [GPS]PROFILE
CHECK. Action: file will be parsed. |
| COPY <file> | ... with the name of file.
Action: file will be copied to the output directory. |
| TIMESTAMP [CHECK] | ... the last modification
date/time of the jump log. Action: When the optional parameter CHECK is used, parsing of the file which contains this command is aborted when the jump log and the template are older than the target file, i.e. the existing file will not be regenerated/overwritten. |
These keywords are used in the context of logbook totals, e.g. to retrieve totals and other statistical information, etc. from the logbook and to create charts from the logbook.
| Keyword | Will be replaced with... |
|---|---|
| TOTALS LASTJUMPDATE | ... the date of the last jump. |
| TOTALS TOTALJUMPS | ... the number of jumps. |
| TOTALS TOTALDELAY | ... the total freefall time. |
| TOTALS TOTALFREEFALLDISTANCE | ... the total freefall distance. The output reflects Paralog's settings (Imperial/Metric units, Display speed in seconds). |
| TOTALS TOTALCANOPYDISTANCE | ... the total distance under canopy. The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| TOTALS TOTALJUMPSLASTYEAR | ... the number of jumps in the last year. |
| TOTALS TOTALJUMPSLASTMONTH | ... the number of jumps in the last month. |
| TOTALS TOTALMALFUNCTIONS | ... the number of malfunctions. |
| TOTALS TOTALRESERVES | ... the number of reserve deployments. |
| TOTALS TOTALVIDEOJUMPS | ... the number of video jumps. |
| TOTALS TOTALNIGHTJUMPS | ... the number of night jumps. |
| TOTALS TOTALTEAMJUMPS | ... the number of team jumps. |
| TOTALS TOTALAIRCRAFT | ... the number of differents aircraft. |
| TOTALS HIGHESTEXIT | ... the highest exit altitude. The output reflects Paralog's settings (Imperial/Metric units). |
| TOTALS HIGHESTFREEFALL | ... the highest freefall distance. The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| TOTALS HIGHESTDELAY | ... the highest freefall delay. |
| TOTALS HIGHESTPOINTS | ... the highest points. |
| TOTALS HIGHESTGROUPSIZE | ... the largest group size. |
| TOTALS LOWESTOPEN | ... the lowest opening altitude. The output reflects Paralog's settings (Imperial/Metric units). |
| TOTALS LOWESTFREEFALL | ... the lowest freefall distance. The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| TOTALS LOWESTDELAY | ... the lowest freefall delay. |
| TOTALS AVERAGEFREEFALL | ... the average freefall distance. The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| TOTALS AVERAGEDELAY | ... the average freefall delay. |
| TOTALS RATIOMALFUNCTIONJUMPS | ... the ratio of malfunctions to jumps. |
| TOTALS RATIORESERVEJUMPS | ... the ratio of reserve deployments to jumps. |
| TOTALS CHART [TYPE:"PIE"] [VALUES:"<values>"] [CATEGORIES:"<categories>"] [CREATE] [WIDTH:<width>] [HEIGHT:<height>] [DEFAULT:<value>] | ... the name of the chart file
(Paralog[Bar|Pie]Chart_<values>_<categories>.png).
Action: When the optional parameter CREATE is given, the graphics file Paralog[Bar|Pie]Chart_<values>_<categories>.png is generated. Optional parameters specify whether a bar or pie chart is to be generated and which values (for bar charts only) and categories are to be used for the chart. If these parameters are not specified, a bar chart of jumps per year is generated. Other optional parameters can specify width and heigth of the generated image and a file name to be used when no chart can be generated. Allowed values for <categories> and <values> are: "Aircraft", "Date [Month]", "Date [Year]", "Delay", "Exit", "Equipment", "Fall Rate", "Jump Type", "Landing", "Malfunction", "Night", "Open", "Place", "Points", "Reserve", "Size", "Signed", "Team", "Video", "Wind"; "Jumps" is allowed for values only. |
These keywords are used in the context of a jump, e.g. to retrieve jump data from the logbook and to create jump profile charts and images.
| Keyword | Will be replaced with... |
|---|---|
| JUMP TIMESTAMP [CHECK] | ... the last modification
date/time of the jump. Action:When the optional parameter CHECK is used, creation of the file which contains this command is aborted when the jump and the template are older than the target file. |
| FOREACHJUMP [FROM:<value>]
[TO:<value>] [REVERSE] <data> /FOREACHJUMP |
... the parsed result of <data>
for every jump in the log. Action:<data> is repeatedly evaluated in the context of every jump of the logbook. The optional parameters FROM: and TO: can define a specific range of jumps from the log, the optional parameter REVERSE steps through the log in reverse order. |
| JUMP NUMBER | ... with the jump number. |
| JUMP DATE | ... with the jump date. |
| JUMP TIME | ... with the jump time. |
| JUMP EXIT | ... with the exit height. The output reflects Paralog's settings (Imperial/Metric units). |
| JUMP OPEN | ... with the deployment height. The output reflects Paralog's settings (Imperial/Metric units). |
| JUMP FREEFALL | ... with the freefall distance. The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| JUMP DELAY | ... with the freefall time. |
| JUMP TOTALDELAY | ... the accumulated freefall time. |
| JUMP PLACE | ... with the DZ name. |
| JUMP AIRCRAFT | ... with the aircraft name. |
| JUMP TYPE | ... with the type of the jump. |
| JUMP FALLRATE | ... with the fallrate type. |
| JUMP LANDING | ... with the landing description. |
| JUMP WIND | ... with the wind speed. The output reflects Paralog's settings (Imperial/Metric units). |
| JUMP POINTS | ... with the no. of points. |
| JUMP GROUPSIZE | ... with the group size. |
| JUMP TEAMNAME | ... with the teamname. |
| JUMP VIDEOJUMP [? "<value>" [: "<value>"]] | ... with whether this jump was a video jump or not. Optional parameters can specify the 'true' and 'false' values, default is 'X' and empty. |
| JUMP NIGHTJUMP [? "<value>" [: "<value>"]] | ... with whether this jump was a night jump or not. Optional parameters can specify the 'true' and 'false' values, default is 'X' and empty. |
| JUMP HIGHESTSPEED | ... with the maximum speed. The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| JUMP AVERAGESPEED | ... with the average speed. The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| JUMP EQUIPMENT | ... with the equipment description. |
| JUMP MALFUNCTION | ... with the malfunction description. |
| JUMP RESERVE [? "<value>" [: "<value>"]] | ... with whether the reserve was deployed on this jump or not. Optional parameters can specify the 'true' and 'false' values, default is 'X' and empty. |
| JUMP NOTE | ... with the note field. |
| JUMP SIGNED | ... with the name and license no. of the signer, if any. |
| JUMP PROFILE [CREATE] [WIDTH:<width>] [HEIGHT:"<height>] [DEFAULT:"<value>] | ... the name of the the profile
file for this jump (ParalogJumpProfile_<jump_number>.png).
Action: When the optional parameter CREATE is given, the graphics file ParalogJumpProfile_<jump_number>.png is generated. Optional parameters can specify width and heigth of the generated image and a file name to be used when no profile is present. |
| JUMP IMAGE [THUMBNAIL [WIDTH:<width>] [HEIGHT:"<height>]] | [COPY] [DEFAULT:"<value>] | ... the name of the the image file
for this jump (ParalogThumbnail_<jump_number>.jpg).
Action: When the optional parameter THUMBNAIL is given, a thumbnail file ParalogThumbnail_<jump_number>thumbnail.jpg is generated. Optional parameters can specify width and heigth of the thumbnail and a file name to be used when no profile is present. When the optional parameter COPY is given, the image attached to the jump is copied to the file ParalogThumbnail_<jump_number>.jpg in the output directory. |
| JUMP MOVIE |COPY] [FULLPATH] [OFFSET] | ... the name of the the movie file attached to this jump. When the optional parameter COPY is given, the movie file is copied to the output directory. When the optional parameter FULLPATH is given, the full path of the movie is returned instead of the filename. When the optional parameter OFFSET is given, the zero offset of the movie is returned instead of the filename. |
These keywords are used in the context of a jump profile, e.g. to retrieve jump profile data from the logbook.
| Profile | |
| Keyword | Will be replaced with... |
|---|---|
| [GPS]PROFILE CHECK [SUPRESS] | ... the last modification
date/time of the jump, unless the optional parameter SUPRESS is used Action: Creation of the file which contains this command is canceled when the jump and the template are older than the target file or the jump or the jump has no [GPS]profile attached. |
| FOREACHPROFILEPOINT <data> /FOREACHPROFILEPOINT |
... the parsed result of <data>
for each data point of the current jump. Action:<data> is repeatedly evaluated in the context of every data point of the jump profile. |
| PROFILEPOINT TIME [OFFSET:<value>] | ... the time value of the current profile data point. The optional parameter OFFSET: adds <value> to the result. |
| PROFILEPOINT STARTTIME [OFFSET:<value>] | ... the start time value of the current profile data point. The optional parameter OFFSET: adds <value> to the result. |
| PROFILEPOINT ENDTIME [OFFSET:<value>] | ... the end time value of the current profile data point, usually equal to the start time value of the next profile data point. The optional parameter OFFSET: adds <value> to the result. |
| PROFILEPOINT HEIGHT | ... the height value (AGL) of the current profile data point. The output reflects Paralog's settings (Imperial/Metric units). |
| PROFILEPOINT TAS | ... the TAS value of the current profile data point. The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| PROFILEPOINT SLAS | ... the SLAS value of the current profile data point. The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| PROFILEPOINT LATITUDE | ... the latitude of the current profile data point (GPS profile only). |
| PROFILEPOINT LONGITUDE | ... the longitude of the current profile data point (GPS profile only). |
| PROFILEPOINT ELEVATION | ... the elevation (MSL) of the current profile data point (GPS profile only). The output reflects Paralog's settings (Imperial/Metric units). |
| PROFILEPOINT DISTANCE | ... the distance over ground of the current profile data point (GPS profile only). The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| PROFILEPOINT PITCH | ... the pitch of the current profile data point (GPS profile only). |
| PROFILEPOINT GLIDERATIO | ... the glide ratio of the current profile data point (GPS profile only). |
| PROFILEPOINT COURSE|TRACK | ... the course/track of the current profile data point (GPS profile only). |
| PROFILEPOINT TURNRATE | ... the turn rate of the current profile data point (GPS profile only). |
| PROFILEPOINT GROUNDSPEED | ... the ground speed of the current profile data point (GPS profile only). The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |
| PROFILEPOINT SPEED | ... the 3D speed of the current profile data point (GPS profile only). The output reflects Paralog's settings (Imperial/Metric units, Display speed as). |