tis-lightscreen
2.5-1
Lightscreen is a lightweight screen shooting application for Microsoft Windows, used to automate the process of saving and cataloging screenshots.
1598 downloads

Description
- package : tis-lightscreen
- version : 2.5-1
- architecture : all
- categories : Utilities,Media
- maintainer : Tranquil IT, Jimmy PELÉ
- description : Lightscreen is a lightweight screen shooting application for Microsoft Windows, used to automate the process of saving and cataloging screenshots.
- locale : all
- target_os : windows
- min_wapt_version : 1.5
- sources : https://github.com/ckaiser/Lightscreen/releases
- installed_size : 23773184
- impacted_process : lightscreen.exe
- description_fr : Lightscreen est une application de capture d'écran légère pour Microsoft Windows, utilisée pour automatiser le processus de sauvegarde et de catalogage des captures d'écran.
- description_pl :
- description_de :
- description_es :
- description_pt :
- description_it :
- description_nl :
- description_ru :
- editor : Christian Kaiser
- licence : GNU General Public License
- signature_date : 2021-12-21T15:48:30.707394
- Homepage : https://lightscreen.com.ar/
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
#{4A59754E-D644-4F84-9768-41F68053F08E}_is1 Lightscreen version 2.4 2.4 "C:\Program Files (x86)\Lightscreen\unins000.exe"
# Declaring specific app values (TO CHANGE)
bin_name_string = 'LightscreenSetup-%s.exe'
bin_name_joker = 'LightscreenSetup-*.exe'
silent_arguments = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /LAUNCHAFTER=0'
uninstall_key = '{4A59754E-D644-4F84-9768-41F68053F08E}_is1'
def install():
print('installing tis-lightscreen')
package_version = control.get_software_version()
impacted_process = control.get_impacted_process_list()
install_exe_if_needed(bin_name_string % package_version
,silentflags=silent_arguments
,key=uninstallkey
,min_version=package_version
,killbefore=impacted_process)
killalltasks(impacted_process)
def uninstall():
print('uninstalling tis-lightscreen')
silent_uninstall_arguments=' /SUPPRESSMSGBOXES /NORESTART /SP-'
silent_uninstall_command=uninstall_cmd('{4A59754E-D644-4F84-9768-41F68053F08E}_is1')
silent_uninstall_command += silent_uninstall_arguments
run(silent_uninstall_command)
wait_uninstallkey_absent('{4A59754E-D644-4F84-9768-41F68053F08E}_is1)')
def update_package():
import bs4 as BeautifulSoup,requests,re
from waptpackage import PackageEntry
# Declaring specific app values
app_name = control['name']
url = control['sources']
# 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}
verify=True
pe = PackageEntry()
pe.load_control_from_wapt(os.getcwd())
current_version = pe['version'].split('-',1)[0]
verify=True
# Get latest version number from official website
page = requests.get(url + '/latest',headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'},verify=verify).text
bs = BeautifulSoup.BeautifulSoup(page)
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)
# Declaring binaries extension to download
reg_bin = "(\.exe|\.msi)$" # $ mean the end of regex chain
end_bin = re.compile(reg_bin)
links = bs.findAll("a",{"href" : end_bin})
part_url_dl = links[0]['href']
#print(part_url_dl)
url_dl = ('https://github.com' + part_url_dl)
print('Download url is: ' + url_dl)
latest_bin = bin_name_string % version
# Deleting outdated binaries
for actual_bin in glob.glob(bin_name_joker):
if actual_bin != latest_bin :
print(actual_bin + ' Deleted')
remove_file(actual_bin)
# Downloading latest binaires
if not isfile(latest_bin):
print('Downloading ' + url_dl)
wget(url_dl,latest_bin,proxies=proxies)
# Change version of the package
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')
if __name__ == '__main__':
update_package()