tis-colour-contrast-analyser icon

Colour Contrast Analyser

Silent install package for Colour Contrast Analyser

3.5.5-2

Preprod packages are packages built on LUTI. They remain in PREPROD usually for 5 days, after which a second VirusTotal scan is performed to verify that the status has not changed.
If the package passes this last check, it is promoted to PROD and published on the store.

  • package: tis-colour-contrast-analyser
  • name: Colour Contrast Analyser
  • version: 3.5.5-2
  • maintainer: Jordan ARNAUD
  • licence: GNU GENERAL PUBLIC LICENSE
  • target_os: linux
  • architecture: x64
  • signature_date:
  • size: 88.15 Mo
  • homepage : https://www.tpgi.com/color-contrast-checker/

package           : tis-colour-contrast-analyser
version           : 3.5.5-2
architecture      : x64
section           : base
priority          : optional
name              : Colour Contrast Analyser
categories        : 
maintainer        : Jordan ARNAUD
description       : The Colour Contrast Analyser (CCA) helps you determine the legibility of text and the contrast of visual elements, such as graphical controls and visual indicators
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : linux
min_wapt_version  : 
sources           : https://github.com/ThePacielloGroup/CCAe/releases
installed_size    : 
impacted_process  : 
description_fr    : L'analyseur de contraste des couleurs (CCA) vous aide à déterminer la lisibilité du texte et le contraste des éléments visuels, tels que les contrôles graphiques et les indicateurs visuels
description_pl    : Analizator kontrastu kolorów (CCA) pomaga określić czytelność tekstu i kontrast elementów wizualnych, takich jak graficzne elementy sterujące i wskaźniki wizualne
description_de    : Der Colour Contrast Analyser (CCA) hilft Ihnen, die Lesbarkeit von Text und den Kontrast von visuellen Elementen, wie z. B. grafischen Bedienelementen und visuellen Anzeigen, zu bestimmen
description_es    : El analizador de contraste de color (CCA) le ayuda a determinar la legibilidad del texto y el contraste de los elementos visuales, como los controles gráficos y los indicadores visuales
description_pt    : O Analisador de Contraste de Cores (CCA) ajuda-o a determinar a legibilidade do texto e o contraste dos elementos visuais, tais como controlos gráficos e indicadores visuais
description_it    : Il Colour Contrast Analyser (CCA) aiuta a determinare la leggibilità del testo e il contrasto degli elementi visivi, come i controlli grafici e gli indicatori visivi
description_nl    : De Colour Contrast Analyser (CCA) helpt je bij het bepalen van de leesbaarheid van tekst en het contrast van visuele elementen, zoals grafische besturingselementen en visuele indicatoren
description_ru    : Анализатор цветового контраста (CCA) поможет вам определить разборчивость текста и контрастность визуальных элементов, таких как графические элементы управления и визуальные индикаторы
audit_schedule    : 
editor            : 
keywords          : 
licence           : GNU GENERAL PUBLIC LICENSE
homepage          : https://www.tpgi.com/color-contrast-checker/
package_uuid      : 0c2f6677-f5d5-42d5-ac0c-e73b29e0707c
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 3bb1a9b9c30e5c252bb2bdd528063ab077951c66c38378947555a6e0f7c637cd
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-11-06T13:41:27.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : T9jylrjndntITtFpxtGvsLzzyRMlJkiex/mjRY2F2eKCcQejM1lW66Q5FZkxxzekj1EeIRKy026aL4jIwE/PxPTcw6UKYiK+Da6mZ2+aiCZsYnrIthksMeqCZWOnHofIT0wtBA2si/2HiNLhY3HCSC9a7C+Q8iaBeq4bZ2uwL2384G2WSGcGoS2CtSmhbbJW5wv5fbBr3bHydQg6wvPfJTkdvSoltOgO2Jc4/DR3+7J7RmMnFGITm/kMl/QhsUCQ3NS+fEP9xT5flmypMV8BxZL2u/AT+IRJVDVZ/dUWFZk/b+gVQ3W9IHhLSJ+xhVGItUX0pddRF2zzTM9LNSjGpw==

# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2024
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *
from iniparse import ConfigParser
import os


def install():
    install_dir = makepath('/','opt',control.package.split('-',1)[1])
    appimage = glob.glob("*.AppImage")[0]
    install_appimage(appimage,install_dir)

def uninstall():
    install_dir = makepath('/','opt',control.package.split('-',1)[1])
    uninstall_appimage(install_dir)

def install_appimage(appimage,install_dir,binaliasname=None):
    run('chmod a+x ./' + appimage)

    if isdir(install_dir):
        uninstall_appimage(install_dir)

    mkdirs(install_dir)

    name_appimage = appimage.split('/')[-1]
    filecopyto(appimage, makepath(install_dir, name_appimage))
    run('"./%s" --appimage-extract' % appimage)
    

    for desktop in glob.glob(makepath('squashfs-root','*.desktop')):
 
        desktop_cp = ConfigParser()
        desktop_cp.optionxform = str
        desktop_file = open(desktop, encoding="utf-8")
        desktop_cp.readfp(desktop_file)
        bin_path = desktop_cp.get('Desktop Entry',"Exec")

        newbin_path = install_dir + '/' + name_appimage
        if ' %' in bin_path:
            newbin_path = newbin_path + ' %' + bin_path.split(' %',1)[1]

        icon_path = desktop_cp.get('Desktop Entry',"Icon")

        srcicon = makepath('squashfs-root',icon_path +'.svg')
        if not isfile(srcicon):
            srcicon = makepath('squashfs-root',icon_path +'.png')

        if not isfile(srcicon):
            lstglob = glob.glob(makepath('squashfs-root','*.svg'))
            if lstglob :
                srcicon=lstglob[0]

        if not isfile(srcicon):
            lstglob = glob.glob(makepath('squashfs-root','*.png'))
            if lstglob :
                srcicon=lstglob[0]
            else:
                srcicon = None

        if srcicon:            
            new_icon = install_dir + '/' + srcicon.split('/')[-1]
            filecopyto(srcicon,new_icon)
            desktop_cp.set('Desktop Entry',"Icon",new_icon) 

        desktop_cp.set('Desktop Entry',"Exec",newbin_path)
       
        with open(desktop, 'w', encoding="utf-8") as f:
            desktop_cp.write(f)

        pathdesk = makepath(install_dir,desktop.split('/')[-1])
        filecopyto(desktop, pathdesk)
        run('chown root:root "%s" ' % pathdesk)

    for f in glob.glob(makepath(install_dir,'*.desktop')):
        run('ln -sf "%s" "/usr/share/applications/%s"' % (f,f.split('/')[-1]))

    if binaliasname :
        run(f"ln -sf {install_dir}/{name_appimage} /usr/bin/{binaliasname}")

    remove_tree('squashfs-root')

def uninstall_appimage(install_dir):

    if not glob.glob(makepath(install_dir,'*.desktop')):
        error('.desktop not found')

    for f in glob.glob(makepath(install_dir,'*.desktop')):
        deskfile = f.split('/')[-1]
        system_desktop = makepath("/","usr","share","applications",deskfile)
        if isfile(system_desktop):
            remove_file(system_desktop)
    remove_tree(install_dir)

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import json

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def update_package():
    result = False
    proxies = get_proxies()

    if not proxies:
        proxies = get_proxies_from_wapt_console()
      
    git_repo = "ThePacielloGroup/CCAe"
    url_api = "https://api.github.com/repos/%s/releases/latest" % git_repo   
    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if download["browser_download_url"].endswith('.AppImage') :
            url_dl = download["browser_download_url"]
            version = json_load["name"]
            filename = download["name"]
            break

    if not isfile(filename):
        package_updated = True
        wget(url_dl,filename,proxies=proxies)

    #nettoyer les fichiers temporaires
    for f in glob.glob('*.AppImage'):
        if f != filename:
            remove_file(f)

    control.set_software_version(version)
    control.save_control_to_wapt()

88264e94c770515469ca2a669645643b898fd1d43fa293a200efd5309ea0ff63 : Colour-Contrast-Analyser-Setup-3.5.5.AppImage
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
57664bf55fe7253a7c219dde5c22661a4d35745095dc37bf5eeef2aa96d2aa7a : WAPT/control
3bb1a9b9c30e5c252bb2bdd528063ab077951c66c38378947555a6e0f7c637cd : WAPT/icon.png
02cc13366fa169b182efe18ceca24c5dba98bc9597f32f1a6da4cf041d127825 : luti.json
223fa6ca0b4ed15f7d1a2e29893619511e043c7907d145e8c8991405677bb4e1 : setup.py
f153cf67168293c0076dcd16ce7bceda1e53cd08d9878a409ab0e5c6215a4b47 : update_package.py