# Screenshots for bnchelp.html
Scripts that produce the figures of `src/bnchelp.html` with the current BNC
build: BNC's GUI runs on a virtual X display (Xvfb + openbox), is configured
with the example configurations, driven with xdotool and photographed with
ImageMagick. Figure numbers are those of `bnchelp.html`.
| File | Content |
|---|---|
| `start_display.sh` | starts (`stop`: ends) Xvfb 2600x1800 and openbox on `:99` |
| `shoot.py` | driver: helpers, BNC instances, options |
| `jobs.py` | one job per figure (or group of figures), click positions |
| `viewer.py` | small text window, shows the concatenation log in Figure 15 |
## Requirements
- BNC built (`./bnc`), network access for the live figures
- ImageMagick (`import`, `convert`, `montage`, `composite`), Python 3 with tkinter
- Figure 17: Perl modules of `scripts/compareSP3Plot.pl` and gnuplot
- Xvfb, openbox, xdotool: from the system if installed, otherwise
`start_display.sh` downloads the Debian/Ubuntu packages with `apt-get download`
(no root needed) and unpacks them into `~/.cache/bnc_screenshot_tools`
(`BNC_SHOT_PREFIX`); the package names are those of Ubuntu 22.04
## Usage
```
scripts/helpScreenshots/start_display.sh
scripts/helpScreenshots/shoot.py --list
scripts/helpScreenshots/shoot.py --user bkg # all jobs, ~1 h
scripts/helpScreenshots/shoot.py --user bkg fig09 fig23_26 # selected jobs
scripts/helpScreenshots/shoot.py --user bkg --install # and copy to src/IMG
scripts/helpScreenshots/start_display.sh stop
```
The images are written to `/tmp/bnc_screenshots/out` (`--work`); check them
before installing. After `--install`, rebuild BNC: the help with its images is
compiled in (`src/bnc.qrc`, which lists every image).
## Live streams
Jobs marked `live` (`--list`) connect to igs-ip.net and products.igs-ip.net.
`--user` replaces `Example:Configs` of the example configurations by that
account; its password comes from the credentials file (`~/.netrc` or option
`credentialsFile`), never from the command line. The example account itself
only works on igs-ip.net. An account may be limited to about 20 simultaneous
connections (Figures 34/35 use 20 streams). Nothing is uploaded: the upload
panels (30, 32, 33) are shown without starting.
The real-time PPP jobs (23-26, 29) run 20 minutes each for a converged
solution.
## When the GUI changes
The click positions in `jobs.py` are client coordinates of the main window
(1200x850, Qt Fusion style, English locale). If a panel's layout changes, take
a screenshot of it (e.g. with a job that only calls `panel()`), read the new
position and adapt the constant. Not part of the scripts: the diagrams
(Figures 1-4, 6, 20).