Skip to content
A sample catalog with rewrite templates. Feel free to fork and modify with your own!
JavaScript HTML Python Go Dart Elm Other
Branch: master
Clone or download
rvantonder Check Python version.
Raise if not using Python 2 in generate.py
Latest commit 877c9bf Oct 2, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
catalogue
js add highlight.js Jun 24, 2019
third-party-licenses update Jun 24, 2019
.gitignore initial commit Jun 23, 2019
LICENSE
Makefile initial commit Jun 23, 2019
README.md Raise if not using Python 2 in generate.py Oct 2, 2019
catalogue.json fixup erlang Sep 17, 2019
generate.py Raise if not using Python 2 in generate.py Oct 2, 2019
index.html update Jun 24, 2019

README.md

sample-catalog

A sample catalog with rewrite templates. Feel free to fork and modify with your own!

Layout

The catalogue folder contains a directory tree of templates. Each leaf folder is one rewrite pattern, containing a match file, a rewrite file, and optionally, a rule file. The match file contents is the match pattern, the rewrite file contents the rewrite pattern, and the optional rule file starts with a where ... rule.

When a directory tree is specified with comby -templates catalogue, the catalogue directory tree is traversed fully and every rewrite pattern is run against the file in the leaf folders.

Note that when running the -templates option without any other flags, all files in the directory will be run against the rewrite patterns. In general, use -f file-pattern.extension and/or -d src to run against a particular filepath pattern or directory, respectively. However, you don't need to worry about doing that for this catalog, since the generator script takes care of that for you.

The top level language under the catalogue directory defines the language label in the rendered site. Use the format in the newline-separated DOC.md files (example) to produce output entries as in the rendered catalog website.

Generating

Run python generate.py (uses Python 2). This creates a catalogue.json. The JSON file is refenced in index.html to generate the site.

Examples

See the rendered catalog for this repository.

See the comby tool or docs for using it!

You can’t perform that action at this time.