tis-sublime-text icon

Sublime Text

Paquet d’installation silencieuse pour Sublime Text

4.1.8.0-1
Office
Office

  • package: tis-sublime-text
  • name: Sublime Text
  • version: 4.1.8.0-1
  • categories: Office
  • maintainer: WAPT Team,Tranquil IT,Clément BAZIRET
  • editor: Sublime HQ
  • licence: proprietary_restricted,wapt_public
  • locale: all
  • target_os: debian_based
  • impacted_process: sublime_text
  • architecture: x64
  • signature_date:
  • size: 15.53 Mo
  • installed_size: 56.14 Mo
  • homepage : https://www.sublimetext.com/

package           : tis-sublime-text
version           : 4.1.8.0-1
architecture      : x64
section           : base
priority          : optional
name              : Sublime Text
categories        : Office
maintainer        : WAPT Team,Tranquil IT,Clément BAZIRET
description       : Sublime Text is a sophisticated text editor for code, markup and prose
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : debian_based
min_wapt_version  : 2.3
sources           : https://www.sublimetext.com/download
installed_size    : 56135795
impacted_process  : sublime_text
description_fr    : Sublime Text est un éditeur de texte sophistiqué pour le code, le balisage et la prose
description_pl    : Sublime Text to zaawansowany edytor tekstu dla kodu, znaczników i prozy
description_de    : Sublime Text ist ein hochentwickelter Texteditor für Code, Markup und Prosa
description_es    : Sublime Text es un sofisticado editor de texto para código, marcado y prosa
description_pt    : O Sublime Text é um editor de texto sofisticado para código, marcação e prosa
description_it    : Sublime Text è un sofisticato editor di testo per codice, markup e prosa
description_nl    : Sublime Text is een geavanceerde teksteditor voor code, markup en proza
description_ru    : Sublime Text - это сложный текстовый редактор для кода, разметки и прозы
audit_schedule    : 
editor            : Sublime HQ
keywords          : sublime,text,editor,code,markup,prose
licence           : proprietary_restricted,wapt_public
homepage          : https://www.sublimetext.com/
package_uuid      : 359ad439-9212-4424-8361-fb56e11129eb
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 29b0eaae5aed603bf584cee1de1773bb739e41745a59f386a46aacd2f34e1925
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : bE4xHUICPjIRa9H7PFHzHQ4nOsD1dfkfQ45tW/M8uw90mRHwpAXO2BtGH7ylUYKJBRhCNmcZ+r9f6ZJnZ4U353Q3QF5/mD0NoxAhQ+umpwAoyE4FwNojcRw0b7OEYD01lXcfz32sJiMB0yzX356pIM5Yf/DSLkswhlMTIRnn2v7grwonVcHQDKu+pObqO+OUOZeOPcGO4XR27WVbrEsvHqz2ROSkmveas8+Ms3QFBsqkGe2T0xczBf5EbZcZ54rX0d8ta2K6oC5eOjZk3TRmMoFkXe7wbffidnydNKgCnC3K4z3b6Tkuvg40KhNu7IcfM0saDLrF446bMz8kGsdXvA==
signature_date    : 2024-08-11T07:00:59.318401
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

# -*- coding: utf-8 -*-
from setuphelpers import *


def install():
    bin_name = glob.glob("sublime-text_build-*.deb")[0]

    install_deb(
        bin_name,
    )


def uninstall():
    uninstall_apt("sublime-text")

# -*- coding: utf-8 -*-
from setuphelpers import *
import requests


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

    url = "https://www.sublimetext.com/download_thanks"
    download_dict = {
        "windows-x64": "Windows",
        "mac-all": "macOS",
        "debian_based-x64": "Linux 64 bit .deb",
        "redhat_based-x64": "Linux 64 bit .rpm",
    }

    # Getting latest binary download_url
    for bs_search in bs_find_all(url, "a", "href"):
        if download_dict[control.target_os + "-" + ensure_list(control.architecture)[0]] in bs_search.text:
            download_url = bs_search["href"]
            latest_bin = download_url.split("/")[-1]

    # Getting latest software version online
    bs_search = bs_find(url.split("_thanks")[0], "p", "class", "latest")
    build_version = bs_search.text.split(" ")[-1]
    version = ".".join(list(build_version))

    # Deleting binaries
    remove_outdated_binaries("*")

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

    # Checking version from file
    # if get_os_name() == "Windows" and "windows" in control.target_os.lower():
    #     version_from_file = get_version_from_binary(latest_bin)
    #     if Version(version_from_file, 4) == Version(version, 4):
    #         print("INFO: Binary file version corresponds to online version")
    #     else:
    #         error("ERROR: Binary file version do NOT corresponds to online version")

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating update-package-sources
    return package_updated

a97f43f65729f20d17738a4c99284cfc39a4a0944bb78b1fc1bab657575e0dfb : setup.py
a5460f6f9bd82ab5962a1efd6213eef3ca0ac7705d103c2f3d2eb74671f035d4 : sublime-text_build-4180_amd64.deb
48d518e680e0471b5069c6f37f683fcb93c4b3a30969d744141ce988a13c6d68 : update_package.py
29b0eaae5aed603bf584cee1de1773bb739e41745a59f386a46aacd2f34e1925 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
a3fa713b827dce55db9436cc39ebc54325e38acf83e91c462075139778f4d493 : luti.json
e5aa551d08ab28dfea1d2b44402e0e3a52dcd29eb784f57a4978e84185921aed : WAPT/control