tis-dvdstyler 3.0.3-1

  • package : tis-dvdstyler
  • version : 3.0.3-1
  • description : DVDStyler est une application gratuite edition DVD pour la creation de DVDs de style professionnel
  • maintainer : Tranquil IT Systems
  • date : 2017-09-27 17:12:45

setup.py

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

uninstallkey = []

software_name = "DVD Styler"

def install():
    print('installing tis-dvdstyler')
    versionsoft = control['version'].split('-',1)[0]
    if iswin64():
        install_exe_if_needed("DVDStyler-%s-win64.exe" % versionsoft,'/VERYSILENT /SUPPRESSMSGBOXES /NORESTART',key='')
    else:
        install_exe_if_needed("DVDStyler-%s-win32.exe" % versionsoft,'/VERYSILENT /SUPPRESSMSGBOXES /NORESTART',key='')


def update_package():
    import BeautifulSoup,requests,re
    from waptpackage import PackageEntry
    verify=True
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    current_version = pe['version'].split('-',1)[0]

    base_url = "https://www.dvdstyler.org/en/downloads"

    page = requests.get(base_url,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('div',{'itemprop':'articleBody'}).find('h2').text)
    software_version = re.findall('DVDStyler v(.*)',str(bs_raw_string))[0]

    print "Current %s WAPT package version is : %s" % (software_name,current_version)
    print "Latest %s version available is : %s" % (software_name,software_version)

    if Version(current_version) < Version(software_version):
        print("%s package is not up-to-date, updating" % software_name)
        print("Cleanup current files")

        filename = "DVDStyler-%s-win32.exe" % software_version
        filename64 = "DVDStyler-%s-win64.exe" % software_version

        for exe in glob.glob('*.exe'):
            if exe not in {filename,filename64}:
                remove_file(exe)

        print("Downloading latest version")
        download_url = 'https://freefr.dl.sourceforge.net/project/dvdstyler/dvdstyler/%s/DVDStyler-%s-win32.exe' % (software_version,software_version)
        download_url64 = 'https://freefr.dl.sourceforge.net/project/dvdstyler/dvdstyler/%s/DVDStyler-%s-win64.exe' % (software_version,software_version)
        wget(download_url,filename)
        wget(download_url64,filename64)

        pe.version = software_version + '-0'
        pe.save_control_to_wapt(os.getcwd())
    else:
        print("No update needed, package already up to date")

if __name__ == "__main__":
    update_package()

    

Changelog

No changelog
    

manifest.sha256

[["WAPT/icon.png", "31a9c4ea274edb8b4d365129a2bbef3d6b8b60c76f47edb8b6e426c0fb408282"], ["WAPT/certificate.crt", "20f25d6b242159077345379865f8e0d84bdc9e4764190f1aa6cb3816bcabd341"], ["WAPT/wapt.psproj", "795d36d10109ca85357285f79090fac2be856e5830ea31fa913cc55cb825807b"], ["DVDStyler-3.0.3-win32.exe", "ea598e9744501544fa2eae12b3e7be41bada003007073bd103b1fd25bcb75952"], ["DVDStyler-3.0.3-win64.exe", "d0c3428570127071117bb25488806e05662589bd96b9536e280c6407ca7a44ca"], ["setup.py", "d51f74ff27f3c1baafffb81ed536ad5af53716c2ca3918804241bf830c7fe673"], ["WAPT/control", "3a940d5fc908a2e42a6bb000ac0b76628d1d06fa1975228710b8141e780b2c15"]]