Blyx

Bunting

Accessible HTML reporting framework · 0.1.0

Publish a distribution as a standalone HTML table with interval labels, counts and meters. Reuse the same bin definitions in reports and tests.

Publish a support-queue report

Group eight first-reply waits at 5, 10 and 20 minutes. The resulting HTML page opens offline and exposes intervals, counts and shares as a table. Every observation contributes to one row.

Download the standalone example

Extract the archive and run bunting-demo.exe on Windows or ./bunting-demo on Linux and macOS. Each archive includes the Blyx source and tests.

Build from source

With Blyx 0.2.1, Rust and a host linker installed, run these commands to edit and rebuild the example.

git clone --depth 1 --branch v0.1.0 https://github.com/Rahulchaube1/blyx-bunting.git
cd blyx-bunting
blyxc native-run project.blyx

Why this framework exists

A colored chart alone can hide values from people navigating with assistive technology. W3C’s table guidance pairs data cells with headers. Bunting emits row and column headers and prints the count alongside every meter. W3C WAI, Tables with One Header

Install Bunting in your editor

Extension RahulChaube.blyx-bunting · 0.1.0

The extension includes a runnable Blyx example, function completions and the framework source. For the modular project, extract the starter, open its folder and run blyxc native-run main.blyx with the native toolchain installed.

Create an empty .blyx file, type blyx-bunting-demo and accept the completion. Choose Blyx: Run File to run the example.

For an offline installation, choose Extensions: Install from VSIX for Blyx Language first, then for Bunting.

Download the companion Blyx Language VSIX

Install with Conda

Create an environment containing Bunting 0.1.0, its Blyx source and a runnable example. Run the second command with Blyx 0.2.1, Rust and a host linker installed.

conda create -y --prefix ./blyx-env --override-channels -c https://rahulchaube1.github.io/blyx-packages blyx-bunting=0.1.0=0
blyxc native-run ./blyx-env/share/blyx/bunting/main.blyx

To use this package in your application, copy share/blyx/bunting/vendor/bunting from the environment into your project's vendor directory.

Install the full collection with Homebrew or Scoop

Import into a Blyx project

Install Blyx 0.2.1, Rust 1.85 or newer and a host linker. From the directory containing your entry file, clone this tagged release.

git clone --depth 1 --branch v0.1.0 https://github.com/Rahulchaube1/blyx-bunting.git vendor/bunting

Save this as main.blyx beside vendor and run blyxc native-run main.blyx.

use vendor::bunting::bunting;

fn main() {
    let waits = [0, 4, 5, 8, 10, 12];
    let edges = [5, 10];
    println!(bu_count(waits, edges, 0));
    println!(bu_count(waits, edges, 1));
    println!(bu_count(waits, edges, 2));
}

Expected output

2
2
2

API and input requirements

Supply finite strictly increasing boundaries. A value exactly on a boundary belongs to the bucket above it. Bucket −1 counts missing or non-finite values. An empty boundary vector represents all finite values. The table generator validates boundaries before writing any markup. The caller supplies the HTML document around the table.

APIUse
bu_valid(edges), bu_bucket(edges, value)Check boundaries and locate the value by binary search.
bu_count(data, edges, bucket)Count observations in one bucket. An invalid request returns −1.
bu_table(data, edges)Write a captioned HTML table with explicit counts and meter values. Returns false for invalid boundaries.

Develop and contribute

Open the tagged source to read the implementation and examples. Include the smallest reproducible Blyx program, compiler version and expected result when reporting an issue.