Skip to content

gjbianco/chapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 SketchViz to generate the image.

Installation

Chapper is built using 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.

About

An AsciiDoc chapter mapper named Chapper

Resources

License

Stars

Watchers

Forks