BI Macros Question

eyeball

Getting comfortable
Joined
Jun 30, 2014
Messages
210
Reaction score
503
Hey Folks -

In customizing emails sent in alert conditions I noted the following:

In the email Subject, &TYPE is the alert type &CAM is the short camera name. These appear to only work in the Subject and not the body of the email.

In the body of the email, %s is the long camera name. I found other macros (or substitution variables, or whatever you refer to these as) in the time formatting documentation, such that I can format the email this way:

Date: <b>%A, %#d %B %Y</b><br>
Time: <b>%#I:%M:%S %p</b> <br>
FPS: <b>%f</b> <br><br>


ALERT: <b>Motion detected on %s</b> <br>



Does anyone know of a complete list of "%" and "&" macros that are supplied and interpreted at usage time by Blue Iris?

Thanks!
 

Mike

Staff member
Joined
Mar 9, 2014
Messages
2,981
Reaction score
2,725
Location
New York
Here's a list date and time formatting codes from the BI Help file.

%a Abbreviated weekday name
%A
Full weekday name
%b
Abbreviated month name
%B
Full month name
%c
Date and time representation appropriate for locale
%d
Day of month as decimal number (01 – 31)
%f
Frames/second (FPS) for camera
%H
Hour in 24-hour format (00 – 23)
%I
Hour in 12-hour format (01 – 12)
%j
Day of year as decimal number (001 – 366)
%k
Kilobytes/second (kB/s) for camera
%m
Month as decimal number (01 – 12)
%M
Minute as decimal number (00 – 59)
%p
Current locale's A.M./P.M. indicator for 12-hour clock
%S
Second as decimal number (00 – 59)
%U
Week of year as decimal number, with Sunday as first day of week (00 – 53)
%w
Weekday as decimal number (0 – 6; Sunday is 0)
%W
Week of year as decimal number, with Monday as first day of week (00 – 53)
%x
Date representation for current locale
%X
Time representation for current locale
%y
Year without century, as decimal number (00 – 99)
%Y
Year with century, as decimal number
%z, %Z
Time-zone name or abbreviation; no characters if time zone is unknown
%%
Percent sign
You may place a # character immediately following the % to eliminate leading zeros in many of the formatting codes. For example, %#H will show 9 at 9am instead of 09.


Time Zone Correction


For time zone correction in a text object overlay, add the special sequence {+n} to the beginning of the string, where n is a number 1-23, and the sign is either + or -. For example, a text overlay of {+3}%c will display the time 3 hours ahead of local time.
 

eyeball

Getting comfortable
Joined
Jun 30, 2014
Messages
210
Reaction score
503
Here's a list date and time formatting codes from the BI Help file.
Hey thanks for the response Mike - I found those in the doc before I posted and have made use of them, but I was wondering if there are <i>others</i> that are available (for example "%s" is not documented in that list, but it provides the long camera name).
 

Mike

Staff member
Joined
Mar 9, 2014
Messages
2,981
Reaction score
2,725
Location
New York
Hey thanks for the response Mike - I found those in the doc before I posted and have made use of them, but I was wondering if there are <i>others</i> that are available (for example "%s" is not documented in that list, but it provides the long camera name).
Got ya, hopefully someone else will post them if they know them :)
 
Top