Commit Graph

9 Commits

Author SHA1 Message Date
Chris Krycho
ec5b76b8b0 tools: fix nostarch build reference to mdbook-trpl
Note that this is not urgent to land upstream because the script in
question is one only we run.
2024-12-05 12:27:12 -07:00
Chris Krycho
1882cfbb12 infra: remove extra leading > in simple preprocessor output
Preprocessors using `pulldown-cmark-to-cmark` do not yet perform round
trips 100% correctly, and insert leading spaces and an extra initial `>`
for block quotes, so strip those. Once that is fixed upstream, this will
become a no-op, and can be removed then.
2024-12-05 09:37:01 -07:00
Chris Krycho
9e2673a008 infra: share infrastructure for mdbook preprocessors
- Create an `mdbook_trpl` library package which hosts shared concerns
  for the packages, e.g. error and config handling.
- Move `mdbook-trpl-note` and `mdbook-trpl-listing` into the new shared
  package, with binaries at `src/bin/(note|listing)/main.rs` and the
  existing libraries at `src/note/mod.rs` and `src/listing/mod.rs` with
  their associated tests.
- Extract their actual shared pieces into the crate root.
- Update `tools/nostarch.sh` to build all the bins in `mdbook_trpl` at
  one time.

At the moment, this doesn't do a lot except trim down the number of
packages in the repository, but it sets things up nicely to support more
preprocessors (which I am going to add shortly).
2024-12-05 09:37:01 -07:00
Chris Krycho
60993ce66f infra: correctly support preprocessors for nostarch
- Update the `tools/nostarch` script to `cargo install` each of the
  preprocessors so they are always available to run and do not require
  any manual intervention.
- Add support for `"markdown"` renderer in the preprocessors.
2024-05-27 15:39:36 -06:00
Chris Krycho
593ec2af6a Do not apply semantic note handling to nostarch
Introduce a `book.toml` in the `nostarch` directory, which matches the
existing `book.toml` except for specifying the correct relative input
and output directories and disabling the `trpl-note` preprocessor. This
also lets us simplify the invocation in the `nostarch.sh` script a bit,
by providing the configuration directly in the file.
2024-04-29 16:18:34 -06:00
Carol (Nichols || Goulding)
df0162c02e Fix usage of find piped into xargs 2022-01-07 21:28:39 -05:00
Carol (Nichols || Goulding)
c99c03c659 Make fixes recommended by shellcheck 2022-01-03 13:18:46 -05:00
Carol (Nichols || Goulding)
6579c05cb9 Include code without hidden lines for nostarch files 2020-01-20 15:40:15 -05:00
Carol (Nichols || Goulding)
51c9ab3e5b Move all scripts into tools 2019-09-30 21:09:58 -04:00