tis-notesnook-portable icon

notesnook

Paquet d’installation silencieuse pour notesnook

3.1.1-1

  • package: tis-notesnook-portable
  • name: notesnook
  • version: 3.1.1-1
  • maintainer: WAPT Team,Tranquil IT,Jordan ARNAUD
  • licence: GPL-3.0 license
  • target_os: linux
  • architecture: x64
  • signature_date:
  • size: 112.25 Mo
  • homepage : https://notesnook.com/

package           : tis-notesnook-portable
version           : 3.1.1-1
architecture      : x64
section           : base
priority          : optional
name              : notesnook
categories        : 
maintainer        : WAPT Team,Tranquil IT,Jordan ARNAUD
description       : Notesnook is a free (as in speech) and open source note taking app focused on user privacy and ease of use. To ensure zero knowledge principles, Notesnook encrypts everything on your device using XChaCha20-Poly1305 and Argon2
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : linux
min_wapt_version  : 
sources           : https://github.com/streetwriters/notesnook/releases
installed_size    : 
impacted_process  : 
description_fr    : Notesnook est une application de prise de notes libre et gratuite, axée sur la confidentialité et la facilité d'utilisation. Pour garantir le principe du "zéro connaissance", Notesnook crypte tout ce qui se trouve sur votre appareil à l'aide de XChaCha20-Poly1305 et Argon2
description_pl    : Notesnook to darmowa (jak w mowie) i otwarta aplikacja do robienia notatek, która koncentruje się na prywatności użytkownika i łatwości użytkowania. Aby zapewnić zerowe zasady wiedzy, Notesnook szyfruje wszystko na urządzeniu za pomocą XChaCha20-Poly1305 i Argon2
description_de    : Notesnook ist eine kostenlose (wie in Sprache) und Open-Source-Notiz-App, die sich auf den Datenschutz und die Benutzerfreundlichkeit konzentriert. Um das Nullwissen-Prinzip zu gewährleisten, verschlüsselt Notesnook alles auf Ihrem Gerät mit XChaCha20-Poly1305 und Argon2
description_es    : Notesnook es una aplicación de código abierto y gratuita para tomar notas centrada en la privacidad del usuario y la facilidad de uso. Para garantizar principios de conocimiento cero, Notesnook encripta todo en su dispositivo utilizando XChaCha20-Poly1305 y Argon2
description_pt    : O Notesnook é uma aplicação gratuita (como na fala) e de código aberto para tomar notas, centrada na privacidade do utilizador e na facilidade de utilização. Para garantir princípios de conhecimento zero, o Notesnook encripta tudo no seu dispositivo utilizando XChaCha20-Poly1305 e Argon2
description_it    : Notesnook è un'applicazione per prendere appunti gratuita (nel senso del termine) e open source, incentrata sulla privacy degli utenti e sulla facilità d'uso. Per garantire principi di conoscenza zero, Notesnook cripta tutto ciò che si trova sul dispositivo utilizzando XChaCha20-Poly1305 e Argon2
description_nl    : Notesnook is een gratis (als in spraak) en open source app voor het maken van notities, gericht op de privacy van de gebruiker en gebruiksgemak. Om te zorgen voor nul-kennis principes, versleutelt Notesnook alles op uw apparaat met behulp van XChaCha20-Poly1305 en Argon2
description_ru    : Notesnook - это бесплатное (в смысле речи) приложение для ведения заметок с открытым исходным кодом, ориентированное на конфиденциальность и простоту использования. Чтобы обеспечить принцип нулевого знания, Notesnook шифрует все на вашем устройстве с помощью XChaCha20-Poly1305 и Argon2
audit_schedule    : 
editor            : 
keywords          : 
licence           : GPL-3.0 license
homepage          : https://notesnook.com/
package_uuid      : a5407c5d-812f-4675-b1bd-a04ff660083a
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : c6ae74f2a7b373f8cbebf49bfa8c8c82e432f3971f696dc256041151ca950ed0
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-05-28T07:24:42.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         : FpYKSp+X7gpYq6fAoQBA+4742AOHKtlminXE/PWz1Rt5DMjDsLXixqrqk1NbWOJKkU7RYS8uTgepDM4SY/RCwyaXHSlF3fJHWLSglvXCMdRpxFLsBFGi8D2KGQBF1SzKRCZeg3TTr61y7AIG60gc3VT7rOPYvJM1M38DSg6EGmUm12r/Md5YbFhIUnZTKzSyMUTuZFBwORcBLWJQj2c0q4bl9PAJQBvQQ5Ag2dlxjgDp5feeZGOxyMTqCzpepHpSTeVhgqryUU1zJZTiYYgah+wkGdpi2q7Fs2pacBXII3ioKdGcLmiYFns9pZ+OwBf2CYSIc3UaFnBFM1KLhZyVtw==

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

    if not proxies:
        proxies = get_proxies_from_wapt_console()
   
    git_repo = "streetwriters/notesnook"
    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'Downloading '+ 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()

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
f91f60fc69326b7c7db31a05a9ddad902892f93cd91d9531b369d06adbd88100 : WAPT/control
c6ae74f2a7b373f8cbebf49bfa8c8c82e432f3971f696dc256041151ca950ed0 : WAPT/icon.png
a1da5add2a0d56c804f07742f1a9386d3f7004f68d77fb6e08c98395dffba3c5 : luti.json
187571b61b2dbd5333cd789d254b17e5b23cf8bbb6a715843cf119ac6961f89b : notesnook_linux_x86_64.AppImage
223fa6ca0b4ed15f7d1a2e29893619511e043c7907d145e8c8991405677bb4e1 : setup.py
c3f23c8f4a75c133744c2a3910e5d589b8bbf9a488c714533196d369b1920004 : update_package.py