tis-audacity

3.0.0-1
Audacity is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems.
32731 downloads
Download
default icon

  Description 

  • package : tis-audacity
  • version : 3.0.0-1
  • architecture : all
  • categories : Media
  • maintainer : Tranquil IT,Jimmy PELÉ
  • description : Audacity is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems.
  • locale : all
  • target_os : windows
  • min_wapt_version : 1.5
  • sources : https://www.audacityteam.org/download/
  • installed_size : 75657216
  • impacted_process : audacity.exe
  • description_fr : Audacity est un logiciel d'enregistrement de son numérique et d'édition de sources audionumériques sous différents formats (mp3, Wave, AIFF, Flac, Ogg...).
  • description_pl :
  • description_de :
  • description_es : Audacity es una aplicación informática multiplataforma libre, que se puede usar para grabación y edición de audio, distribuido bajo la licencia GPLv2+.
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Audacity Team
  • licence : GPLv2
  • signature_date : 2021-03-29T13:55:37.076109
  • Homepage : https://www.audacityteam.org

  Setup.py 

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

uninstallkey = ['Audacity_is1']

# Audacity_is1  Audacity 2.3.2      2.3.2   "C:\Program Files (x86)\Audacity\unins000.exe"

def install():
    print('installing tis-audacity')

    # Getting the used storage on programfiles before installation (place it on the top)

    versionpaquet = control['version'].split('-',1)[0]

    # LAME is now built in
    install_exe_if_needed("audacity-win-%s.exe" % versionpaquet,silentflags='/VERYSILENT',key='Audacity_is1',min_version=versionpaquet,killbefore="audacity.exe")



def update_package():
    print('Download/Update package content from upstream binary sources')
    import requests,re
    from waptpackage import PackageEntry

    # Update transition from BeautifulSoup 3 to 4
    try:
        import bs4 as BeautifulSoup
    except:
        import BeautifulSoup

    appname = control['name']

    # 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}

    # Get latest version number from official website
    url = "https://www.fosshub.com/Audacity.html"
    r = requests.get(url,proxies=proxies)

    soup = BeautifulSoup.BeautifulSoup(r.text)
    version = soup.find("dd", {"itemprop" : 'softwareVersion' }).text
    #print(version)

    # Downloading files at Fosshub with JS translation

    #https://www.fosshub.com/Audacity.html?dwl=audacity-win-2.3.2.exe
    #https://download.fosshub.com/Protected/expiretime=1562302511;badurl=aHR0cHM6Ly93d3cuZm9zc2h1Yi5jb20vQXVkYWNpdHkuaHRtbA==/9602c61a2ba412005d94d735d1c98cb318a6fddab6b4c2ea45307e098437f3c1/5b7eee97e8058c20a7bbfcf4/5cd977044525770a47e45e5d/audacity-win-2.3.2.exe

    motif = "(\.exe|\.msi)$" # $ signifie fin de chaine en regex
    mc = re.compile(motif)

    soup = BeautifulSoup.BeautifulSoup(r.text)
    for link in soup.findAll("a", {"href" : mc }):
        #print(link)
        dl_url = link['href']
        #print(dl_url)

    for s in soup.findAll('script'):
        for u in s.contents:
            if "var settings" in u:
                #print("Trouvé la variable settings")
                value = u.replace("var settings =", "")
                break
    #print(value)

    import json
    settings = json.loads(value)
    settings

    apiUrl = 'https://api.' + settings['domain']
    domainUrl = 'https://www.' + settings['domain']
    downloadUrl = apiUrl + '/download/'
    #print(downloadUrl)

    def downloadFile(a, b, c, d, e):
        params = {  "projectId": a,
                    "releaseId": b,
                    "projectUri": c,
                    "fileName": d,
                    "source": e}
        r = requests.post(downloadUrl, data=params,proxies=proxies)
        return r

    pool = settings['pool']
    f = pool['f']

    for c in f:
        if not c['n'].endswith('.exe'):
            continue
        r = downloadFile(pool['p'], c['r'], pool['u'], c['n'], pool['c'] )
        #print(r.status_code)
        #print(r.text)
        break # on s'arrête au premier
    # break

    rj = r.json()
    url_final = rj['data']['url']
    url_final

    r = requests.get(url_final,proxies=proxies)


    print('Download url is: ' + url_final)

    filelatest = url_final.split('/')[-1]

    version = filelatest.split('-')[-1].strip('.exe')


    # Deleting outdated binaries
    for fileactual in glob.glob('audacity-win-*.exe'):
        if fileactual != filelatest :
            print(fileactual + ' Deleted')
            remove_file(fileactual)

    # Downloading latest binaires
    if not isfile(filelatest):
        print('Downloading: ' + url_final)
        wget (url_final,filelatest,proxies=proxies)
        print(version)
        control.version = version + '-0'
        control.save_control_to_wapt()
        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()


										

  Changelog 



No changelog.txt.
									
  manifest.sha256