Commit 03e39ef8 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

détails

parent 0cd1ff35
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import os import os
from pathlib import Path from pathlib import Path
from zipfile import ZipFile from zipfile import BadZipFile, ZipFile
from io import BytesIO from io import BytesIO
import requests import requests
...@@ -14,12 +14,12 @@ VERSION = '16.04' ...@@ -14,12 +14,12 @@ VERSION = '16.04'
if __name__ == '__main__': if __name__ == '__main__':
for project, namespace, branch in requests.get(f'{RAINBOARD}/doc').json()['ret']: for project, namespace, branch in requests.get(f'{RAINBOARD}/doc').json()['ret']:
r = requests.get(f'{GITLAB}/{namespace}/{project}/-/jobs/artifacts/{branch}/download', url = f'{GITLAB}/{namespace}/{project}/-/jobs/artifacts/{branch}/download'
{'job': f'robotpkg-{project}-{VERSION}'}, stream=True) r = requests.get(url, {'job': f'robotpkg-{project}-{VERSION}'}, stream=True)
try: try:
z = ZipFile(BytesIO(r.content)) z = ZipFile(BytesIO(r.content))
path = DOC / namespace / project / branch path = DOC / namespace / project / branch
path.mkdir(parents=True, exist_ok=True) path.mkdir(parents=True, exist_ok=True)
z.extractall(str(path)) z.extractall(str(path))
except: except BadZipFile:
continue continue
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment