tis-colour-contrast-analyser

3.5.4-1
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
920 téléchargements
Télécharger
Voir le résultat de la construction Voir l'analyse de VirusTotal
tis-colour-contrast-analyser icon
  • package : tis-colour-contrast-analyser
  • name : Colour-Contrast-Analyser
  • version : 3.5.4-1
  • categories :
  • maintainer : Jordan ARNAUD
  • editor :
  • licence : GNU GENERAL PUBLIC LICENSE
  • locale :
  • target_os : linux
  • impacted_process :
  • architecture : x64
  • signature_date : 2024-09-11 13:20
  • size : 83.86 Mo
  • homepage : https://www.tpgi.com/color-contrast-checker/
package           : tis-colour-contrast-analyser
version           : 3.5.4-1
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          : PROD
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      : d8858233-e5ff-4b77-8076-e7a67cc4afa4
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 3bb1a9b9c30e5c252bb2bdd528063ab077951c66c38378947555a6e0f7c637cd
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-09-11T13:20:49.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         : Yi45xrqbzUmn4g7tvhw9gzLwJCjrAmCJiLOwBAFFOtCsPcmqZZXcM7DKYt7aK+LKjjKtJrrMyIl+zoCX3ZxxKRrMdPgzMBLGztldwikFFy8aBJIlCkliW0KHQ5M7GuyPzioI8FXTqTsukSLmr2jrTnOBTOR+nVoAWtajAU7dIVK/hCOpCwi3ZoynQeUSU3vBP4GXNxBxFeV7gX8PTge9EkWgUN0+AYwFvwDZTwOzwJttN8FoWoxD/YGxYnC2lWYM67nxNfr7LZi0iGrYNbnFnhGfZUrkZg41TPlKySQJQgdPrwHjL2xk5xpYTZtmSuWlBvRAQSm9iO8PRJqRkho+UA==
# -*- 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()
0cda323d387872af3b77413933229c9ac48f719cc079ba122fd26da8bd3c4e7d : Colour-Contrast-Analyser-Setup-3.5.4.AppImage
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
eeadfb1e5abddf08328d49c9105ae390eb83575ea7e75e02b786366ce61fe4ed : WAPT/control
3bb1a9b9c30e5c252bb2bdd528063ab077951c66c38378947555a6e0f7c637cd : WAPT/icon.png
c1dbe807acec5a85b130337aef876a9ffbf5da0606a05cc477bf95622999146b : luti.json
223fa6ca0b4ed15f7d1a2e29893619511e043c7907d145e8c8991405677bb4e1 : setup.py
f153cf67168293c0076dcd16ce7bceda1e53cd08d9878a409ab0e5c6215a4b47 : update_package.py