Preprocessor for the HTML Standard
Component Pascal Pascal Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Wattsi

Wattsi is a build tool for creating the HTML Standard from its source. It works in concert with other scripts.

Features

Currently:

  • Number the sections
  • Create Table of Contents
  • Cross-reference <span> and <code> to <dfn>
  • Create small TOC
  • Cross-reference back (<dfn> menu)
  • Strip out unused references
  • Spec splitting
  • Add caniuse.com annotations
  • Add syntax-highlighting markup to <pre> contents

Wattsi Syntax

For documentation on the "Wattsi language", e.g. things like data-x or w-nodev, see Syntax.md.

Building

Wattsi is written in Free Pascal. You'll need to install the 3.0.0 FreePascal compiler or newer to build it. With that installed, you should be able to run ./build.sh to create the wattsi executable and supporting shared libraries.

We hope to in the future provide precompiled wattsi binaries, built via continuous integration, for Wattsi. If you think you can help with this, please file an issue to get the discussion started! In the meantime, we do provide the wattsi-server service, which allows you to upload files to a server that will run Wattsi for you.

Building a Wattsi binary with 64-bit code

On Mac OS X (and perhaps on other systems as well), the FreePascal compiler defaults to generating 32-bit code. If for some reason you need to build a wattsi binary with 64-bit code, you can do so by adding -Px86_64 to the DEFINES line in the src/build.sh file, so that it looks like this:

DEFINES="-dUSEROPES -dLINES -dPARSEERROR -Px86_64"