def get_pack_json(): url = "http://download.nodecdn.net/containers/atl/launcher/json/packs.json" print("Grabbing new copy of packs.json from {u}".format(u=url)) fetch_url(url, 'packs.json', None) with open('packs.json', 'r') as f: packs_json = json.load(f) return packs_json
def get_pack_json(): url = "http://download.nodecdn.net/containers/atl/launcher/json/packs.json" print ("Grabbing new copy of packs.json from {u}".format(u=url)) fetch_url(url,'packs.json',None) with open('packs.json', 'r') as f: packs_json = json.load(f) return packs_json
def download(self, server_or_client): assert server_or_client in ("server","client") if not self.selected_for_install(server_or_client): print "Skipping {f} (optional or not required on {sc}).".format(f=self['install_filename'], sc=server_or_client) return if self['download_url_primary'] == "Download file manually": print "Not installing {f} automatically. Download it manually if you need it.".format(f=self['install_filename']) return self.validate_attributes() print ("Downloading {f} from {u}".format(f=self['install_filename'], u=self['download_url_primary'])) fetch_url(self['download_url_primary'], self['install_filename'], self['download_md5'])
def fetch_atlauncher_config_xml(pack_name, pack_version): config_xml_url = "{u}packs/{pn}/versions/{pv}/Configs.xml".format( u=URL_BASE, pn=pack_name, pv=pack_version) config_xml_filename = "Configs_{pn}_{pv}.xml".format(pn=pack_name, pv=pack_version) config_xml_file_path = fetch_url(config_xml_url, config_xml_filename, None) return config_xml_file_path
def download(self, server_or_client): assert server_or_client in ("server", "client") if not self.selected_for_install(server_or_client): print "Skipping {f} (optional or not required on {sc}).".format( f=self['install_filename'], sc=server_or_client) return if self['download_url_primary'] == "Download file manually": print "Not installing {f} automatically. Download it manually if you need it.".format( f=self['install_filename']) return self.validate_attributes() print("Downloading {f} from {u}".format( f=self['install_filename'], u=self['download_url_primary'])) fetch_url(self['download_url_primary'], self['install_filename'], self['download_md5'])