tis-pdfsam

5.2.6-5
PDFsam Basic or PDF Split and Merge is a free and open-source cross-platform desktop application to split, merge, extract pages, rotate and mix PDF documents.
14062 downloads
Download
See build result See VirusTotal scan
tis-pdfsam icon
  • package : tis-pdfsam
  • name : PDFsam Basic
  • version : 5.2.6-5
  • categories : Utilities,Office
  • maintainer : WAPT Team,Jimmy PELÉ
  • editor : Andrea Vacondio
  • licence : AGPLv3
  • locale : all
  • target_os : darwin
  • impacted_process :
  • architecture : x64
  • signature_date : 2024-08-28 18:00
  • size : 83.11 Mo
  • homepage : https://pdfsam.org/
package           : tis-pdfsam
version           : 5.2.6-5
architecture      : x64
section           : base
priority          : optional
name              : PDFsam Basic
categories        : Utilities,Office
maintainer        : WAPT Team,Jimmy PELÉ
description       : PDFsam Basic or PDF Split and Merge is a free and open-source cross-platform desktop application to split, merge, extract pages, rotate and mix PDF documents.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : darwin
min_wapt_version  : 2.0
sources           : https://github.com/torakiki/pdfsam/releases
installed_size    : 
impacted_process  : 
description_fr    : PDFsam Basic ou PDF Split and Merge est un logiciel libre multiplateforme pour diviser, fusionner, extraire des pages, faire pivoter et associer des documents PDF.
description_pl    : PDFsam Basic lub PDF Split and Merge jest darmową i open-source cross-platformową aplikacją desktopową do dzielenia, łączenia, wyodrębniania stron, obracania i mieszania dokumentów PDF
description_de    : PDFsam Basic oder PDF Split and Merge ist eine kostenlose und quelloffene, plattformübergreifende Desktop-Anwendung zum Teilen, Zusammenführen, Extrahieren von Seiten, Drehen und Mischen von PDF-Dokumenten
description_es    : PDFsam Basic o PDF Split and Merge es una aplicación de escritorio multiplataforma gratuita y de código abierto para dividir, fusionar, extraer páginas, rotar y mezclar documentos PDF
description_pt    : PDFsam Basic ou PDF Split and Merge é uma aplicação de ambiente de trabalho livre e de código aberto para dividir, fundir, extrair páginas, rodar e misturar documentos PDF
description_it    : PDFsam Basic o PDF Split and Merge è un'applicazione desktop multipiattaforma gratuita e open-source per dividere, unire, estrarre pagine, ruotare e mescolare documenti PDF
description_nl    : PDFsam Basic of PDF Splitsen en Samenvoegen is een gratis en open-source cross-platform desktop toepassing om PDF-documenten te splitsen, samen te voegen, pagina's te extraheren, te roteren en te mengen
description_ru    : PDFsam Basic или PDF Split and Merge - это бесплатное кроссплатформенное настольное приложение с открытым исходным кодом для разделения, слияния, извлечения страниц, поворота и смешивания документов PDF
audit_schedule    : 
editor            : Andrea Vacondio
keywords          : pdfsam,pdf,sam,split,merge,basic,extract,page,pages,rotate,mix,document,documents
licence           : AGPLv3
homepage          : https://pdfsam.org/
package_uuid      : 4a401dd9-0117-4a5c-bdb5-60897559d6ad
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 7332a01aa80f667ce3cd79545bc9d3974baabe25bc7bc476deaee6bf5df4ad11
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : oCdy0dcQdmyB2WYU6GE9WO8Z94Gl4VkQG1zLyeNTQcsK3f13mMZXzI0m69ALOOepvvmAQBqQlcZ9k8kP8XHQlPNHwfAWDpPEphfQY5iznA4ZXVoOktqoVN7QqyWst6meNJA+mGDJ2BLOiu2NyaN0WL0vW1xiFhdcP6UphHrNPiKxF/ciUzWk+zLN6ySdQ1er2p95Z6LAlZyUg0Sp0hcJ6lOrDJBya63F0ez+/SMKA9X0yDnGUGcN+2fDtsHszHeV2LIsEyu7pdM9SpDvfI6IUwJ4UoUM74LyED7eQmvtvmwn1S3TCZLsFbF4/XNOmMH38dUhvRBzUG0qBl7mHnZe3w==
signature_date    : 2024-08-28T18:00:51.131750
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 *

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
app_name = "PDFsam Basic"


def install():
    # Declaring local variables
    bin_name = glob.glob("*pdfsam*.dmg")[0]

    def mount_dmg(dmg_path):
        """Mounts a dmg file.

        Returns: The path to the mount point.
        """
        try:
            return run("yes | hdiutil mount '" + dmg_path + "'").split("\t")[-1].rstrip()
        except subprocess.CalledProcessError as e:
            raise Exception("Error in mount_dmg : {0}".format(e.output))

    def install_dmg(dmg_path, key="", min_version="", get_version=None, force=False, killbefore=None, uninstallkeylist=None):
        """Installs a .dmg if it isn't already installed on the system.

        Arguments:
            dmg_path : the path to the dmg file

        Returns:
            True if it succeeded, False otherwise
        """
        ret_val = True

        dmg_name = os.path.basename(dmg_path)
        dmg_mount_path = mount_dmg(dmg_path)

        try:
            dmg_file_assoc = {".pkg": install_pkg, ".mpkg": install_pkg, ".app": install_app}
            files = [dmg_mount_path + "/" + fname for fname in os.listdir(dmg_mount_path)]
            nb_files_handled = 0
            for file in files:
                fname, fextension = os.path.splitext(file)
                if fextension in dmg_file_assoc:
                    dmg_file_assoc[fextension](
                        file,
                        key=key,
                        min_version=min_version,
                        get_version=get_version,
                        force=force,
                        uninstallkeylist=uninstallkeylist,
                        killbefore=killbefore,
                    )
                    nb_files_handled += 1

            if nb_files_handled == 0:
                error("Error : the dmg provided did not contain a package or an application, or none could be found.")

            unmount_dmg(dmg_mount_path)
        except Exception as e:
            unmount_dmg(dmg_mount_path)
            raise

    # Installing the software
    print("Installing: %s" % bin_name)
    install_dmg(bin_name)


def uninstall():
    # Uninstalling the software
    uninstall_app(app_name)
# -*- coding: utf-8 -*-
from setuphelpers import *
import json

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_contains = "pdfsam-"


def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    api_url = "https://api.github.com/repos/torakiki/pdfsam/releases/latest"

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    json_load = json.loads(wgets(api_url, proxies=proxies))
    for download in json_load["assets"]:
        if bin_contains in download["name"] and download["name"].endswith(".dmg"):
            download_url = download["browser_download_url"]
            version = json_load["tag_name"].replace("v", "")
            latest_bin = download["name"]
            break

    print("Latest %s version is: %s" % (app_name, version))
    print("Download URL is: %s" % download_url)

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

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

    # Deleting outdated binaries
    remove_outdated_binaries(version)

    # Validating update-package-sources
    return result
da6e09c34d25c58a95293b051dbadc35086c07e2485ff44af50bfc8c03ba8670 : setup.py
 : __pycache__
57f6c7478235930a38efd3837a1ac1fd80b9ec8cc4a7127aa152482f7b76aae2 : update_package.py
8fc5d1ec50db9f1776d1c1b91cd2c5c4d644979e43b0ced462440bfa9a5143e1 : pdfsam-5.2.6.dmg
7332a01aa80f667ce3cd79545bc9d3974baabe25bc7bc476deaee6bf5df4ad11 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
016b205933e0b6691f72b2d5aaba4aebdd0055318d776a62ac46a36e48914203 : luti.json
787d087ee73eb1bed701e813800d77e54d7e6f31f911e45cedc2bd89067d3136 : WAPT/control