# Tokens ## Tokens Tokens can be used in thumbnail captions, email subjects, email body text, SMS/MMS messages, folder paths and filenames. They are replaced with their corresponding values when used. --- ### Date and Time Tokens | Token | Description | Example | | --- | --- | --- | | `%a` | Abbreviated weekday | Fri | | `%A` | Full weekday | Friday | | `%b` | Abbreviated month | Jun | | `%B` | Full month | June | | `%d` | Date as YYMMDD | 150617 | | `%D` | Day of month (01-31) | 21 | | `%H` | Hour (00-23) | 14 | | `%I` | Hour (01-12) | 2 | | `%j` | Day of year (001-366) | 168 | | `%l` | Long date/time for locale | Monday, January 17, 2015 19:03:47 | | `%L` | Long date for locale | Monday, January 17, 2015 | | `%m` | Month (01-12) | 06 | | `%M` | Minutes (00-59) | 23 | | `%p` | AM/PM indicator | PM | | `%S` | Seconds (00-59) | 45 | | `%t` | Time as HHMMSS | 140512 | | `%W` | Week number (00-53) | 24 | | `%x` | Date for locale | 06_17_15 | | `%X` | Time for locale | 14_39_29 | | `%y` | Year without century | 15 | | `%Y` | Year with century | 2015 | | `%z` | Time zone name | GMT Standard Time | | `%Z` | Time zone offset from UTC | +0100 | | `{yearNow}` | Current year (YYYY) | 2015 | | `{monthNow}` | Current month (01-12) | 03 | | `{dayNow}` | Current day (01-31) | 05 | | `{yearLess8h}` | Year 8 hours ago (for late-night events) | 2015 | | `{monthLess8h}` | Month 8 hours ago | 12 | | `{dayLess8h}` | Day 8 hours ago | 31 | --- ### File and Image Tokens | Token | Description | Example | | --- | --- | --- | | `{filename}` | Filename without extension or folder | `image1` for `D:\Photos\image1.jpg` | | `{filename1}`, `{filename2}`... | Extracts filename part delimited by space, - or _ | `{filename2}` gives `two` for `one_two_three.jpg` | | `{fullFilename}` | Filename with extension, no folder | `image1.jpg` | | `{fileExt}` | File extension | `jpg` | | `{uid}` | Extracts UID in form ABC12345 or ABCDE123 from filename | `HDTUW345` from `20190621_HDTUW345.jpg` | | `{subfolder}` | Name of the image's parent folder | `20160718` from `C:\Photos\20160718\IMG_0001.JPG` | --- ### Event Tokens | Token | Description | | --- | --- | | `{eventName}` | Event name from [[kiosk-event-info\|Event Info]] | | `{eventString1}` to `{eventString5}` | Event strings from [[kiosk-event-info\|Event Info]] | --- ### URL and Encoding Tokens | Token | Description | Example | | --- | --- | --- | | `{urlencode,str}` | URL-encodes a string for use in URLs | `{urlencode,my name}` to `my%20name` | | `{hulaencode,str}` | Lowercase with non-alphanumeric chars replaced by - | `John and Sue Wedding` to `john-and-sue-wedding` | --- ### String Manipulation Tokens | Token | Description | Example | | --- | --- | --- | | `{left,n,str}` | First n characters of str | `{left,4,{filename}}` to `imag` | | `{mid,n,m,str}` | m characters starting from position n | `{mid,1,3,{filename}}` to `mag` | | `{right,n,str}` | Last n characters of str | `{right,2,{filename}}` to `e1` | | `{field,n,str}` | nth field from str (delimited by space, period, comma, hyphen or underscore) | `{field,2,{filename}}` for `one_two_three` to `two` | | `{field2,n,ch,str}` | nth field using character ch as separator | `{field2,2,-,one-two-three}` to `two` | | `{first,str}` | First word of str | `{first,%L}` to `Monday` | | `{last,str}` | Last word of str | `{last,%L}` to `2015` | | `{upper,str}` | Converts to upper case | `{upper,%B}` to `JUNE` | | `{lower,str}` | Converts to lower case | `{lower,%B}` to `june` | | `{capitalize,str}` | Lower case with first letter capitalised | `{capitalize,john}` to `John` | | `{default,str1,str2}` | Returns str1 unless empty, then str2 | `{default,,fallback}` to `fallback` | | `{if,test,str1,str2}` | Returns str1 if test is not empty, else str2 | `{if,,2,3}` to `3` | | `{compare,str1,str2}` | Returns `1` if str1 = str2, else empty | `{compare,photo,photo}` to `1` | | `{contains,str1,str2}` | Returns `1` if str1 contains str2, else empty | `{contains,photo,to}` to `1` | --- ### QR Code Tokens These are populated by the [Webcam QR Code Scanner](https://www.breezesoftware.com/help/kiosk/qr-codes-and-contactless-sharing) when a QR code is scanned: - `{qr1}` through `{qr10}` -- correspond to URL parameters `s1` through `s10` --- Source: https://www.breezesoftware.com/help/kiosk/kiosk-tokens