def download_client(to_directory: str) -> None: """Download and unpack projector client""" download_file(PROJECTOR_CLIENT_URL, to_directory) file_path = join(to_directory, get_file_name_from_url(PROJECTOR_CLIENT_URL)) unpack_zip_file(file_path, to_directory) remove(file_path)
def download_server(to_dir: str) -> None: """Download and unpack projector server""" download_file(PROJECTOR_SERVER_URL, to_dir) file_path = join(to_dir, get_file_name_from_url(PROJECTOR_SERVER_URL)) dir_name = unpack_zip_file(file_path, to_dir) temp_dir = join(to_dir, dir_name) jars_path = join(temp_dir, 'lib') copy_all_files(jars_path, to_dir) rmtree(temp_dir) remove(file_path)
def download_plugin(to_dir: str) -> None: """Downloads and installs projector markdown plugin""" download_file(MARKDOWN_PLUGIN_URL, to_dir) file_path = join(to_dir, get_file_name_from_url(MARKDOWN_PLUGIN_URL)) unpack_zip_file(file_path, to_dir) remove(file_path)