- package: tis-naps2
- name: NAPS2
- version: 7.5.1-1
- categories: Utilities
- maintainer: WAPT Team,Tranquil IT,Simon Fonteneau,Pierre COSSON,Clément Baziret
- licence: opensource_free,wapt_public
- locale: all
- target_os: windows
- impacted_process: NAPS2.exe
- architecture: x86
- signature_date:
- size: 11.74 Mo
- installed_size: 7.93 Mo
package : tis-naps2
version : 7.5.1-1
architecture : x86
section : base
priority : optional
name : NAPS2
categories : Utilities
maintainer : WAPT Team,Tranquil IT,Simon Fonteneau,Pierre COSSON,Clément Baziret
description : Free software to scan documents, edit and convert them to PDF and other extensions.
depends :
conflicts :
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 2.3
sources :
installed_size : 7929715
impacted_process : NAPS2.exe
description_fr : Logiciel libre permettant de scanner des documents, les éditer et les convertir vers le format PDF et d'autres extensions.
description_pl : Darmowe oprogramowanie do skanowania dokumentów, edycji i konwersji do formatu PDF i innych rozszerzeń
description_de : Kostenlose Software zum Scannen, Bearbeiten und Konvertieren von Dokumenten in PDF und andere Erweiterungen
description_es : Software gratuito para escanear documentos, editarlos y convertirlos a PDF y otras extensiones
description_pt : Software gratuito para digitalizar documentos, editá-los e convertê-los para PDF e outras extensões
description_it : Software gratuito per scansionare documenti, modificarli e convertirli in PDF e altre estensioni
description_nl : Gratis software om documenten te scannen, te bewerken en te converteren naar PDF en andere extensies
description_ru : Бесплатная программа для сканирования документов, их редактирования и преобразования в PDF и другие расширения
audit_schedule :
editor :
keywords :
licence : opensource_free,wapt_public
homepage :
package_uuid : 4b6a868b-48da-4e49-a1cd-c707e2b1b1fb
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version :
max_os_version :
icon_sha256sum : c48c5e64a0ec077ccaf7f3c70ca12299f2056c13e7b3eb6471b2c72cde49b797
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : l8nW7cA+yH8MBd1kuYjhKOZd92TJ1IxAWDAzw2Oklelhu7IAamsXczgdSGfRjtkihgKI5x54TiwlQq3h0qj5fmZuond5Mg8OXkbnK/IZac5VyiVySX2bXF+KVaab3jJXZT/WsylDWKkHothmfw4su4muhZ7Sha4bGD8DkxA0yzKjy5bFXRHm4I1/lK/L9jFYTjXQOfxIhhb/ar1McDJPGL4fNMISzW61fSf48flnADWZ7zZRcRZRvMhp/H/MYOFFO9PnqZvC3oQTyUperp9eoU5SbsF0n0BEMJg3nngPfQaaWK+LgZtBATxGWiG1vnKGiZ/+Rk1HaQZsjzGFcxbXzA==
signature_date : 2024-08-19T00:01:57.696445
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 *
def install():
install_msi_if_needed(
glob.glob("naps2-*.msi")[0],
killbefore="NAPS2.exe",
remove_old_version=True,
)
# -*- coding: utf-8 -*-
from setuphelpers import *
def update_package():
# Declaring local variables
package_updated = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
api_url = "https://api.github.com/repos/cyanfish/naps2/releases/latest"
download_dict = {
"windows-x64": "-win-x64.msi",
"windows-x86": "-win-x86.msi",
}
# Getting latest version information from official sources
print("API used is: %s" % api_url)
json_load = wgets(api_url, proxies=proxies, as_json=True)
version = json_load["tag_name"].replace("v", "").replace(".windows", "")
for to_download in json_load["assets"]:
if download_dict[control.target_os + "-" + ensure_list(control.architecture)[0]] in to_download["name"]:
download_url = to_download["browser_download_url"]
latest_bin = to_download["name"]
break
# Downloading latest binaries
print("Latest %s version is: %s" % (control.name, version))
print("Download URL is: %s" % download_url)
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(download_url, latest_bin, proxies=proxies)
else:
print("Binary is present: %s" % latest_bin)
# Deleting outdated binaries
remove_outdated_binaries(latest_bin)
# Checking version from file
if get_os_name() == "Windows" and "windows" in control.target_os.lower():
version_from_file = get_version_from_binary(latest_bin)
if Version(version_from_file, 4) == Version(version, 4):
print(f"INFO: Binary file version ({version_from_file}) corresponds to online version ({version})")
else:
error(f"ERROR: Binary file version ({version_from_file}) do NOT corresponds to online version ({version})")
# Changing version of the package
if Version(version, 4) > Version(control.get_software_version(), 4):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
package_updated = True
else:
print("Software version up-to-date (%s)" % Version(version))
control.set_software_version(version)
control.save_control_to_wapt()
# Validating update-package-sources
return package_updated
04c5c9ac3405a581b9b7507bbfe393c9e848cafb3b065621864539894f9b9b1f : setup.py
ccf2a8d323e72848fc126353bafc6898d376ba08f19c1bbdbbf032b282e13b77 : update_package.py
2ba66555f7c794b5fd0821827aab0ac5552443a95ad9aec937c7422710f10b8f : naps2-7.5.1-win-x86.msi
c48c5e64a0ec077ccaf7f3c70ca12299f2056c13e7b3eb6471b2c72cde49b797 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
386b93e2d7705769adfde686b2c5e499b8ae9e907073317e7ce1b63e585a07f0 : luti.json
a9a597b9bce88a8fb164e80c9636408516d13c0a5f1079b952650fb2feb47c3d : WAPT/control