Skip to content
Permalink
Browse files

Disable curl backend, python setup, update README

  • Loading branch information...
kba committed Oct 23, 2016
1 parent 2af507e commit a03d602a09b8bc917d00b79167c9b87b25aa0b7e
Showing with 27 additions and 15 deletions.
  1. +1 −2 Makefile
  2. +24 −13 README.md
  3. +2 −0 requirements.txt
@@ -7,7 +7,7 @@ SPEC_MD = $(VERSION)/spec.md
SPEC_BS = $(VERSION)/index.bs
SPEC_HTML = $(VERSION)/index.html

BIKESHED = $(shell for cmd in bikeshed docker curl;do type >/dev/null 2>&1 $$cmd && echo $$cmd && break;done)
BIKESHED = $(shell for cmd in bikeshed docker;do type >/dev/null 2>&1 $$cmd && echo $$cmd && break;done)
BIKESHED_ARGS = -f

SPEC_DEFS = $(VERSION)/include/defs/bbox
@@ -25,7 +25,6 @@ $(SPEC_HTML): $(SPEC_BEFORE) $(SPEC_MD) $(SPEC_BIBLIO) $(SPEC_AFTER) $(SPEC_DEFS
@case "$(BIKESHED)" in \
bikeshed) bikeshed $(BIKESHED_ARGS) spec $(SPEC_BS) ;; \
docker) docker run --rm -it -v $(PWD):/data kbai/bikeshed $(BIKESHED_ARGS) spec $(SPEC_BS) ;; \
curl) curl "https://api.csswg.org/bikeshed/" -o $(SPEC_HTML) -Fforce=true -Ffile=@$(SPEC_BS) ;; \
*) echo 'Unsupported bikeshed backend "$(BIKESHED)"'; exit 1 ;; esac
@rm -f $(SPEC_BS)

@@ -38,20 +38,31 @@ channel](https://gitter.im/kba/hocr-spec).

## Building the spec

To build the spec, you will need to have `GNU make` and one of the following
programs installed:
* [bikeshed](https://github.com/tabatkins/bikeshed)
* [docker](https://docker.com)
* `curl`

The Makefile will first look for a local bikeshed installation, then for docker
to use the [bikeshed docker container](https://hub.docker.com/kbai/bikeshed)
and finally for curl to remotely use the [CSS Spec
Processor](https://api.csswg.org/bikeshed/) to build the spec.

Adapt
To build the spec, you will need to have installed:
* `GNU make`
* One of the following programs installed:
* [bikeshed](https://github.com/tabatkins/bikeshed)
* [docker](https://docker.com)
* Python 3

To install the python requirements:

```sh
pip3 install --user -r requirements.txt
```

The Makefile will first look for a local bikeshed installation and fallback to docker
to use the [bikeshed docker container](https://hub.docker.com/kbai/bikeshed)
to build the spec.

To change the spec, adapt
* `<VERSION>/spec.md` to change the body of the spec
* `<VERSION>/metadata` to change the [bikeshed metadata](https://github.com/tabatkins/bikeshed/blob/master/docs/metadata.md).
* `<VERSION>/spec.before.html` to change
* the [bikeshed metadata](https://tabatkins.github.io/bikeshed/#metadata)
* the [references to terms from other specs](https://tabatkins.github.io/bikeshed/#custom-dfns)
* `<VERSION>/spec.after.html` to change
* Javascript to run in the generated spec document
* `<VERSION>/defs.yml` to change the definition lists for elements and properties

Then run `make VERSION=<VERSION>` to build that spec.

@@ -0,0 +1,2 @@
Jinja2>=2.8
pyyaml>=3.1.12

0 comments on commit a03d602

Please sign in to comment.
You can’t perform that action at this time.