tis-openshot-video

2.5.1-8
OpenShot Video Editor is a free and open-source video editor for Linux, macOS, and Windows.
2672 downloads
Download

  Description 

  • package : tis-openshot-video
  • version : 2.5.1-8
  • architecture : x86
  • categories : Media
  • maintainer : WAPT Team,Tranquil IT,Kenan KILICARSLAN,Jimmy PELÉ
  • description : OpenShot Video Editor is a free and open-source video editor for Linux, macOS, and Windows.
  • locale : all
  • target_os : windows
  • min_os_version : 6.1
  • max_os_version :
  • min_wapt_version : 1.7
  • sources : https://www.openshot.org/fr/download/
  • installed_size :
  • impacted_process : openshot-qt,openshot-qt-cli
  • description_fr : OpenShot Video Editor est un éditeur vidéo non linéaire libre pour GNU/Linux, OS X et Windows.
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Jonathan Thomas,Andy Finch,Helen McCall,Olivier Girard,Karlinux,TJ,Maël Lavault
  • licence : GPL
  • signature_date : 2020-11-26T20:52:18.788224
  • Homepage : https://www.openshot.org

  Setup.py 

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

uninstallkey = []

# Defining variables
bin_name_string = 'OpenShot-%s-x86.exe'
silent_args = '/VERYSILENT'
app_uninstallkey = '{4BB0DCDC-BC24-49EC-8937-72956C33A470}_is1'


def install():
    # Initializing variables
    package_version = control.version.split('-',1)[0]
    bin_name = bin_name_string % package_version

    # Installing the package
    print('Installing: %s' % bin_name)
    install_exe_if_needed(bin_name,
        silentflags=silent_args,
        key=app_uninstallkey,
        min_version=package_version)


def update_package():
    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    url_api = 'https://api.github.com/repos/OpenShot/openshot-qt/releases/latest'
    bin_end = bin_name_string.split('-')[-1]

    # Getting latest version from official sources
    print('API used is: ' + url_api)
    json_load = json.loads(wgets(url_api,proxies=proxies))

    for download in json_load['assets']:
        if download['browser_download_url'].endswith(bin_end):
            url_dl = download['browser_download_url']
            break

    version = (json_load['tag_name']).replace('v','')
    latest_bin = bin_name_string % version

    print("Latest %s version is: %s" % (app_name, version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print('Downloading: %s' % latest_bin)
        wget(url_dl, latest_bin, proxies=proxies)

        # Changing version of the package
        control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
        control.save_control_to_wapt()
        print('Changing package version to: %s in WAPT\\control' % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(version)




def get_proxies():
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()


def get_proxies_from_wapt_console():
    proxies = {}
    if platform.system() == 'Windows':
        waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
    else:
        waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
    if isfile(waptconsole_ini_path):
        proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
        if proxy_wapt:
            proxies = {'http': proxy_wapt, 'https': proxy_wapt}
    return proxies


def get_version_from_binary(filename):
    if filename.endswith('.msi'):
        return get_msi_properties(filename)['ProductVersion']
    else:
        return get_file_properties(filename)['ProductVersion']


def remove_outdated_binaries(version, list_extensions=['exe','msi','deb','rpm','dmg','pkg'], list_filename_contain=None):
    if type(list_extensions) != list:
        list_extensions = [list_extensions]
    if list_filename_contain:
        if type(list_filename_contain) != list:
            list_filename_contain = [list_filename_contain]
    list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*%s' % file_ext):
            if not version in bin_in_dir:
                remove_file(bin_in_dir)
            if list_filename_contain:
                for filename_contain in list_filename_contain:
                    if not filename_contain in bin_in_dir:
                        remove_file(bin_in_dir)


										

  Changelog 


No changelog
  manifest.sha256 
[["OpenShot-2.5.1-x86.exe","9fe1cb6bd0b220da72e7a6b79bbc57e00ad295c04cc896dfbe58a43ea9401837"],["setup.py","5f39aa4396a0eb9508a69a9a4a11a4b32a86deb92f036d66b2680f02a03f4e02"],["WAPT/icon.png","03c2c6e4bd5a1df4788186ec58b62561f2766030d75504c288a17f181625d467"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","8ace4c9e9f32a375fb47d9ee5ecc072415d0eebb22adb8fd9439a8761de1df64"]]