isuke / advanced-poe-filter

Advanced PoE Filter Compiler. Rich syntax for you.

Home Page:https://github.com/isuke/advanced-poe-filter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advanced PoE Filter Test and Lint "git-consistent friendly" MIT npm

Advanced PoE Filter is used by Filter of Kalandra.

What is this?

This is compiler. Convert rich filter syntax to PoE filter syntax.

input
Show "Map Section"
    Class "Maps"

    SetBorderColor     200 100 50 123
    SetTextColor       200 100 50 123
    SetBackgroundColor 200 100 50 123

    Mixin "Rarity"
        Show "Rare"
            Rarity = Rare

            SetBorderColor     Negate()
            SetTextColor       Grayscale()
            SetBackgroundColor Lighten(30%)
output
################################################################################
# Map Section                                                                  #
################################################################################
# Rarity is "Rare"
Show
    Class = "Maps"
    Rarity = Rare
    SetFontSize 32
    SetTextColor 125 125 125 123
    SetBackgroundColor 218 144 107 123
    SetBorderColor 55 155 205 123

# Rarity is Any
Show
    Class = "Maps"
    SetFontSize 32
    SetTextColor 200 100 50 123
    SetBackgroundColor 200 100 50 123
    SetBorderColor 200 100 50 123

Usage

import { compile } from 'advanced-poe-filter'

const result = compile(advancedScriptText)

deploy

$ npm run deploy

About

Advanced PoE Filter Compiler. Rich syntax for you.

https://github.com/isuke/advanced-poe-filter

License:MIT License


Languages

Language:JavaScript 100.0%