ASML
ASML is a YAML-like markup language for spreadsheets.
1. Getting Started
First, you need to write a Schema
so that you can define and use your own data structures.
2. Writing Schema
To start a Schema
definition, type # Schema
at cell A1
. This indicates that rows below this line are to be interpreted as a Schema
object.
A sheet is identified to be ASML formatted only if cell A1 starts with a hash # . It is common to start a sheet with # <Type Name> , e.g: # Schema
|
Only one Schema is expected in a document. While it is valid to have more, you have to manually Apply the one you are using.
|
Here is an example of a typical ASML schema
You should make use of the side panel inspection window to check what input is available and what each field means. |
Once you’re done, simply press the Play button and click "Apply"
3. Syntax
You can fill object fields in 2 ways, vertically and horizontally.
3.1. Vertical Unpacking
In vertical unpacking, you specifiy which field you’re filling to the left and the value of that field to the right. This is similar to JSON and YAML.
3.2. Horizontal Unpacking
In horizontal unpacking, you don’t specify the names of the fields you are filling. Instead, the order of the values will determine which column refers to which field.
Horizontal unpacking can only happen on the first row of an object. |
You can mix both horizontal and vertical unpacking on a single object.
3.3. >
Escape character
While in horizontal mode, you can use the >
character to skip to the next field. You also use this character to escape a value which may coincidentally resolve into a field name (for vertical mode). In such cases, you would prefix the value with a >
, e.g: > name
3.4. <
Escape character
While in vertical mode, sometimes you would want to select a field name for the next object in the array, in such cases you would prefix the field name with a <
, e.g: < name
3.5. #
Pointers
In the object header row, you can also add an identifier to the object like: # Enemy Bandit
. Then, you can reference this object from within another object if it’s field is of type Enemy
. To reference the named object, just use a pointer like so: # Bandit
.
3.6. Translations / Aliasing
You can specify alternate values for an object using the Alias feature of ASML. To specify an alias, in the object header row, add a Alias selector name on any column. This will cause any fields marked aliased
to be substituted with their respective values from this column.