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:

Recommended reading and help

Task tags

  • bash
  • scripting

Students who completed this task

BachToTheFuture

Task type

  • code Code
close

2018