Repository Public
1#!/bin/bash2# =============================================================================3# SP BOUCHER | INFRASTRUCTURE & AUTOMATION4# ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project : FB Ka Automation8# File : posts/run_stats_img.sh9# Module : posts10# Repository : https://git.spboucher.ai/fb-ka-automation11# Created : 2026-12-0112# Last Modified : 2026-12-0113#14# Author : Simon-Pierre Boucher15# Position : Professor of Finance16# Institution : Université du Québec en Outaouais (UQO)17# Organization : SP Boucher18# Website : https://spboucher.ai19# Git : https://git.spboucher.ai20#21# Preferred Contact: contact@spboucher.ai22# Technical Contact: dev@spboucher.ai23# Security/Admin : admin@spboucher.ai24#25# Copyright (c) 202626# Simon-Pierre Boucher27# All rights reserved where applicable. This file is governed by the28# applicable project license, copyright notices and relevant law.29# Existing third-party rights and notices remain unaffected.30#31# License : None specified (no license file in this repository)32#33# Do not embed credentials, private keys, access tokens,34# certificates or confidential personal information.35#36# =============================================================================37# END OF SP BOUCHER SOURCE HEADER38# =============================================================================3940set -u41WIN=1393942LOG=/tmp/ka_posts/stats_img.log43: > "$LOG"44declare -a PAIRS=(45 "24-stats-vrai-prix.txt vrai-prix.png"46 "25-stats-auto-ka.txt auto-ka.png"47 "26-stats-fabri-ka.txt fabri-ka.png"48 "27-stats-food-ka.txt food-ka.png"49 "28-stats-resto-ka.txt resto-ka.png"50 "29-stats-sorti-ka.txt sorti-ka.png"51 "30-stats-crea-ka.txt crea-ka.png"52 "21-stats-trouve-ka.txt trouve-ka.png"53)54for pair in "${PAIRS[@]}"; do55 set -- $pair56 f="/tmp/ka_posts/$1"; img="/tmp/ka_shots/$2"57 echo "=== $1 + $2 ===" >> "$LOG"58 if /tmp/ka_posts/fb_post_img.sh "$f" "$img" $WIN >> "$LOG" 2>&1; then59 echo "SUCCESS $1" >> "$LOG"60 else61 echo "FAILED $1 (pas de retry auto — vérifier doublon)" >> "$LOG"62 fi63 sleep 3064done65echo "=== TERMINÉ ===" >> "$LOG"66