tis-mp4tools 3.5-2

  • package : tis-mp4tools
  • version : 3.5-2
  • description : MP4Tools video mp4 joiner mp4 splitter (Thüring IT-Consulting)
  • maintainer : Hubert TOUVET
  • date : 2017-09-26 11:32:43

setup.py

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

uninstallkey = []

software_name = "MP4Tools"

def install():
    pe = PackageEntry().load_control_from_wapt ('.')
    software_version = pe.version.split('-',1)[0]
    exe = 'MP4Tools-%s-win32-pb.exe' % software_version
    install_exe_if_needed(exe,'/VERYSILENT',key='MP4Tools_is1',min_version='')

def update_package():
    import BeautifulSoup,requests,re
    from zipfile import *
    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.mp4joiner.org/en/"

    page = requests.get(base_url,headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'},verify=verify).text
    bs = BeautifulSoup.BeautifulSoup(page)
    pattern = re.compile(r"/download/MP4Tools-(.*)-win32-pb.exe")
    bs_raw_string = str(bs.find('a',{'href':pattern}).text)
    software_version = re.findall('MP4Tools-(.*)-win32-pb.exe',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 = "MP4Tools-%s-win32-pb.exe" % software_version

        for exe in glob.glob('*.exe'):
            if exe != filename:
                remove_file(exe)

        print("Downloading latest version")
        download_url = 'https://kent.dl.sourceforge.net/project/mp4joiner/MP4Tools/%s/MP4Tools-%s-win32.exe' % (software_version,software_version)
        wget(download_url,filename)

        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

[["MP4Tools-3.5-win32-pb.exe", "36f36afa2e5dfc463f6340a460f36b2f5d2cdb6ed8255c3931b04746ab79febd"], ["WAPT/icon.png", "70270f55a8f1152f90dfd29a7c2dfa3b3d788223992a49e9eb43ebedc7ac5482"], ["WAPT/certificate.crt", "20f25d6b242159077345379865f8e0d84bdc9e4764190f1aa6cb3816bcabd341"], ["WAPT/wapt.psproj", "af0bfb79cfa2e2f1cecd14449c2360511f9c4d7bd9898cdf4789512f062955d4"], ["setup.py", "4d11b1888c55ddddcfa48123a2efca2e234c751d6a08f7a7694ad1690322bef6"], ["WAPT/control", "8e5a40b61c666585cd75fa8c7c2d83cce50c1ff8710bdfe4206f10198297d19d"]]