tis-calibre

5.41.0-13
Calibre (stylised calibre) is a cross-platform open-source suite of e-book software
351360 downloads
Download
View on luti logo
tis-calibre icon

  Description 

  • package : tis-calibre
  • version : 5.41.0-13
  • architecture : x86
  • categories : Office,Utilities,Media
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : Calibre (stylised calibre) is a cross-platform open-source suite of e-book software
  • locale : all
  • target_os : windows
  • min_wapt_version : 2.0
  • sources :
  • installed_size : 417738752
  • impacted_process : calibre,ebook-viewer,lrfviewer
  • description_fr : calibre est un gestionnaire de bibliothèques numériques permettant la visualisation, la conversion, le catalogage et l'édition de livres numériques
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Kovid Goyal
  • licence : GPLv3
  • signature_date : 2022-04-27T19:00:28.389460
  • Homepage : https://calibre-ebook.com

  Setup.py 

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

"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

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


def install():
    # Declaring local variables
    package_version = control.get_software_version()
    bin_name = glob.glob('*%s*.msi' % bin_contains)[0]

    # Installing the software
    print("Installing: %s" % bin_name)
    install_msi_if_needed(bin_name,
        min_version=package_version,
    )


def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    sub_bin_name = bin_contains + '-%s.exe'
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    git_repo = 'kovidgoyal/calibre'
    api_url = 'https://api.github.com/repos/%s/releases/latest' % git_repo

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    json_load = json.loads(wgets(api_url, proxies=proxies))
    version = json_load['tag_name'].replace('v', '')
    if control.architecture == 'x64':
        latest_bin = 'calibre-64bit-%s.msi' % version
    else:
        latest_bin = 'calibre-%s.msi' % version
    for download in json_load['assets']:
        if latest_bin in download['name']:
            download_url = download['browser_download_url']
            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)

        # Checking version from file
        version_from_file = get_version_from_binary(latest_bin)
        if version != version_from_file and version_from_file != '':
            print("Changing version to the version number of the binary")
            os.rename(latest_bin, sub_bin_name % version_from_file)
            version = version_from_file
        else:
            print("Binary file version corresponds to online version")

    # 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




										

  Changelog 



Changelog software url : https://calibre-ebook.com/whats-new



https://calibre-ebook.com/whats-new
									
  manifest.sha256