Repository Public
1#!/usr/bin/env bash2# =============================================================================3# SP BOUCHER | INFRASTRUCTURE & AUTOMATION4# ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project : Valo-Plex iOS8# File : Scripts/shots.sh9# Description : tournée de captures d'écran sur un simulateur, par10# arguments de lancement (aucun pilotage d'interface). usage11# : shots.sh <préfixe> (VALOPLEX_SIM pour le simulateur,12# ONLY="fiche marche" pour filtrer)13# Module : Scripts14# Repository : https://git.spboucher.ai/valo-plex-ios15# Project Website : https://www.valo-plex.com16# Created : 2026-12-0117# Last Modified : 2026-12-0118#19# Author : Simon-Pierre Boucher20# Position : Professor of Finance21# Institution : Université du Québec en Outaouais (UQO)22# Organization : SP Boucher23# Website : https://spboucher.ai24# Git : https://git.spboucher.ai25#26# Preferred Contact: support@spboucher.ai27# Technical Contact: dev@spboucher.ai28# Security/Admin : admin@spboucher.ai29#30# Copyright (c) 202631# Simon-Pierre Boucher32# All rights reserved where applicable. This file is governed by the33# applicable project license, copyright notices and relevant law.34# Existing third-party rights and notices remain unaffected.35#36# License : None specified (no license file in this repository)37#38# Do not embed credentials, private keys, access tokens,39# certificates or confidential personal information.40#41# =============================================================================42# END OF SP BOUCHER SOURCE HEADER43# =============================================================================4445set -uo pipefail46cd "$(dirname "$0")/.."47P="${1:-tour}"48export VALOPLEX_SIM="${VALOPLEX_SIM:-ValoPlex iPhone}"49U="$(xcrun simctl list devices | grep -F "$VALOPLEX_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 light52FERME="${FERME:-66023003702256660000000}" # 2335-2339, rue Wellington, Montréal : valeur ferme53ANNONCE="${ANNONCE:-66023993679911240000000}" # 3026-3030, rue Rushbrooke : ordre de grandeur, en vente54shot() { # nom, attente, arguments…55 local name="$1" wait="$2"; shift 256 if [ -n "${ONLY:-}" ]; then local ok=0; for o in $ONLY; do case "$name" in "$o"*) ok=1;; esac; done; [ $ok = 1 ] || return 0; fi57 Scripts/build.sh run "$@" >/dev/null 2>&158 sleep "$wait"59 xcrun simctl io "$U" screenshot "build/shots/$P-$name.png" >/dev/null 2>&1 && echo "build/shots/$P-$name.png"60}61shot fiche 9 -VXOpen "immeuble/$FERME"62for A in role revenu calculateur ventes carte marche; do shot "fiche-$A" 9 -VXOpen "immeuble/$FERME" -VXAnchor "$A"; done63shot fiche-ordre 9 -VXOpen "immeuble/$ANNONCE"64shot fiche-annonce 9 -VXOpen "immeuble/$ANNONCE" -VXAnchor annonce65shot fiche-abstention 9 -VXOpen "immeuble/${ABSTENTION:-97040487428299100000000}"66shot fiche-introuvable 7 -VXOpen "immeuble/00000000000000000000000"67shot accueil 8 -VXTab recherche68shot recherche 8 -VXTab recherche -VXQuery "2335 wellington"69shot recherche-vide 8 -VXTab recherche -VXQuery "99999 rue inexistante"70shot annonces 10 -VXTab annonces71shot annonces-filtre 10 -VXTab annonces -VXRegion 06 -VXClasse triplex72shot marche 9 -VXTab marche73shot region 9 -VXTab marche -VXOpen region/montreal74shot region-taux 9 -VXTab marche -VXOpen region/montreal -VXAnchor taux75shot calcul 9 -VXTab calcul76shot calcul-fiche 9 -VXTab calcul -VXOpen calculateur77shot methode 9 -VXTab methode78shot cadre 6 -VXTab methode -VXOpen cadre/confidentialite79shot accueil-chiffres 9 -VXTab recherche -VXAnchor chiffres80shot annonces-cartes 11 -VXTab annonces -VXAnchor cartes81shot marche-taux 9 -VXTab marche -VXAnchor taux82shot calcul-resultat 9 -VXTab calcul -VXAnchor resultat83shot calcul-revenu 9 -VXTab calcul -VXAnchor revenu84shot methode-tableaux 9 -VXTab methode -VXAnchor tableaux85shot methode-limites 9 -VXTab methode -VXAnchor limites86for T in 250 520 800 1000; do shot "ouverture-$T" 4 -VXOuverture "$T"; done87shot fiche-etablie 9 -VXOpen "immeuble/$FERME" -VXAnchor etablie88shot carte 14 -VXTab carte89shot carte-rue 14 -VXTab carte -VXCarte "45.4753,-73.5611,16.6"90shot carte-plan 12 -VXTab carte -VXPlan YES91shot carte-plan-rue 12 -VXTab carte -VXPlan YES -VXCarte "45.4753,-73.5611,16.6"92for T in 300 600 800; do shot "fiche-geste-$T" 8 -VXOpen "immeuble/$FERME" -VXFacade "$T" -VXOuverture non; done93