Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gjbianco/chapper

An AsciiDoc chapter mapper named Chapper
https://github.com/gjbianco/chapper

Last synced: about 1 month ago
JSON representation

An AsciiDoc chapter mapper named Chapper

Awesome Lists containing this project

README

        

= chapper

This is chapper: `<<(.*)>>`

He finds reference IDs in your AsciiDoc files.
He uses those to map out how your sections and chapters reference one another and outputs GraphViz syntax.
You can paste the output directly into a tool like https://sketchviz.com/new[SketchViz] to generate the image.

== Installation

Chapper is built using https://deno.land/[Deno] and TypeScript.
In order to build or run tests, you will need Deno installed (see main site -- it's a single binary!).
Experimentally, Deno has the ability to build JS/TS applications as a single binary, so releases of Chapper should run without dependencies.

With Deno installed and added to your PATH, build Chapper with:

```
deno compile --unstable --allow-read -o chapper src/index.ts
```

This will output a binary named `chapper`.
Copy this binary to your PATH.

== Usage

Right now, Chapper is very naive in file input handling.
You will need to construct a glob that includes the files chapper should map.
For example:

```
chapper path/to/sg-chapters/**/*.adoc
```

This will run chapper with all AsciiDoc files found beneath the `sg-chapter` directory.
This is the main way to run chapper.

=== Tests

Chapper includes unit tests, which you can run with `deno test`.