Skip to content

Commit

Permalink
docs: add an initial version of Ace’s website
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeltour committed Oct 11, 2017
1 parent 17c111e commit 3b35ccf
Show file tree
Hide file tree
Showing 49 changed files with 2,267 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ yarn-error.log*
# Build directory
dist/

# Website build directory
website/site

# Dependency directories
node_modules/

Expand Down
9 changes: 9 additions & 0 deletions website/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
baseURL = "https://daisy.github.io/ace"
languageCode = "en-us"
title = "Ace, by DAISY"
description = "Hi"
theme = "daisy"
publishDir = "site"

[params]
description = "**[Ace](/ace)**, an accessibility checker for EPUB!<br>A **[DAISY Consortium](http://daisy.org)** project."
5 changes: 5 additions & 0 deletions website/content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
title = "Ace, by DAISY"
+++

Ace, the Accessibility Checker for EPUB, is a tool developed by the [DAISY Consortium](http://daisy.org) to assist with the evaluation of accessibility features of EPUB publications.
6 changes: 6 additions & 0 deletions website/content/contributing/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
+++
title = "Contributing"
weight = 4
+++

TBD
16 changes: 16 additions & 0 deletions website/content/contributing/code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
+++
title = "Code base overview"
weight = 2
wip = true
+++

Ace consists of the following components:

- **core**: the core checker’s logic, and the code responsible for running the underlying Web checker
- **cli**: the command line interface
- **epub**: utils for parsing EPUBs
- **http**: the Http API
- **report**: utils for building Ace’s reports
- **scripts**: the Javascript files injected in the headless browser to run Ace’s checks


66 changes: 66 additions & 0 deletions website/content/contributing/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
+++
title = "How to contribute?"
weight = 1
wip = true
+++

First, welcome to Ace and thank you so much for willing to contribute!

## Submitting an issue

Feel free to file issues on our [GitHub issue tracker](https://github.com/daisy/ace/issues).

When filing an issue, please provide the following details:

- the version of Ace impacted by the issue (it can be retrieved by running `ace -v` in a command shell).
- the version of Node used to run Ace (it can be retrieved by running `node -v` in a command shell).
- if possible, provide the error details as produced in the error log

## Contributing code

### Pull requests

We accept changes via GitHub pull requests.

We try to keep a clean and readable commit history, so if we decide to merge your code we will rebase your commits on the `master` branch, and possibly squash them too.

Please make sure your branch is reasonably up-to-date with the `master` branch (by regularly pulling from or rebasing onto the `master` branch).

### Tests

Please make surre to provided tests for any change you’re proposing.

### Code style

We do not yet have formal code style guidelines, so please try to respect the style of the code files you are editting!

We may change your code style when merging a pull request.

### Commit guidelines

We follow a commit message convention (adapted from [Angular’s convention](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#)), which allows us to keep a readable history and automatically generate change logs.

Each commit message should consist of a simple header, a body, and an optional footer, each separated with a blank line. The header is a single line consisting of a _type_, an optional _scope_, and a _subject_.

The allowed types are:

- feat (feature)
- fix (bug fix)
- docs (documentation)
- style (formatting, missing semi colons, …)
- refactor
- test (when adding missing tests)
- chore (maintain)

An example of a commit message is

```
feat: enable support for checking EPUB 2.0.1
- Make sure that the parsing doesn’t choke on EPUB 2.0.1
- Warn when checking an EPUB 2.0.1
Closes #21
```


17 changes: 17 additions & 0 deletions website/content/contributing/notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
+++
title = "Implementation notes"
weight = 3
wip = true
+++

## Design principles

TBD.

## HTML checker

Under the hood, most of the HTML checks are powered by [aXe](https://github.com/dequelabs/axe-core), an engine for automated testing of HTML from [Deque Systems](https://www.deque.com/).

## Headless browser

During the evaluation of an EPUB, Ace loads each HTML content documeent in a headless browser using [Nightmare.js](https://github.com/segmentio/nightmare), a high-level browser automatiom library from [Segment](https://segment.com/).
6 changes: 6 additions & 0 deletions website/content/docs/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
+++
title = "Reference"
weight = 2
+++

TBD
198 changes: 198 additions & 0 deletions website/content/docs/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
+++
title = "Command line interface"
weight = 1
+++

## Overview

The easiest way to run Ace is to type this on the command line:

```
$ ace ~/Documents/book.epub
```

You'll then see a decription of Ace's actions as it runs tests on the book. The JSON report is printed to the command line at the end (nothing is saved to disk; you need to specify [`--outdir`](#outdir) for that).

Example:
```
info: Processing /Users/marisa/dev/epub-a11y-checker/samples/build/epub-a11y-tests-001.epub
info: Parsing EPUB
info: Analyzing accessibility metadata
info: Checking package...
info: Checking documents...
info: - xhtml/front.xhtml
info: - 0 issues found
info: - xhtml/nav.xhtml
info: - 1 issues found
info: - xhtml/image-desc.xhtml
info: - 4 issues found
info: - xhtml/table-structure.xhtml
info: - 2 issues found
info: - xhtml/heading-order-01.xhtml
info: - 0 issues found
info: - xhtml/heading-order-02.xhtml
info: - 0 issues found
info: - xhtml/heading-order-03.xhtml
info: - 0 issues found
info: - xhtml/color-contrast.xhtml
info: - 2 issues found
info: - xhtml/epub-type-and-aria.xhtml
info: - 3 issues found
info: - xhtml/out-of-spine-content.xhtml
info: - 2 issues found
info: Consolidating results...
info: {
"@type": "earl:report",
"@context": "http://ace.daisy.org/ns/ace-report.jsonld",
"dct:title": "Ace Report",
...
info: Done
```

## Options
Ace includes a simple set of options, detailed below.

### help

Displays the usage information and exits.

Syntax: `--help` or `-h`

Example:
```
$ ace --help
Ace by DAISY, an Accessibility Checker for EPUB
Usage: ace [options] <input>
Options:
-h, --help output usage information
-v, --version output the version number
-o, --outdir <path> save final reports to the specified directory
-t, --tempdir <path> specify a custom directory to store the temporary reports
-f, --force override any existing output file or directory
--subdir output reports to a sub-directory named after the input EPUB
-V, --verbose display verbose output
-s, --silent do not display any output
Examples
$ ace -o out ~/Documents/book.epub
```

### version

Displays the version of Ace and exits.

Syntax: `--version` or `-v`

Example:
```
$ ace --version
0.3.2
```

### outdir

Specify a path to save Ace's reports to.

Syntax: `--outdir` or `-o`, followed by the path

Example:

```
$ ace --outdir results ~/Documents/book.epub
```

This will produce output in a `results` subdirectory of your current working directory. If that directory does not exist, it will be created.

_Note: If you do not specify an `--outputdir` option, Ace outputs the JSON version of the report on the command line and saves nothing to disk._

### tempdir

Specify a custom path to save temporary reports to.

Syntax: `--tempdir` or `-t`, followed by the path

Example:

```
$ ace --tempdir acetemp ~/Documents/book.epub
```

This will produce output in a `acetemp` subdirectory of your current working directory. If that directory does not exist, it will be created.

### force

Overwrite any files in the directory specified by `--outdir`.

Syntax: `--force` or `-f`

If the output directory is not empty, and you do not specify `--force`, Ace will display a warning and exit:

```
warn: Output directory is not empty.
Running Ace would override the following files or directories:
- /Users/marisa/dev/out/ace.json
- /Users/marisa/dev/out/report.html
- /Users/marisa/dev/out/data
- /Users/marisa/dev/out/js
Use option --force to override.
```

### subdir

Output reports to a subdirectory named after the input EPUB. To be used in conjunction with [`--outdir`](#outdir).

Syntax: `--subdir`

Example:

```
$ ace --subdir --outdir results ~/Documents/my-book.epub
```

This creates a subdirectory named `my-book` within `results`.

### verbose

Output more detail when running Ace. This option is useful to use before sending a bug report as it tells us which version you're running.

Syntax: `--verbose` or `-V`

Example:
```
$ ace --verbose ~/Documents/book.epub
verbose: ACE cwd=/Users/marisa/dev/ace, outdir=/Users/marisa/dev/out/epub-a11y-tests-001, tmpdir=undefined, verbose=true, silent=false, jobId=
info: Processing /Users/marisa/dev/epub-a11y-checker/samples/build/epub-a11y-tests-001.epub
verbose: Extracting EPUB
info: Parsing EPUB
verbose: at location '/var/folders/x0/tvbr6tz54js_7q7gvg9s2g240000gn/T/tmp-42912vXel2GvQJ2Q6'
info: Analyzing accessibility metadata
debug: dc:identifier=com.github.epub-a11y-checker.epub-a11y-tests-001, dc:description=Samples for EPUB Accessibility Testing, dc:title=EPUB-A11Y-TESTS-001, dc:creator=[Marisa DeMeglio, Romain Deltour], dc:language=en, dcterms:modified=2017-02-21T13:00:00Z
```

Note that running Ace with `--verbose` enabled also creates verbose output in the log file.

### silent

This produces no output on the command line.

Syntax: `--silent` or `-s`

Example:
```
$ ace --silent ~/Documents/book.epub
$
```

Note that the log file is not 'silent'; it contains the default level of detail about Ace's operation.

Loading

0 comments on commit 3b35ccf

Please sign in to comment.