-
Notifications
You must be signed in to change notification settings - Fork 7
Value syntax
tjjfvi edited this page Jan 30, 2019
·
2 revisions
To use a property of the payload, prefix the name with a dot (.
).
Otherwise, to send a plain string, prefix it with nothing or a colon (:
).
To send a file, use @f{relative path to gcode}
or @-{absolute path}
were the path is in value syntax.
To format a value, use $F...
where F
is:
-
t
: format it as time. Follow it withF{value}
, where F is one of the subformats listed under Interpretation algorithm
To include a value in your Applet, either type {{ValueN}}
or click the Add Ingredient button.
-
.name
: the propertyname
of the event payload -
:lalala
: the textlalala
-
word
: the textword
-
@f.path
: (for the PrintDone event) a link to the contents of the gcode. -
@-.movie
: (for the MovieDone event) a link to the rendered timelapse -
@-:/home/pi/test.txt
: a link to the contents of/home/pi/test.txt
-
@-/home/pi/test2.txt
: a link to the contents of/home/pi/test2.txt
-
$t:.time
: show time print took inH:MM
format, -
$tm.time
: show time print took inHh Mm
format.
- If the value begins with a dot (
.
), it will use that prop of the event payload (e.g..name
forPrintDone
) - If it begins with an at symbol (
@
):-
path
will be the result of interpreting the string with the first two characters removed as a value - If the second character in the value is an
f
it will prepend topath
the base uploads folder - Otherwise, the second character should be a dash (
-
) - It will then upload the file at
path
to file.io and return a link to that file.
-
- If it begins with a colon (
:
), it will use the string after the colon - If it begins with a dollar sign (
$
), it will:- If the second character is a
t
:- Let
time
be the result of interpreting the string with the first three characters removed as a value. - If the third character is
:
, it will formattime
inH:MM
format (e.g.1:02
). - If the third character is
$
, it will formattime
inH:MM:SS
format (e.g.1:02:34
) - If the third character is
h
, it will formattime
in Hhformat (e.g.
1h`) - If the third character is
m
, it will formattime
inHh Mm
format (e.g.1h 2m
) - If the third character is
s
, it will formattime
inHh Mm Ss
format (e.g.1h 2m 34s
)
- Let
- If the second character is a
- Otherwise, it will just send the plain text