Reference

TC - text converter

TC: text converter (cut text, make it lowercase, uppercase, capitalized, use regular expressions…)

Syntax

tc(mode, text)

Arguments

  • mode: Conversion mode, l for lowercase, u for uppercase, c for capitalize
  • text: Text to convert

Examples

FormulaDescription
$tc(low, "sOme tExT")$Convert text to lower case
$tc(up, "sOme tExT")$Convert text to upper case
$tc(cap, "sOme tExT")$Capitalize words in text
$tc(cut, "sOme tExT", 4)$Will print only first 4 chars
$tc(ell, "sOme tExT", 4)$Will ellipsize (so cut and add …) if text is longer than 4 chars
$tc(cut, "sOme tExT", 2, 5)$Prints 5 chars starting after the second
$tc(cut, "sOme tExT", -2)$Prints last 2 chars
$tc(count, "To be or not to be", be)$Count the number of times a set of chars appears in text
$tc(utf, "201")$Will render utf code 0x201 (advanced, for font icons)
$tc(len, "sOme tExT")$Will return the length of text
$tc(n2w, 42)$Converts numbers to words
$tc(ord, 1)$Renders ordinal suffix for number 1 (st)
$tc(roman, "Year 476?")$Converts 476 into Roman numeral CDLXXVI
$tc(lpad, 5, 10, 0)$Will left pad the string to 'n' chars length using the provided string (or 0 by default)
$tc(rpad, 5, 10, 0)$Will right pad the string to 'n' chars length using the provided string (or 0 by default)
$tc(split, "SuperXOneXZed", "X", 1)$Split string by char X and prints second segment
$tc(reg, "Foobar one", "o+", X)$Will replace text matching o+ regexp with a capital X
$tc(html, "<b>Four</b> is %gt; than 3")$Converts HTML text into plain text
$tc(url, "an URL parameter with 'strange!' symbols")$URL encode text using UTF-8 or supplied encoding
$tc(fmt, "Padded number '%05d' or text '%5s'", 3, foo)$Convert text and parameters using JAVA format standard
$tc(nfmt, "Total is 30000.12")$Converts numbers to proper locale format
$tc(lines, "This is two lines")$Return number of lines on a given text
$tc(json, "{'a':1,'b':2}", ".a")$Parse string as a JSON Path expression and return result
$tc(type, "Это лучшее приложение в мире!")$Returns text type of the string, one of:: LATIN, NUMBER, ARABIC, CYRILLIC, GREEK, HIRAGANA, KATAKANA, CJK
$tc(asort, "zebra apple banana")$Sorts words alphabetically
$tc(asort, "cherry:apple:banana", ":", "desc")$Sorts words in descending alphabetical order
$tc(nsort, "3,1,2", ",")$Sorts numbers numerically
$tc(nsort, "afoo2:blabla3:zebra1", ":")$Extract numbers and sort words by extracted numbers

TF - time span

TF: time span (format a relative time span, like 3 hours ago or in 3 days))

Syntax

tf(date, [format])

Arguments

  • date: Date to be used. The Date can be returned by some other function or you can use text. For text dates you can both set it statically using the format '1955y11M12d22h04m00s' to express year 1955, month 11, day 12 at 22:04:00 (all fields are optional), or use 'a/r' (add/remove) operators, so, for example 'a12m3s' will add 12 minutes and 3 secs to current date.
  • format: Optional format to be used for the time, see examples

Examples

FormulaDescription
$tf(bi(plugged))$Time since last battery plugged/unplugged
Midnight $tf(0h0m0sa1d)$Time to midnight (we first set the time to 0 hours, 0 mins and 0 sec then we add one day at the end)
Midnight in $tf(0h0m0sa1d, hh:mm:ss)$Countdown to midnight (same as before but we use custom format)
$tf(ai(sunset) - ai(sunrise))$Current duration of daylight, automatic format
Tonight $tf(ai(sunrise, a1d) - ai(sunset), "h' hours' and m' minutes'")$ of darknessDarkness duration, manual format
Sunrise in $tf(ai(nsunrise), M)$ minutesMinutes till next sunrise

TS - traffic stats

TS: traffic stats (current download / upload speed, data usage statistics…)

Syntax

ts(type, [unit], [start], [end])

Arguments

  • type: Data type (use trx for total bytes download and ttx for total uploaded, tt for total uploaded downloaded, mrx/mtx/mt for mobile only stats and wrx/wtx/wt for wifi only traffic)
  • unit: Unit, a for auto (default, will add unit), b for bytes, k for kilobytes or m for megabytes
  • start: Traffic stats start date
  • end: Traffic stats end date

Examples

FormulaDescription
$ts(trx)$Current download speed in automatic unit
$ts(ttx)$Current upload speed in automatic unit
$ts(mt, a, r0d)$Total mobile traffic today
$ts(mt, a, r1d, r1d)$Total mobile traffic yesterday
$ts(mt, a, r1w)$Total mobile traffic in the last 7 days
$ts(mt, a, 2d)$Total mobile traffic from the second day of this month
$ts(mt, a, 1dr1M, 1dr1d)$Total mobile traffic last month (from the 1st to the last day of the month)

TU - timer utilities

TU: timer utilities (pick number, image or file every minute, hour…)

Syntax

tu(mode, [timer])

Arguments

  • mode: Mode (see examples)
  • timer: Timer (in minutes, can be a fraction like 0.1)

Examples

FormulaDescription
$tu(rnd, 1, 10, 20)$Return a random number between 10 and 20 every minute
$tu(seq, 1/4, 1, 100)$Goes from 1 to 100 (included) changing every 15 seconds
$tu(rndimg, 15, "/sdcard/pictures")$Pick a random image file from directory every 15 minutes
$tu(rndimg, 5, "/sdcard/pictures", "txt")$Pick a random image file matching pattern every 5 minutes
$tu(rndfile, 15, "/sdcard/foo")$Pick a random file from directory every 15 minutes
$tu(rndfile, 5, "/sdcard/foo", "txt")$Pick a random file matching pattern every 5 minutes

UC - unread counters

UC: unread counters (get number of unread SMS, missed calls, emails…)

Syntax

uc(mode, [param], [account])

Arguments

  • mode: Mode (see examples)
  • param: Parameter (see examples)
  • account: Account (index or pattern, when available)

Examples

FormulaDescription
$uc(sms)$Unread SMS count
$uc(sms, text)$First unread SMS text
$tf(uc(sms, date, 1))$Second unread SMS receive date
$uc(sms, from, 2)$Third unread SMS sender number
$uc(calls)$Missed calls count
$uc(calls, num)$Last missed call number
$uc(calls, name)$Last missed call name (if available, number otherwise)
$tf(uc(calls, date))$Time since last missed call
$uc(gmail)$Gmail unread count for Inbox
$uc(gmail, forums)$Gmail unread count for Forums label
$uc(gmail, promo, color)$Gmail Promotions label color
$uc(gmail, updates, count, foo)$Gmail total messages on Updates label in foo account
$uc(gmail, social, unread, 1)$Gmail unread messages on Social label in second account
$uc(whatsapp)$Unread WhatsApp conversations
$tf(uc(whatsapp, date, 1))$Second unread WhatsApp receive date
$uc(whatsapp, from, 2)$Third unread WhatsApp sender

WF - weather forecast

WF: weather forecast (max/min temperature, chance of rain, conditions…)

Syntax

wf(type, day, [hours])

Arguments

  • type: Info type, see examples
  • day: Forecast day index (0 is today)
  • hours: Forecast hours offset (for hourly weather, 3 means 3 hours from now plus days * 24)

Examples

FormulaDescription
$wf(min, 0)$°$wi(tempu)$Today's min temperature in local unit
$wf(max, 0)$°$wi(tempu)$Today's max temperature in local unit
$wf(cond, 0)$Today's forecast condition
$wf(icon, 0)$Today's forecast icon, one of: UNKNOWN, TORNADO, TSTORM, TSHOWER, SHOWER, RAIN, SLEET, LSNOW, SNOW, HAIL, FOG, WINDY, PCLOUDY, MCLOUDY, CLEAR
$wf(code, 0)$Today's forecast code, one of: TORNADO, TROPICAL_STORM, HURRICANE, SEVERE_THUNDERSTORMS, THUNDERSTORMS, MIXED_RAIN_SNOW, MIXED_RAIN_SLEET, MIXED_SNOW_SLEET, FREEZING_DRIZZLE, DRIZZLE, FREEZING_RAIN, SHOWERS, HEAVY_SHOWERS, SNOW_FLURRIES, LIGHT_SNOW_SHOWERS, BLOWING_SNOW, SNOW, HAIL, SLEET, DUST, FOGGY, HAZE, SMOKY, BLUSTERY, WINDY, CLOUDY, MOSTLY_CLOUDY, PARTLY_CLOUDY, CLEAR, FAIR, MIXED_RAIN_AND_HAIL, ISOLATED_THUNDERSTORMS, SCATTERED_SHOWERS, HEAVY_SNOW, SCATTERED_SNOW_SHOWERS, THUNDERSHOWERS, SNOW_SHOWERS, ISOLATED_THUNDERSHOWERS, NOT_AVAILABLE
$wf(rainc, 0)$%Today's chance of rain in percentage (if available)
$wf(rain, 0)$mmToday's precipitations in mm (if available)
$wf(temp, 0, 0)$°$wi(tempu)$Next hour temperature in local unit (if available)
$wf(cond, 0, 3)$Weather condition 3 hours from now (if available)
$df("hh:mma", wf(start, 0, 4))$ - $df("hh:mma", wf(end, 0, 4))$Start - End of validity of hourly forecast 4 hours from now (if available)
$wf(rainc, 0, 12)$%Chance 12 hours from now in percentage (if available)
$wf(wchill, 0)$$tc(utf, b0)$$wi(tempu)$Wind Chill in local unit
$wf(wspeed, 0)$$li(spdu)$Wind Speed in local unit (kmh/mph)
$wf(wspeedm, 0)$mpsWind Speed in meters per second
$wf(wdir, 0)$Wind Direction in degrees
$wf(hum, 0)$%Current humidity in percent
$wf(clouds, 0)$%Current cloud coverage in percent (if available)
$wf(press, 0)$mbarCurrent pressure in Millibars
$wf(minc, 0)$°CToday's min temperature in local unit
$wf(maxc, 0)$°CToday's max temperature in local unit

WG - web get

WG: web get (retrieve and parse text, rss and other content from HTTP links)

Syntax

wg([url], filter, params)

Arguments

  • url: Url to the http content
  • filter: Filter to use (RSS, TXT, XML, URL etc…)
  • params: Filter parameters (see examples)

Examples

FormulaDescription
$wg("goo.gl/wNMV3f", txt)$Convert HTML content at URL into plain Text
$wg("quotes.rest/qod.xml", xml, "//quote")$Quote of the day text (parse XPath expression for XML content at URL)
$wg("quotes.rest/qod.xml", xml, "//author")$Quote of the day author (parse XPath expression for XML content at URL)
$wg("www.cnet.com/rss/news/", rss, title)$Get RSS feed title
$wg("cnet.com/rss/news/", rss, desc)$Get RSS feed description
$df("hh:mma", wg("cnet.com/rss/news/", rss, date))$Get RSS feed publish date
$wg("cnet.com/rss/news/", rss, count)$Get RSS feed entry count
$wg("cnet.com/rss/news/", rss, 0, title)$Get RSS feed title for entry 0
$wg("cnet.com/rss/news/", rss, 0, desc)$Get RSS feed content for entry 0
$wg("cnet.com/rss/news/", rss, 0, link)$Get RSS feed link for entry 0
$wg("cnet.com/rss/news/", rss, 0, thumb)$Get RSS feed first thumbnail image for entry 0
$df("hh:mma", wg("cnet.com/rss/news/", rss, 0, date))$Get RSS feed date for entry 0
$wg("500px.com/popular.rss", url, "cdn.500px.org")$Extract first URL matching the pattern
$wg("500px.com/popular.rss", url, "cdn.500px.org", count)$Number of URLs matching the pattern
$wg("500px.com/popular.rss", url, "cdn.500px.org", 3)$Extract third URL matching the pattern
$wg(jsonip.com, json, .ip)$Current IP via public service (parse JSONPath expression)
$wg("api.ipify.org/?format=json", reg, '[\{"\}]', 'X')$Search and replace from URL using Regular Expression
$wg("file:///sdcard/test.txt", raw)$Dump content of a text file in the SD without parsing
$wg("http://www.slashdot.org", jsoup, "meta[property=og:title]", content)$Read html meta og:title property content on element 0 using a JSoup selector

WI - current weather

WI: current weather (temperature, rain, conditions…)

Syntax

wi(type)

Arguments

  • type: Info type, see examples

Examples

FormulaDescription
$wi(temp)$°$wi(tempu)$Temperature in local unit
$wi(flik)$°$wi(tempu)$Feels Like temperature (Heat Index) in local unit
$wi(dpoint)$°$wi(tempu)$Dew Point in local unit
$wi(fpoint)$°$wi(tempu)$Frost Point in local unit
$wi(cond)$Current weather condition
$wi(icon)$Current weather icon, one of: UNKNOWN, TORNADO, TSTORM, TSHOWER, SHOWER, RAIN, SLEET, LSNOW, SNOW, HAIL, FOG, WINDY, PCLOUDY, MCLOUDY, CLEAR
$wi(code)$Current weather code, one of: TORNADO, TROPICAL_STORM, HURRICANE, SEVERE_THUNDERSTORMS, THUNDERSTORMS, MIXED_RAIN_SNOW, MIXED_RAIN_SLEET, MIXED_SNOW_SLEET, FREEZING_DRIZZLE, DRIZZLE, FREEZING_RAIN, SHOWERS, HEAVY_SHOWERS, SNOW_FLURRIES, LIGHT_SNOW_SHOWERS, BLOWING_SNOW, SNOW, HAIL, SLEET, DUST, FOGGY, HAZE, SMOKY, BLUSTERY, WINDY, CLOUDY, MOSTLY_CLOUDY, PARTLY_CLOUDY, CLEAR, FAIR, MIXED_RAIN_AND_HAIL, ISOLATED_THUNDERSTORMS, SCATTERED_SHOWERS, HEAVY_SNOW, SCATTERED_SNOW_SHOWERS, THUNDERSHOWERS, SNOW_SHOWERS, ISOLATED_THUNDERSHOWERS, NOT_AVAILABLE
$wi(wspeed)$$li(spdu)$Wind Speed in local unit (kmh/mph)
$wi(wspeedm)$mpsWind Speed in meters per second
$wi(wchill)$$tc(utf, b0)$$wi(tempu)$Wind Chill in local unit
$wi(wdir)$Wind Direction in degrees
$wi(press)$mbarCurrent pressure in Millibars
$wi(hum)$%Current humidity in percent
$wi(clouds)$%Current cloud coverage in percent (if available)
$wi(uvindex)$Current UV index (if available)
$wi(tempc)$°CTemperature in centigrades
$wi(provider)$Weather provider used to fetch data
$df("hh:mma", wi(updated))$Time of last weather update in hh:mm format
$wi(lid)$Weather station ID (if available)
$wi(pdays)$Number of days of forecast
$wi(prain)$Provider precipitation support, 1 if available, 0 if not
$wi(prainc)$Provider rain chance support, 1 if available, 0 if not
$wi(phours)$Number of hours in the hourly forecast if available
$wi(phstep)$Provider length of hourly forecast entries, in hours, usually 1




Privacy Policy