SPB Git

Repository Public

make_linkedin_banner.py 5.7 KB 143 lines python

1#!/usr/bin/env python32# =============================================================================3#                  SP BOUCHER | SOFTWARE & RESEARCH4#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# PROJECT METADATA8# -----------------------------------------------------------------------------9# Project          : FB Ka Automation10# File             : assets/make_linkedin_banner.py11# Description      : Bannière LinkedIn Groupe KA — 1584x396, style og.png12#                    (crème/charbon/lime).13# Module           : assets14# Repository       : https://git.spboucher.ai/fb-ka-automation15# Created          : 2026-12-0116# Last Modified    : 2026-12-0117#18# =============================================================================19# AUTHOR & PROFESSIONAL AFFILIATION20# =============================================================================21#22# Author           : Simon-Pierre Boucher23# Position         : Professor of Finance24# Institution      : Université du Québec en Outaouais (UQO)25# Department       : Département des sciences administratives26# Organization     : SP Boucher27#28# Website          : https://spboucher.ai29# Git              : https://git.spboucher.ai30#31# =============================================================================32# OFFICIAL CONTACT DIRECTORY33# =============================================================================34#35# General          : info@spboucher.ai36# Professional     : contact@spboucher.ai37# Direct           : simon@spboucher.ai38# Research         : research@spboucher.ai39# Development      : dev@spboucher.ai40# Support          : support@spboucher.ai41# Security/Admin   : admin@spboucher.ai42# Notifications    : notifications@spboucher.ai43#44# Preferred Contact: contact@spboucher.ai45#46# =============================================================================47# COPYRIGHT & INTELLECTUAL PROPERTY48# =============================================================================49#50# Copyright (c) 202651# Simon-Pierre Boucher52#53# All rights reserved where applicable.54#55# This file is governed by the applicable project license,56# copyright notices, institutional agreements and relevant law.57#58# Unless expressly authorized by the applicable license or59# rights holder, copying, redistribution, sublicensing,60# publication and commercial exploitation are not permitted.61#62# Existing third-party rights and notices remain unaffected.63#64# =============================================================================65# CONFIDENTIALITY & SECURITY66# =============================================================================67#68# Classification   : Public69# Distribution     : Public repository; use is governed by the project license70# Security Contact : admin@spboucher.ai71#72# Access to this source does not independently grant permission73# to redistribute or disclose confidential materials.74#75# Do not embed credentials, private keys, access tokens,76# certificates or confidential personal information.77#78# =============================================================================79# LICENSE & MAINTENANCE80# =============================================================================81#82# License          : None specified (no license file in this repository)83# Maintainer       : Simon-Pierre Boucher84# Technical Contact: dev@spboucher.ai85#86# =============================================================================87# END OF SP BOUCHER SOURCE HEADER88# =============================================================================8990"""Bannière LinkedIn Groupe KA — 1584x396, style og.png (crème/charbon/lime)."""91from PIL import Image, ImageDraw, ImageFont9293CHARCOAL = (20, 24, 20)94LIME = (217, 242, 107)95CREAM = (242, 241, 234)96DARKGREEN = (16, 92, 70)97BLACK_F = "/System/Library/Fonts/Supplemental/Arial Black.ttf"98BOLD_F = "/System/Library/Fonts/Supplemental/Arial Bold.ttf"99MONO_F = "/System/Library/Fonts/Supplemental/Courier New Bold.ttf"100101W, H = 1584, 396102img = Image.new("RGB", (W, H), CREAM)103d = ImageDraw.Draw(img)104d.rounded_rectangle([12, 12, W - 12, H - 12], radius=20, outline=CHARCOAL, width=3)105106# Eyebrow107d.line([56, 62, 96, 62], fill=DARKGREEN, width=5)108d.text((112, 62), "É C O S Y S T È M E   · K A   ·   Q U É B E C",109       font=ImageFont.truetype(BOLD_F, 22), fill=DARKGREEN, anchor="lm")110111# Titre : Groupe [KA]112tf = ImageFont.truetype(BLACK_F, 92)113d.text((56, 110), "Groupe", font=tf, fill=CHARCOAL)114gw = d.textlength("Groupe", font=tf)115bx = int(56 + gw + 22)116box = Image.new("RGBA", (250, 140), (0, 0, 0, 0))117bd = ImageDraw.Draw(box)118bd.rounded_rectangle([0, 0, 249, 139], radius=26, fill=CHARCOAL)119bd.text((125, 70), "KA", font=ImageFont.truetype(BLACK_F, 92), fill=LIME, anchor="mm")120box = box.rotate(-3, expand=True, resample=Image.BICUBIC)121img.paste(box, (bx, 96), box)122123# Tagline124d.text((58, 250), "Mille sites. Un seul ·Ka.", font=ImageFont.truetype(BOLD_F, 42), fill=CHARCOAL)125d.text((58, 310), "10 agrégateurs + 1 moteur de recherche — 100 % automatisés, zéro boîte noire.",126       font=ImageFont.truetype(BOLD_F, 24), fill=(90, 95, 88))127128# Bloc charbon à droite avec domaines129d.rounded_rectangle([1020, 60, W - 40, H - 44], radius=20, fill=CHARCOAL)130mono = ImageFont.truetype(MONO_F, 22)131sites = ["trouve-ka.com", "lou-ka.com", "immo-ka.com", "vrai-prix.com", "auto-ka.com",132         "fabri-ka.com", "food-ka.com", "resto-ka.com", "sorti-ka.com", "crea-ka.com"]133x0, y0 = 1052, 86134col2 = 1300135for i, s in enumerate(sites):136    x = x0 if i < 5 else col2137    y = y0 + (i % 5) * 44138    d.text((x, y), s, font=mono, fill=LIME)139d.text((1052, H - 78), "WWW.GROUPE-KA.COM", font=ImageFont.truetype(MONO_F, 24), fill=CREAM)140141img.save("/Users/simon-pierreboucher/Desktop/fb-ka-automation/assets/linkedin_banner.png")142print("OK linkedin_banner.png")143
Files main
Menu

Theme