tis-logseq-portable icon

Logseq

Paquet d’installation silencieuse pour Logseq

0.10.9-1

  • package: tis-logseq-portable
  • name: Logseq
  • version: 0.10.9-1
  • maintainer: Jordan ARNAUD
  • licence: GNU AFFERO GENERAL PUBLIC LICENSE
  • target_os: linux
  • architecture: x64
  • signature_date:
  • size: 180.26 Mo
  • homepage : https://logseq.com/

package           : tis-logseq-portable
version           : 0.10.9-1
architecture      : x64
section           : base
priority          : optional
name              : Logseq
categories        : 
maintainer        : Jordan ARNAUD
description       : Logseq is a platform for knowledge management and collaboration. It focuses on privacy, longevity, and user control
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : linux
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Logseq est une plateforme de gestion des connaissances et de collaboration. Elle met l'accent sur la protection de la vie privée, la longévité et le contrôle par l'utilisateur
description_pl    : Logseq to platforma do zarządzania wiedzą i współpracy. Koncentruje się na prywatności, długowieczności i kontroli użytkownika
description_de    : Logseq ist eine Plattform für Wissensmanagement und Zusammenarbeit. Sie konzentriert sich auf Datenschutz, Langlebigkeit und Benutzerkontrolle
description_es    : Logseq es una plataforma para la gestión del conocimiento y la colaboración. Se centra en la privacidad, la longevidad y el control del usuario
description_pt    : A Logseq é uma plataforma de gestão do conhecimento e de colaboração. Centra-se na privacidade, longevidade e controlo do utilizador
description_it    : Logseq è una piattaforma per la gestione della conoscenza e la collaborazione. Si concentra sulla privacy, sulla longevità e sul controllo degli utenti
description_nl    : Logseq is een platform voor kennisbeheer en samenwerking. Het richt zich op privacy, duurzaamheid en gebruikerscontrole
description_ru    : Logseq - это платформа для управления знаниями и совместной работы. Она ориентирована на конфиденциальность, долговечность и контроль пользователей
audit_schedule    : 
editor            : 
keywords          : 
licence           : GNU AFFERO GENERAL PUBLIC LICENSE
homepage          : https://logseq.com/
package_uuid      : 1b6007e0-69a7-451b-ba2a-e4ef3abc6e4f
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/logseq/logseq/compare/0.10.8...0.10.9
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 76b261ee18b98f92e01d27c733a8c6098eff1df0648b16d2cf5dbb1e1ff49533
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-09-25T13:03:57.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         : gB15KKzrl1ucfYVifwnoppMv/ypob4AuLviCDBDKOHFOU4hsmI9rH5Xol2aFQO8itjCx9WFE8NAxd5cS7VBmx5jEOZiITaMUCpmXgPD4fc0EwEvw8Iksv92EbLvtogqDhV/z1AzY2YdI/voweYJFOEPta1X4PAORXA1I3pdxX3Dk5hOHwrX+/hfgN7HMpdiFGPCGtyYOVLw7bJBJl9ZY8lbDDHynF8OkogXobxCn4rAje+fgTb64GtqymXETp9VoO6HOl/PZQCFuNUmeE2qujJB2nXsFWhnELXMLPUN8AuIjdqnrdR/PyjIa/JXyoW/nnb4hR8V5i1IzWxBLa6zs8Q==

# -*- 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 *
import re


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()

    api_url = "https://api.github.com/repos/logseq/logseq/releases/latest"

    # Get data from API
    releases_dict = json.loads(wgets(api_url, proxies=proxies))
    zip_found = False  # Flag pour indiquer la découverte d'un fichier .zip
    for release in releases_dict:
        if zip_found:
            break
        for asset in releases_dict["assets"]:
            if asset["browser_download_url"].endswith(".AppImage"):
                url_download = asset["browser_download_url"]
                latest_bin = url_download.split("/")[-1]
                version = releases_dict["name"][20:26]
                zip_found = True  # Mettre à jour le flag pour indiquer qu'un zip a été trouvé
                break

    # Deleting binaries
    for f in glob.glob("*.AppImage"):
        if f != latest_bin:
            remove_file(f)

    # Downloading latest binaries
    print("Download URL is: %s" % url_download)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(url_download, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    control.set_software_version(version)
    control.save_control_to_wapt()

5d13ae6364652a71af2b554dbf36ae1ee2c98af79754aac860fa69a33f1f0a67 : Logseq-linux-x64-0.10.9.AppImage
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
801e7de384b92beec00113e9fc89d94d76db5650673d699ff45b8f6a0e45d923 : WAPT/control
76b261ee18b98f92e01d27c733a8c6098eff1df0648b16d2cf5dbb1e1ff49533 : WAPT/icon.png
11833b3d4e62b90e716aad5e92a5ee38ff230c911a18c71c793239dbbeca7846 : luti.json
223fa6ca0b4ed15f7d1a2e29893619511e043c7907d145e8c8991405677bb4e1 : setup.py
6e9b1e1e216267719ce6a2d21e40655a28a53b2a155c71ab5d3c39e54dacb71a : update_package.py