<<-EOU
## USAGE
pmlcode [PML_PATH, ...] [OPTIONS]
## SYNOPSIS
Looks for `<embed>` tags whose `file` attribute match `--pattern`, extracting the
following metadata:
- `coderoot`: The relative path from the source PML's directory
- `chapter`: A chapter identifier
- `snapshot`: A snapshot of the code at a specific point in the chapter
- `path`: The path to the file within the target `--application-directory` project
For example, given this embed, using the default --pattern:
<embed file="code/02-testing/01-start/test/some_test.exs"/>
This is the metadata:
coderoot
: `code`
chapter
: `02-testing`
snapshot
: `01-start`
path
: `test/some_test.exs`
This file will be extracted by looking at the repository located at --application-directory,
and trying to find a ref _on its remote origin_ that matches the `chapter.snapshot`, i.e.:
`origin/02-testing.01-start`
Then pulling `test/some_test.exs` (or the entire branch, if `--type full` is being used).
## ENVIRONMENT VARIABLES
PMLCODE_APP_DIR
: An optional working copy directory path, sets the default
for `--application-directory`
PMLCODE_PATTERN
: An optional pattern, sets the default for `--pattern`
## CUSTOM PATTERNS
Any custom pattern must have named captures for `coderoot`, `chapter`, `snapshot`, and `path`.
## CUSTOM BRANCH/REFS
Currently the ref retrieved from git repositories is always in the form `chapter.snapshot`,
using the information matched using the --pattern.
EOU