add update_package and changelog.txt
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
package : kg-qownnotes
|
package : kg-qownnotes
|
||||||
version : 18.11.6-19
|
version : 19.1.2-1
|
||||||
architecture : all
|
architecture : all
|
||||||
section : base
|
section : base
|
||||||
priority : optional
|
priority : optional
|
||||||
@@ -12,19 +12,19 @@ locale : all
|
|||||||
target_os : windows
|
target_os : windows
|
||||||
min_os_version : 6.1
|
min_os_version : 6.1
|
||||||
max_os_version :
|
max_os_version :
|
||||||
min_wapt_version : 1.5.1.20
|
min_wapt_version : 1.5
|
||||||
sources :
|
sources :
|
||||||
installed_size :
|
installed_size : 85870884
|
||||||
impacted_process :
|
impacted_process : qownnotes.exe
|
||||||
description_fr : Bloc-notes de fichier en texte brut avec prise en charge du demarquage et de integration NextCloud et ownCloud
|
description_fr : Bloc-notes de fichier en texte brut avec prise en charge du demarquage et de integration NextCloud et ownCloud
|
||||||
description_pl :
|
description_pl :
|
||||||
description_de :
|
description_de :
|
||||||
description_es :
|
description_es :
|
||||||
audit_schedule :
|
audit_schedule :
|
||||||
editor :
|
editor : Patrizio Bekerle
|
||||||
keywords :
|
keywords :
|
||||||
licence :
|
licence : GNU/GPL
|
||||||
homepage :
|
homepage : https://www.qownnotes.org
|
||||||
package_uuid :
|
package_uuid :
|
||||||
signer : wapt-private
|
signer : wapt-private
|
||||||
signer_fingerprint: f92cc2c37728a7041fdc444a610944e93e722bc118d6e3c1d27de71fea99afdf
|
signer_fingerprint: f92cc2c37728a7041fdc444a610944e93e722bc118d6e3c1d27de71fea99afdf
|
||||||
|
|||||||
@@ -40,18 +40,38 @@ def session_setup():
|
|||||||
# implicit context variables are WAPT, control, user, params
|
# implicit context variables are WAPT, control, user, params
|
||||||
|
|
||||||
def update_package():
|
def update_package():
|
||||||
import BeautifulSoup, re, requests
|
import BeautifulSoup, re, requests, zipfile
|
||||||
|
|
||||||
url = "https://www.qownnotes.org/installation#Windows"
|
pe = PackageEntry()
|
||||||
|
pe.load_control_from_wapt(os.getcwd())
|
||||||
|
|
||||||
page = wgets(url,user_agent='Mozilla/5.0 (Windows NT 6.1; Win64; x64)')
|
url_version = "https://www.qownnotes.org"
|
||||||
|
url_build = "https://www.qownnotes.org/installation#Windows"
|
||||||
|
|
||||||
|
page = wgets(url_version,user_agent='Mozilla/5.0 (Windows NT 6.1; Win64; x64)')
|
||||||
bs = BeautifulSoup.BeautifulSoup(page)
|
bs = BeautifulSoup.BeautifulSoup(page)
|
||||||
print (bs)
|
bs_raw_version = bs.find('div',{'class':'version'}).text
|
||||||
|
version = re.sub('[^0123456789\.]', '', bs_raw_version)
|
||||||
|
|
||||||
version = bs.find('a')
|
for line in wgets(url_build).splitlines():
|
||||||
|
if '- build windows-' in line:
|
||||||
|
build = line.split('-')[3].rsplit('<')[0]
|
||||||
|
|
||||||
|
print version
|
||||||
|
print build
|
||||||
|
|
||||||
|
package_name = pe.package
|
||||||
|
|
||||||
|
remove_tree(makepath(os.getcwd(),'QOwnNotes'))
|
||||||
|
|
||||||
|
wget('https://github.com/pbek/QOwnNotes/releases/download/windows-%s/QOwnNotes.zip' % (build), target=os.getcwd())
|
||||||
|
with zipfile.ZipFile(makepath(os.getcwd(),'QOwnNotes.zip'), 'r') as zip_ref:
|
||||||
|
zip_ref.extractall(makepath(os.getcwd(),'QOwnNotes'))
|
||||||
|
|
||||||
|
remove_file(makepath(os.getcwd(),'QOwnNotes.zip'))
|
||||||
|
|
||||||
|
pe.version = version + '-0'
|
||||||
|
pe.save_control_to_wapt(os.getcwd())
|
||||||
|
|
||||||
print('Update package content from upstream binary sources')
|
print('Update package content from upstream binary sources')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user