tis-zotero icon

Zotero

Paquet d’installation silencieuse pour Zotero

8.0.3-12
Utilities
Utilities

  • package: tis-zotero
  • name: Zotero
  • version: 8.0.3-12
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ,Gaëtan SEGAT,Jordan Arnaud
  • editor: Corporation for Digital Scholarship
  • licence: AGPL
  • locale: all
  • target_os: ubuntu(<=20), debian
  • impacted_process: zotero
  • architecture: x64
  • signature_date:
  • size: 102.93 Mo
  • installed_size: 116.42 Mo
  • homepage : https://www.zotero.org/

package           : tis-zotero
version           : 8.0.3-12
architecture      : x64
section           : base
priority          : optional
name              : Zotero
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ,Gaëtan SEGAT,Jordan Arnaud
description       : Zotero is a free and open-source reference management software to manage bibliographic data and related research materials
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : ubuntu(<=20), debian
min_wapt_version  : 2.3
sources           : https://www.zotero.org/download/
installed_size    : 116416512
impacted_process  : zotero
description_fr    : Zotero est un logiciel de gestion de références gratuit, libre et open source, il permet de gérer des données bibliographiques et des documents de recherche
description_pl    : Zotero jest wolnym i otwartym oprogramowaniem do zarządzania referencjami, służącym do zarządzania danymi bibliograficznymi i powiązanymi materiałami badawczymi
description_de    : Zotero ist eine kostenlose und quelloffene Literaturverwaltungssoftware zur Verwaltung bibliographischer Daten und verwandter Forschungsmaterialien
description_es    : Zotero es un software de gestión de referencias gratuito y de código abierto para gestionar los datos bibliográficos y los materiales de investigación relacionados
description_pt    : Zotero é um software de gestão de referências gratuito e de código aberto para gerir dados bibliográficos e materiais de investigação relacionados
description_it    : Zotero è un software di reference management gratuito e open-source per la gestione dei dati bibliografici e dei relativi materiali di ricerca
description_nl    : Zotero is een gratis en open-source referentiebeheersoftware om bibliografische gegevens en verwant onderzoeksmateriaal te beheren
description_ru    : Zotero - это бесплатное программное обеспечение с открытым исходным кодом для управления библиографическими данными и сопутствующими исследовательскими материалами
audit_schedule    : 
editor            : Corporation for Digital Scholarship
keywords          : 
licence           : AGPL
homepage          : https://www.zotero.org/
package_uuid      : 00757ca4-4969-47d6-b3c6-798d9b1e1a3f
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://www.zotero.org/support/changelog
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 499ad46227d2de56044d89085ff174a347b8ccca7b2e59823cdca9eaca6090f7
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2026-02-12T22:05:00.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         : gM0VUGqwJDvFu+iqtSASSmdaoJmHcnABQxZ/NrwtmriaCEdNI2YsVlU6SshVEG8fzPXvyIMfT/lkP+YwRpHzs+Y8F7/Z+v3B7olz6P1xsJqdmT9ygeYCjMMoRhiTi2C0XGsnQXA2cceNVLHwf+73zgiiIC19G9VVpoltq3KvIxlbzNiPsvJMO2JJSE8Ael7Shmnr+oJ05O9t2/pxnZ1ykolgwTYuezhs/gRdElUGKGvvzV8OIhvFuNPvN9sYijpDfQlL0Gmt/eUaCcVLkQX/G/tUhSPikZXraRtTLovWNfAhb0SmQnX68qeSq0FigSNT0ekfSXFzI0rcv+BeIZE2bA==

# -*- coding: utf-8 -*-
from setuphelpers import *
import tarfile
from typing import List, Optional


app_name = "zotero"
bin_name = "zotero"
bin_path = "/usr/local/bin"
app_path = makepath("/opt", app_name)

bin_target = makepath(bin_path, bin_name)
app_target = makepath(app_path, bin_name)


def install():
    archive_path = glob.glob("Zotero*x86_64.tar.xz")[0]
    extract_tar(archive_path, basedir)

    if isdir(app_path):
        remove_tree(app_path)
    copytree2('Zotero_linux-x86_64', app_path)
    
    if isfile(bin_target):
        remove_file(bin_target)
    os.symlink(app_target, bin_target)
   
def uninstall():
    # Removing of symlink
    if isfile(bin_path) or os.path.islink(bin_path):
        remove_file(bin_path)

    # Removing of the software 
    if isdir(app_path):
        remove_tree(app_path)


def extract_tar(
    tar_path: str,
    extract_path: str = ".",
    exclude_list: Optional[List[str]] = None,
    include_list: Optional[List[str]] = None
) -> None:
    """
    Extracts a tar archive to the given directory, with optional inclusion or exclusion filtering.

    :param tar_path: Path to the .tar (or .tar.gz, .tar.bz2, etc.) archive.
    :param extract_path: Directory where files should be extracted.
    :param exclude_list: List of path prefixes to exclude from extraction.
    :param include_list: List of path prefixes to include exclusively. Overrides exclude_list if provided.
    """
    with tarfile.open(tar_path, 'r:*') as tar:
        all_members = tar.getmembers()

        if include_list:
            include_set = set(include_list)
            members = [
                m for m in all_members
                if any(m.name.startswith(inc) for inc in include_set)
            ]
        elif exclude_list:
            exclude_set = set(exclude_list)
            members = [
                m for m in all_members
                if not any(m.name.startswith(exc) for exc in exclude_set)
            ]
        else:
            members = all_members

        tar.extractall(path=extract_path, members=members)

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

def update_package():
    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    url = "https://www.zotero.org/download/"

    # Getting latest version from official sources
    print("URL used is: %s" % url)
    for bs_search in bs_find_all(url, "script", "type", "text/javascript", proxies=proxies):
        temp_str = str(bs_search)
        if "linux-x86_64" in temp_str:
            #dict_version = json.loads(temp_str.split(":", 1)[-1].split("\n", 1)[0].split("}")[0] + "}")
            #version = dict_version["linux-x86_64"]
            url_dl = requests.head("https://www.zotero.org/download/client/dl?channel=release&platform=linux-x86_64" , proxies=proxies).headers["Location"]
            latest_bin = url_dl.split("/")[-1]
            version = latest_bin.split("-")[1].split("_")[0]
            break

    print("Latest %s version is: %s" % (app_name, version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(url_dl, latest_bin, proxies=proxies)

    # Changing version of the package
    control.version = "%s-%s" % (version, control.version.split("-", 1)[-1])
    control.save_control_to_wapt()

    for f in glob.glob("*.tar.xz"):
        if f != latest_bin:
            remove_file()

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
3a759614bd8314477e839ffe2706b5373ab1e216479e2af221c854d0b09e2220 : WAPT/control
499ad46227d2de56044d89085ff174a347b8ccca7b2e59823cdca9eaca6090f7 : WAPT/icon.png
f0a32f509534f6db49975a3bf0727d658958235071931f98028de031388b26f9 : Zotero-8.0.3_linux-x86_64.tar.xz
0b7c00c0c8dd2fbd66ca28059cede5f5eb5809f568558ec4add63b7a7d9f69db : luti.json
b2e8c4b040c7b7f8ff79ef324adede23d1ff6566abe37ed14bd938ee155a4144 : setup.py
d42b996a9d53b1111d53f1e344b2c56f4ded3f3e3db059b59b3859b0404d976c : update_package.py