From 008dad4d319da9ba1b28da57dd75dfb9e4d68746 Mon Sep 17 00:00:00 2001 From: crc Date: Wed, 6 Jan 2021 13:18:47 +0000 Subject: [PATCH] toolchain: add a tool to run spell(1) against the chapters in the book (#40) FossilOrigin-Name: b0a8ab588ab4884adfff4c0f8ae89efdbfcac432deeac6999ba6cab633539659 --- tools/book-check-spelling.retro | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 tools/book-check-spelling.retro diff --git a/tools/book-check-spelling.retro b/tools/book-check-spelling.retro new file mode 100755 index 0000000..514e7c3 --- /dev/null +++ b/tools/book-check-spelling.retro @@ -0,0 +1,26 @@ +#!/usr/bin/env retro + +This is used to assemble the Markdown copy of the RETRO Handbook. + +The individual chapters are in the `book/` directory. This is set +using the `BOOK-BASE` constant. + +~~~ +'doc/book/ 'BOOK-BASE s:const +~~~ + +The chapters are specified it the `TOC`, a named array. These are +the file names, they will be included in order. I am structuring +it using separate file to make the actual editing process easier +for me. + +~~~ +'tools/book-chapters.retro include +~~~ + +~~~ +TOC +[ nl #1 a:fetch dup s:put nl BOOK-BASE 'spell_%s%s s:format unix:system ] +a:for-each +~~~ +