tis-cherrytree

1.5.0-1
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
935 downloads
Download
See build result See VirusTotal scan
tis-cherrytree icon
  • package : tis-cherrytree
  • name : cherrytree
  • version : 1.5.0-1
  • categories :
  • maintainer : Administrator
  • editor :
  • licence : GPL-3.0-or-later
  • locale :
  • target_os : linux
  • impacted_process :
  • architecture : x64
  • signature_date : 2025-06-08 23:00
  • size : 103.82 Mo
  • homepage : https://www.giuspen.com/cherrytree/
package           : tis-cherrytree
version           : 1.5.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          : PROD
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      : 91b3d65b-43fa-4a50-82a1-0f33d40f6462
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 1250ccdeffbb36b34dbc546142e442d3f4960f43cf970f15ffdfa6999427d7f5
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-06-08T23:00:25.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         : p93hlHgJMWrh0ymqfPJZNjq6MEoLfRLaaquxyIz/x2FYA7WBIS9IXECs/wAlWwOCBvpnrcRdaFvZEHw7fuBg0U3tyNLyO4R0Y8lr5nZq/sqplRjDKo6JSfM4qTNb7b2cmxDVTzM+HPExo1tDCEc8as1vZaOhK8Sw6abGqK6hi0zR+cPKvSJ0DPcQkcXxw3uDB9daR5W6NBi8ya4+3I1I3UcRR6t/NDyoa9K8Zrg0XdSMO5MmGeu4f1+3RfQwhD/byiESTu4Vaae+Hure7X6FFISzZz64o7ybNX9BUdowGnfHlfcgheORg0GYMCUC+9iO6NAeNL5UQXb4QNAjCgEAEA==
# -*- 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()
cf2344a6e1574877cd37dc77caad414bd0805f3e2cd431b8e6823f2cbf4b1a03 : CherryTree-1.5.0-x86_64.AppImage
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
51b9cb3412c7a17ed1c6caad2a8375b599f52024ccfef3d4642f5454daafebcc : WAPT/control
1250ccdeffbb36b34dbc546142e442d3f4960f43cf970f15ffdfa6999427d7f5 : WAPT/icon.png
07b9694ef71744bdc78357986637aa689c7d968bac7e8f8262442c34884bf5e7 : luti.json
223fa6ca0b4ed15f7d1a2e29893619511e043c7907d145e8c8991405677bb4e1 : setup.py
052b78e55631fc769c35197694620d802bcc0ba2fbdaea1f11f65c73262bd4ed : update_package.py