]>
Raphaƫl G. Git Repositories - youtubedl/blob - devscripts/gh-pages/generate-download.py
   2 from __future__ 
import unicode_literals
 
   6 versions_info 
= json
.load(open('update/versions.json')) 
   7 version 
= versions_info
['latest'] 
   8 version_dict 
= versions_info
['versions'][version
] 
  11 with open('download.html.in', 'r', encoding
='utf-8') as tmplf
: 
  12     template 
= tmplf
.read() 
  14 template 
= template
.replace('@PROGRAM_VERSION@', version
) 
  15 template 
= template
.replace('@PROGRAM_URL@', version_dict
['bin'][0]) 
  16 template 
= template
.replace('@PROGRAM_SHA256SUM@', version_dict
['bin'][1]) 
  17 template 
= template
.replace('@EXE_URL@', version_dict
['exe'][0]) 
  18 template 
= template
.replace('@EXE_SHA256SUM@', version_dict
['exe'][1]) 
  19 template 
= template
.replace('@TAR_URL@', version_dict
['tar'][0]) 
  20 template 
= template
.replace('@TAR_SHA256SUM@', version_dict
['tar'][1]) 
  21 with open('download.html', 'w', encoding
='utf-8') as dlf
: