MCPcopy Index your code
hub / github.com/bugy/script-server / download_web_files

Function download_web_files

tools/init.py:12–25  ·  view source on GitHub ↗
(project_path)

Source from the content-addressed store, hash-verified

10
11
12def download_web_files(project_path):
13 print('Downloading web files...')
14
15 from io import BytesIO
16 from zipfile import ZipFile
17 from urllib.request import urlopen
18
19 response = urlopen('https://github.com/bugy/script-server/releases/download/dev/script-server.zip')
20 with ZipFile(BytesIO(response.read())) as zipfile:
21 for file in zipfile.namelist():
22 if file.startswith('web/'):
23 zipfile.extract(file, project_path)
24
25 print('Done')
26
27
28def build_web_files(project_path):

Callers 1

prepare_projectFunction · 0.85

Calls 1

readMethod · 0.80

Tested by

no test coverage detected