tis-calibre
5.8.0-1
Calibre (stylised calibre) is a cross-platform open-source suite of e-book software.
19989 downloads

Description
- package : tis-calibre
- version : 5.8.0-1
- 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-12-24T11:28:43.755999
- Homepage : https://calibre-ebook.com
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
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'
# Initializing variables
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
# 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)
# 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)
def get_proxies_from_wapt_console():
proxies = {}
if platform.system() == 'Windows':
waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
else:
waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
if isfile(waptconsole_ini_path):
proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
if proxy_wapt:
proxies = {'http': proxy_wapt, 'https': proxy_wapt}
return proxies
if __name__ == '__main__':
update_package()
[["calibre-5.8.0.msi","04ca0678c8bb671f71c29d121a787f8bf236b292b9c7dfac39f5642225a12abc"],["setup.py","cff23ef919814c7691d7eeb84537afbd96483c88b48f1a2428bf7541c57458fb"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/changelog.txt","7d38278f72ea4cdcd603e554531dc159a21ff52484fddb9c596813ea25f79db6"],["WAPT/icon.png","4152db2fde14eb9f3015e05bfe41ddf78ce34b91a57b2e41b38f022033df4e86"],["WAPT/wapt.psproj","510d3af6fcf8f2eae5db684bb830ea9845576e76872b9b10854efaea6e4a4cd8"],["WAPT/control","2d5f3a8b7d2d08421a7120aab54aad6af8ad857d90de35d73934f81f664e457a"]]