Repository Public
1#!/usr/bin/env bash2# =============================================================================3# SP BOUCHER | SOFTWARE & RESEARCH4# ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project : GroupeKa-iOS8# File : Scripts/shots.sh9# Module : Scripts10# Repository : https://git.spboucher.ai/groupe-ka-ios11# Project Website : Not specified12# Created : 2026-12-0313# Last Modified : 2026-12-0314#15# Author : Simon-Pierre Boucher16# Position : Professor of Finance17# Institution : Université du Québec en Outaouais (UQO)18# Organization : SP Boucher19# Website : https://spboucher.ai20# Git : https://git.spboucher.ai21#22# Preferred Contact: contact@spboucher.ai23# Development : dev@spboucher.ai24# Support : support@spboucher.ai25# Security/Admin : admin@spboucher.ai26#27# Copyright (c) 202628# Simon-Pierre Boucher29# All rights reserved where applicable. This file is governed by the30# applicable project license, copyright notices and relevant law.31# Existing third-party rights and notices remain unaffected.32#33# License : None specified (no license file in this repository)34#35# Do not embed credentials, private keys, access tokens,36# certificates or confidential personal information.37#38# =============================================================================39# END OF SP BOUCHER SOURCE HEADER40# =============================================================================4142# Tournée de captures d'écran sur un simulateur, par arguments de lancement (aucun pilotage d'interface).43# usage : shots.sh <préfixe> [clair|sombre] (GROUPEKA_SIM pour le simulateur, ONLY="stats api" pour filtrer,44# FIXTURES=1 pour lire les réponses capturées de GroupeKaTests/Fixtures au lieu du réseau)45set -uo pipefail46cd "$(dirname "$0")/.."47P="${1:-tour}"; MODE="${2:-clair}"48SIM="${GROUPEKA_SIM:-GroupeKa iPhone}"49U="$(xcrun simctl list devices | grep -F "$SIM (" | head -1 | sed -E 's/.*\(([0-9A-F-]{36})\).*/\1/')"50xcrun simctl boot "$U" 2>/dev/null; xcrun simctl bootstatus "$U" >/dev/null 2>&151xcrun simctl ui "$U" appearance "$([ "$MODE" = clair ] && echo light || echo dark)"52[ -n "${FIXTURES:-}" ] && export SIMCTL_CHILD_GK_FIXTURES_DIR="$PWD/GroupeKaTests/Fixtures"53shot() { # nom, attente, arguments…54 local name="$1" wait="$2"; shift 255 if [ -n "${ONLY:-}" ]; then local ok=0; for o in $ONLY; do case "$name" in "$o"*) ok=1;; esac; done; [ $ok = 1 ] || return 0; fi56 GROUPEKA_SIM="$SIM" Scripts/build.sh run -GKCalme YES "$@" >/dev/null 2>&157 sleep "$wait"58 xcrun simctl io "$U" screenshot "build/shots/$P-$name.png" >/dev/null 2>&1 && echo "build/shots/$P-$name.png"59}60shot rotonde 561# la transition signature, instants figés (ms) : la rotonde tourne, le battant pivote, le symbole entre, la pièce se teinte62for T in 300 700 1100 1500 2100 2900; do shot "rotonde-vraiprix-$T" 4 -GKPorte vraiprix -GKRotondeT "$T"; done63shot rotonde-louka 5 -GKPorte louka64shot rotonde-valoplex 5 -GKPorte valoplex65shot piece-louka 7 -GKOuvrir piece/lou-ka66shot piece-valoplex 7 -GKOuvrir piece/valo-plex67shot stats 8 -GKTab stats68shot stats-sites 8 -GKTab stats -GKAncre sites69shot tableau-louka 8 -GKOuvrir stats/louka70for A in series comparaisons repartitions distributions jauges activite tableaux records; do shot "tableau-louka-$A" 8 -GKOuvrir stats/louka -GKAncre "$A"; done71shot tableau-foodka 8 -GKOuvrir stats/foodka72shot tableau-foodka-methode 8 -GKOuvrir stats/foodka -GKAncre methode73shot tableau-immoka-panneau 8 -GKOuvrir stats/immoka -GKAncre panneau-vraiprix74shot comparateur 9 -GKOuvrir stats/comparateur75shot api 8 -GKTab api76shot api-reference 8 -GKTab api -GKAncre reference77shot api-route 9 -GKOuvrir api/route/observatoire78shot api-console 10 -GKOuvrir api/route/observatoire -GKEnvoyer YES -GKAncre console79shot api-recherche 10 -GKOuvrir api/recherche -GKQ sherbrooke80shot reglages 6 -GKOuvrir reglages81