You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
887 B

  1. #!/usr/bin/env python3
  2. from __future__ import unicode_literals
  3. import json
  4. versions_info = json.load(open('update/versions.json'))
  5. version = versions_info['latest']
  6. version_dict = versions_info['versions'][version]
  7. # Read template page
  8. with open('download.html.in', 'r', encoding='utf-8') as tmplf:
  9. template = tmplf.read()
  10. template = template.replace('@PROGRAM_VERSION@', version)
  11. template = template.replace('@PROGRAM_URL@', version_dict['bin'][0])
  12. template = template.replace('@PROGRAM_SHA256SUM@', version_dict['bin'][1])
  13. template = template.replace('@EXE_URL@', version_dict['exe'][0])
  14. template = template.replace('@EXE_SHA256SUM@', version_dict['exe'][1])
  15. template = template.replace('@TAR_URL@', version_dict['tar'][0])
  16. template = template.replace('@TAR_SHA256SUM@', version_dict['tar'][1])
  17. with open('download.html', 'w', encoding='utf-8') as dlf:
  18. dlf.write(template)