tis-cherrytree icon

cherrytree

Silent install package for cherrytree

1.7.0-1

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-cherrytree
  • name: cherrytree
  • version: 1.7.0-1
  • maintainer: Administrator
  • licence: GPL-3.0-or-later
  • target_os: linux
  • architecture: x64
  • signature_date:
  • size: 103.99 Mo
  • homepage : https://www.giuspen.com/cherrytree/

package           : tis-cherrytree
version           : 1.7.0-1
architecture      : x64
section           : base
priority          : optional
name              : cherrytree
categories        : 
maintainer        : Administrator
description       : Cherrytree is a free and open source, hierarchical, note-taking application. It can store text, images, files, links, tables, and executable snippets of code. This application is under active development
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : linux
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Cherrytree est une application libre et gratuite de prise de notes hiérarchiques. Elle peut stocker du texte, des images, des fichiers, des liens, des tableaux et des extraits de code exécutables. Cette application est en cours de développement
description_pl    : Cherrytree to darmowa i otwarta, hierarchiczna aplikacja do tworzenia notatek. Może przechowywać tekst, obrazy, pliki, linki, tabele i wykonywalne fragmenty kodu. Aplikacja ta jest aktywnie rozwijana
description_de    : Cherrytree ist eine freie und quelloffene, hierarchische Anwendung zur Erstellung von Notizen. Sie kann Texte, Bilder, Dateien, Links, Tabellen und ausführbare Codeschnipsel speichern. Diese Anwendung befindet sich in aktiver Entwicklung
description_es    : Cherrytree es una aplicación jerárquica y gratuita de código abierto para tomar notas. Puede almacenar texto, imágenes, archivos, enlaces, tablas y fragmentos de código ejecutables. Esta aplicación está en desarrollo activo
description_pt    : O Cherrytree é uma aplicação de anotações hierárquica, gratuita e de código aberto. Pode armazenar texto, imagens, ficheiros, ligações, tabelas e fragmentos de código executáveis. Esta aplicação está em desenvolvimento ativo
description_it    : Cherrytree è un'applicazione gratuita e open source per prendere appunti in modo gerarchico. Può memorizzare testo, immagini, file, collegamenti, tabelle e frammenti di codice eseguibili. Questa applicazione è in fase di sviluppo attivo
description_nl    : Cherrytree is een gratis en open source, hiërarchische applicatie voor het maken van notities. Het kan tekst, afbeeldingen, bestanden, links, tabellen en uitvoerbare stukjes code opslaan. Deze toepassing wordt actief ontwikkeld
description_ru    : Cherrytree - это бесплатное и открытое приложение для ведения иерархических заметок. В нем можно хранить текст, изображения, файлы, ссылки, таблицы и исполняемые фрагменты кода. Это приложение находится в стадии активной разработки
audit_schedule    : 
editor            : 
keywords          : 
licence           : GPL-3.0-or-later
homepage          : https://www.giuspen.com/cherrytree/
package_uuid      : 25c4de15-455e-4dc0-9a42-13e2cd4e9306
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 1250ccdeffbb36b34dbc546142e442d3f4960f43cf970f15ffdfa6999427d7f5
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-05-23T22:55:02.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         : fet5/W1P5iazIsg8+5Uyp2oFBPRIrsHoGAZyZiJJrO8AUXH0rgEh/RzyY70y96CEEYHedfx/yQzMr8wxzOc5qGXdPMb9FOPf1s7vXmX0o5a68SqbhVfyYHImGtowgdH/RV+ZLivqNJ1j/7wkWNYJcO+XvEndQebZ1RP5s8G5BXuN9wXljGJGAYY05BhdVOjyIF5vwrdIvlgYZaXr/YdNNLVULz7DO45g/CuC4dvDx2Ce3tLazCbB561QWIvoCTOcs7fv87pHyZ8W0gqc+88qLKGCc1V0KAPHsS1iMFlpEd6d9i+DfqGeyNdkgwBbKto3Ua5ZxVIZJnJsDUEKDVUktw==

# -*- 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()
    dict_arch ={
        "x64" :"x86_64.AppImage"
    }

    git_repo = "giuspen/cherrytree"
    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') and dict_arch[control.architecture] in download["browser_download_url"]:
            url_dl = download["browser_download_url"]
            version = json_load["tag_name"].replace("v","")
            filename = download["name"]
            break

    if not isfile(filename):
        package_updated = True
        print(f'Download {filename}')
        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()

100ad179f5734bfda76db4b409861efe59dbe95aabe47d3c3acbad0fd9d348d2 : CherryTree-1.7.0-x86_64.AppImage
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
7f6ea337096c237d3f5d3239381d1f0a46f7e5075d350df0a12066f964bb232c : WAPT/control
1250ccdeffbb36b34dbc546142e442d3f4960f43cf970f15ffdfa6999427d7f5 : WAPT/icon.png
efd70bde3602b165371e842cdb7e0779e1e75426a0495563abb5cd16958c61aa : luti.json
223fa6ca0b4ed15f7d1a2e29893619511e043c7907d145e8c8991405677bb4e1 : setup.py
052b78e55631fc769c35197694620d802bcc0ba2fbdaea1f11f65c73262bd4ed : update_package.py