How to write bikeshed
Install
As installation required Py3.7, decided not to install locally.
So, lets use Curl + Online
In 3 Steps,
- Let us create Makefile
- and sample.bs
- which generates HTML file!
bikeshed/ ├── build │ └── sample.html ├── Makefile └── sample.bs
Step 1
Makefile
contents. Thanks Bryce.
BUILDDIR = build all: remote setup: mkdir -p $(BUILDDIR)/ remote: setup find . -maxdepth 1 -name "*.bs" -type f | sed 's/\.bs$$//' | xargs -I{} -t -n 1 sh -c "curl https://api.csswg.org/bikeshed/ -F force=1 -F file=@{}.bs > $(BUILDDIR)/\`basename {}\`.html" local: setup find . -maxdepth 1 -name "*.bs" -type f | sed 's/\.bs$$//' | xargs -I{} -t -n 1 sh -c "bikeshed -f spec {}.bs $(BUILDDIR)/\`basename {}\`.html" clean: rm $(BUILDDIR)/* rmdir $(BUILDDIR)
Step 2
sample.bs
contents. Thanks to quick start guide.
<pre class='metadata'>
Title: Your Spec Title
Shortname: your-spec
Level: 1
Status: ED
Group: WGNAMEORWHATEVER
URL: http://example.com/url-this-spec-will-live-at
Editor: Your Name, Your Company http://example.com/your-company, your-email@example.com, http://example.com/your-personal-website
Abstract: A short description of your spec, one or two sentences.
Introduction {#intro}
=====================
Introduction here.
Step 3
Run make
and open your build/*.html
file in browser to view it. Yay!