Documents

Reacto Cheat Sheet

Menu

Introduction

Reactos are small codes (Reactive Tokens) that can be used within normal texts to give them dynamic meaning. [Reacto](https://reacto.reactale.com) was developed as a helper project for [Reactale](https://reactale.com)

Reactos

Date / Time ((r.dt))

  • ((r.dt.date)) yields today's date, a number only, e.g. 27

  • ((r.dt.day)) yields current day's name in the week, e.g. Sunday

  • ((r.dt.month)) yields current month, e.g. February

  • ((r.dt.year)) yields current year, e.g. 2018

  • ((r.dt.hour)) yields current hour in 12 hour format, e.g. 9 PM

  • ((r.dt.hour24)) yields current hour in 24 hour format, e.g. 21

  • ((r.dt.min)) yields current minute, a number only, e.g. 18

  • ((r.dt.sec)) yields current minute, a number only, e.g. 36

Config ((r.cfg))

  • ((r.cfg.setLocale.LANGUAGE_CODE)) Changes the language of Reactos (e.g. 'en'). For all possible language codes, visit the playground

  • ((r.cfg.printOff)) Stops printing the output of the reacto(s) that comes after it

  • ((r.cfg.printOn)) Cancels the effects of ((r.cfg.printOff)), for all reacto(s) after it

Variable ((r.var))

  • ((r.var.variableName = any_value)) Saves any value (number or text/multiline) for later use. variableName should be alphanumeric.

  • ((r.var.variableName)) yields the value of the variable (set either by user or system)

  • ((r.var.variableName = text with r.var.otherVar)) Thus outer r.var can act like a template to be updated later

Calc ((r.calc))

  • ((r.calc. n1 + n2)) Adds 2 numbers (or reacto vars)

  • ((r.calc. r.var.v1 + r.var.v2)) Adds 2 numbers saved earlier in reacto vars

If ((r.if))

  • ((r.if. value1 = value2 )) {{ ... }} If value1 equals to value2 then whatever is inside {{ ... }} will get executed
© Suman Barick | 2019-2021