I promise this site was good when I last touched it in 2013. Back then stuff like these blood drips were cool.
— Daniel B, 2023

daniel baird dot com

Report Assembler

This is little JavaScript library that takes JSON data and a carefully written source document, and merges them into a result document. It’s aimed at making prose descriptions of scientific data. I started this so I could get CliMAS Reports finished as quickly as possible.

Report Assembler replaces $$variable in your document with a value, and will work out [[ logical == conditions ]] to determine which parts of the document should be included. For example, with this JSON:

{
    "ZombieSpeedMpS": 4.5
    "IncubationDays": 2
}

You can write a report template like this:

Your local zombie variety moves at $$ZombieSpeedMpS
metres per second.  If you get bitten, you will turn into a zombie
after $$IncubationDays [[IncubationDays != 1]]days.
[[IncubationDays == 1]]day.

..and Report Assembler can give you a nice report on zombies:

Your local zombie variety moves at 4.5 mph. If you get bitten, you will turn into a zombie after 2 days.

The library isn’t particularly powerful, but it served its purpose of letting the scientist working with me on CliMAS Reports write a kind of super-document with many complicated conditional parts, without them having to be a programmer themselves.

Find out more from the source code, in particular the readme includes a little documentation.

This project

was developed in late 2012 and released in November 2012.

Topics