tis-calibre

5.8.1-11
Calibre (stylised calibre) is a cross-platform open-source suite of e-book software.
351360 downloads
Download
default icon

  Description 

  • package : tis-calibre
  • version : 5.8.1-11
  • architecture : x64
  • 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 : darwin
  • min_wapt_version : 1.5
  • sources :
  • installed_size : 477245440
  • 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-12-28T10:31:36.832559
  • Homepage : https://calibre-ebook.com

  Setup.py 

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

uninstallkey = []

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


def install():
    print('installing %s' % control.asrequirement())
    package_version = control.version.split('-',1)[0]
    install_dmg(bin_name_string % package_version)

def uninstall():
    shutil.rmtree('/Applications/calibre.app')

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)'},proxies=proxies).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)


    control.version = version + '-10'
    control.save_control_to_wapt()
    print ('Update package done. You can now build-upload your package')


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



										

  Changelog 



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