Haiku
Develop bash script templates to automate screenshots
This task is to explore application scripting with 'hey' to automate re-taking of userguide screenshots. Develop a few examples that can be used as templates for subsequent tasks for all the user guide images.
Take notes of your experience. That'll help the students for the subsequent tasks.
Rough outline of the script:
Usage: hey-shoot-{imagename}.sh {path-to-userguide-lang-abbrev}
e.g. hey-shoot-textsearch.sh /Source-Haiku/haiku/docs/userguide/en
- Print error if original image doesn't exist and exit
- Rename original image to "*.orig"
- Launch app
- Arrange window
- Take and save screenshot (if the image needs manual editing, append "_needs_editing")
- Echo paths to original and new image
- Quit app
Required skills
- Basic knowledge of bash scripting
Required setup
For this task you need to have:
- A Haiku beta image installed.
- The user guide installed (it's in HaikuDepot).
Recommended reading and help
- The Scripting Chapter PDF, 900 KiB of Scot Hacker's BeOS Bible.
- The blog post Application scripting with 'hey'.
Task tags
Students who completed this task
BachToTheFuture