spiegel-keyman/web/bulk_rendering
Marc Durdin 93a03acb9f chore(common): builder script :target and --option support
Adds support for :target and --option to the builder_() functions in
build-utils.sh, along with a consistent way of describing command line
parameters in short-hand form, so we can avoid the display_usage getting
out of sync with actual command line parameters.

I opted to tweak the existing usage slightly, reversing parameter order
for `builder_report`, so that we could extend `builder_report` cleanly
to support targets.

The new builder_() functions are `builder_describe` and `builder_parse`,
which should be used in place for `builder_init` where you want to
provide more detailed command-line options (for many scripts, the
defaults provided through `builder_init` may suffice).

`builder_describe` lets you set a single-line description of the script,
along with a list of parameters: `actions`, `:targets` and `--options`.
Options may also specify a shorthand form, e.g. `--option,-o`. Each
parameter may optionally include a short description, separated by
space(s) from the parameter name.

build-utils.test.sh tests the functionality of the various functions,
and provides some examples of using them.

Defaults:
* If a target is not specified in `builder_describe`, a standard target
  of `:project` will be available.
* If the user does not pass an action on the command line, then `build`
  will be used.
* If the user does not pass a target on the command line, all targets
  will have the actions applied.

Note, it is possible to have targets which do not use all actions. These
may be still be specified, but can be ignored. For example, `test:tools`
may not be an action:target that you handle in the script. At this time,
the builder_() functions do not attempt to check for this.
2022-07-25 14:31:58 +10:00
..
build.sh chore(common): builder script :target and --option support 2022-07-25 14:31:58 +10:00
compare.html fix(web): bulk rendering docs 2021-01-22 16:07:45 +11:00
index.html fix(web): bulk renderer using video stream capture 2021-01-22 15:51:38 +11:00
README.md fix(web): bulk rendering docs 2021-01-22 16:07:45 +11:00
renderer_core.ts chore(web): bulk renderer tsc cleanup 2022-05-16 05:50:11 +10:00
tsconfig.json chore(web): drops non-pred text dependence on es6-shim 2022-05-31 09:11:20 +07:00

Bulk renderer

This renderer loads all the cloud keyboards from api.keyman.com and renders each of them to the document, saving each render as an inline (data-url) PNG for easy comparison.

Using the bulk renderer

  1. build.sh to build the renderer (must have already built KeymanWeb in ../source/, ./build.sh -debug).
  2. Open index.html (via http, not via file, as otherwise fonts will not be accessible).
  3. If you want a touch layout, use Developer Tools to select the appropriate emulation and then reload the page.
  4. Choose whether you wish to render all layers or just the default layer for each keyboard.
  5. If desired, filter out keyboards by id (regex).
  6. Run the render.
  7. Save the result to a .html file, either before.html or after.html.
  8. When swapping versions, don't forget to rebuild.

compare.html

Compare allows you to load two runs of the renderer side-by-side (simply save the run to either before.html or after.html in this folder). It defaults to a width of 20% which you might need to tweak depending on the size of your display and the width of the OSK images.