Skip to content

Latest commit

 

History

History
115 lines (96 loc) · 2.46 KB

README.md

File metadata and controls

115 lines (96 loc) · 2.46 KB

Banner

Vili

A simplistic readable data format !

build

Description

Vili is a YAML-like data language without all the complexity, it comes with handy features allowing you to describe your data with beautiful tree-structures.

Examples :

Animals (Simple tree-like structure)

Vili file

Animalia.vili

Animalia:
    Chordate:
        Mammal:
            Carnivora:
                Felidae:
                    Felis:
                        Domestica:
                            HouseCat:
                                name: "House Cat"
                                size: 24.5
                                cool: true
                        Leo:
                            Lion:
                                name: "Lion"
                                size: 280.7
                                cool: true
        Primate:
            Pongidae:
                Pan:
                    Troglodytes:
                        Chimpanzee:
                            name: "Chimpanzee"
                            size: 81.6
                            cool: true
            Hominidae:
                Homo:
                    Sapiens:
                        Human:
                            name: "Human"
                            size: 170
                            cool: false
    Arthopoda:
        Insect:
            Diptera:
                Muscidae:
                    Musca:
                        Domestica:
                            Housefly:
                                name: "Housefly"
                                size: 0.12
                                cool: false

Countries and Cities (Lists)

Vili file

Countries.vili

# Inline
France:
    cities: ["Paris", "Marseille", "Lyon", "Nice"] 
# Multiline
Germany:
    cities: [
        "Berlin",
        "Hamburg",
        "Munich",
        "Cologne"
    ]
# Do however you want
UnitedKingdom:
    cities: [
        "London", "Manchester",
        "Liverpool", "Glasgow"
    ]

Templates

# Simple templates (aliases)
template on: true
template off: false

switch_1: on
switch_2: off

# Advanced templates
template color: {
    type: "color",
    r: 0,
    g: 0,
    b: 0,
    a: 255
}

black: color
red: color { r: 255 }
green: color { g: 255 }
blue: color { b: 255 }
yellow: color { r: 255, b: 255 }