tis-calibre

4.8.0-2
Calibre (stylised calibre) is a cross-platform open-source suite of e-book software.
12542 downloads
Download

  Description 

  • package : tis-calibre
  • version : 4.8.0-2
  • architecture : x86
  • categories : Office,Utilities,Media
  • maintainer : Tranquil IT,Kevin Guerineau,Jimmy PELÉ
  • description : Calibre (stylised calibre) is a cross-platform open-source suite of e-book software.
  • locale : all
  • target_os : windows
  • min_os_version : 6.0
  • max_os_version :
  • min_wapt_version : 1.5
  • sources :
  • installed_size : 417738752
  • impacted_process : ebook-viewer.exe, calibre.exe, calibre-parallel.exe, lrfviewer.exe
  • 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 dans les principaux formats disponibles.
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Kovid Goyal
  • licence : GPLv3
  • signature_date : 2020-02-27T21:28:54.036193
  • Homepage : https://calibre-ebook.com

  Setup.py 

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

uninstallkey = []

# Declaring specific app values (TO CHANGE)
bin_name_string = 'calibre-%s.msi'
url_dl = 'https://calibre-ebook.com/dist/win32'

def install():
    print('installing %s' % control.asrequirement())

    # Specific app values
    #package_version = control.get_software_version() # Do not use for now
    package_version = control.version.split('-',1)[0]
    impacted_process = control.impacted_process

	# Getting the used storage on programfiles before installation (place it on the top)
    get_disk_free_space_before = get_disk_free_space(programfiles)

    for soft in installed_softwares("calibre"):
        run_notfatal(uninstall_cmd(soft['key']))

    install_msi_if_needed(bin_name_string % package_version
        ,min_version=package_version)

	# Return used storage of the installation. (place it on the bottom)
    get_disk_free_space_after = get_disk_free_space(programfiles)
    free_space_after_diff = get_disk_free_space_before - get_disk_free_space_after
    print ("Storage used: " + str(free_space_after_diff))


def update_package():
    print('Update package content from upstream binary sources')

    import requests,re
    from waptpackage import PackageEntry

    # Update transition from BeautifulSoup 3 to 4
    try:
        import BeautifulSoup
    except:
        import bs4 as BeautifulSoup

    # Specific app values
    app_name = control.name
    url_gh = 'https://github.com/kovidgoyal/calibre/releases'

    # Get Proxy informations from WAPT settings
    proxies = {}
    if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxies = {'http':proxywapt,'https':proxywapt}

    # Get latest version number from official website
    page = requests.get(url_gh + '/latest',headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'}).text
    bs = BeautifulSoup.BeautifulSoup(page)
    # bs = BeautifulSoup.BeautifulSoup(page,features="html.parser") # For bs4 only
    bs_raw_string = str(bs.find('span',{'class':'css-truncate-target'}).text)
    vversion = bs_raw_string
    version = vversion.replace('v','')

    print('Latest ' + app_name + ' version is: ' + version)

    latest_bin = bin_name_string % version

    # Downloading latest binaires
    if not isfile(latest_bin):
        print('Downloading ' + latest_bin)
        wget(url_dl,latest_bin,proxies=proxies)

		# Change version of the package
        print ('Writing ' + version + '-0 in WAPT\\control')
        pe = PackageEntry()
        pe.load_control_from_wapt(os.getcwd())

        pe.version = version + '-0'
        pe.save_control_to_wapt(os.getcwd())
        print ('Update package done. You can now build-upload your package')
    else:
        print ('This package is already up-to-date')

    # Deleting outdated binaries
    for actual_bin in glob.glob('*.exe') or glob.glob('*.msi'):
        if actual_bin != latest_bin :
            print('Outdated binary: ' + actual_bin + ' Deleted')
            remove_file(actual_bin)

if __name__ == '__main__':
    update_package()


										

  Changelog 


https://calibre-ebook.com/whats-new
  manifest.sha256 
[["WAPT/icon.png","4152db2fde14eb9f3015e05bfe41ddf78ce34b91a57b2e41b38f022033df4e86"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/wapt.psproj","510d3af6fcf8f2eae5db684bb830ea9845576e76872b9b10854efaea6e4a4cd8"],["calibre-4.8.0.msi","e6a093e6e382b2c7c49d8a979348a2a0dfac59b92a0681920a97b183e1b04981"],["setup.py","9a495ef3fc382b2b0d7843aac0d4aac97ff102a8d4e7308679c8bdf442f91003"],["WAPT/control","5c1589d688279f1e6298d42ab5764f9b1e8b72df635bc2ea604bde9c361d7ee6"],["WAPT/changelog.txt","7d38278f72ea4cdcd603e554531dc159a21ff52484fddb9c596813ea25f79db6"]]