.mad Document FormatThis document defines what a .mad file is. It describes the format as it exists
today, taken from two shipping sample documents and the code that reads and writes
them, and then states the format as it should be defined so that a reader on
another platform – a command-line tool, a Windows build – can open a document
without relying on Core Data or on any Apple framework.
The format matters because a report is small – the shipping samples are
under 80 KB – and because the engine that runs it fits on a phone and in a
container: the same definition runs on iOS, macOS, and the headless Linux
build. Where the format is going – a report’s result table becoming a data
source for other reports, so one document can span several databases – is
vision.md. The spec is also served as a website at
https://docs.everydayapps.com.
Everything in the first half is measured, not inferred. The two samples are
../MADDesigner/Resources/Assets/Samples.xcassets/Reports/Music.dataset/Music.mad and
…/London.dataset/London.mad.
The .mad format is an open specification. Anyone may read it and implement
it. The MIT licence covers the project’s code. The names “MAD”, “MAD Designer”
and “MAD Viewer”, and the application icons and other product artwork, are the
author’s and are not licensed; descriptive references to .mad files and to
this project are welcome. See ../LICENSE, ../NOTICE
and ../project/THIRD_PARTY_LICENSES.md.
The spec is organised as one chapter per file. Chapters 1-6 describe the format as
it ships; chapter 7 is the normative target (v1); chapters 8-9 are the open
questions and how the claims are verified: