Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Olivier Stasse
Gepetto Utils
Commits
03e39ef8
Commit
03e39ef8
authored
Apr 11, 2018
by
Guilhem Saurel
Browse files
détails
parent
0cd1ff35
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/doc.py
View file @
03e39ef8
...
...
@@ -2,7 +2,7 @@
import
os
from
pathlib
import
Path
from
zipfile
import
ZipFile
from
zipfile
import
BadZipFile
,
ZipFile
from
io
import
BytesIO
import
requests
...
...
@@ -14,12 +14,12 @@ VERSION = '16.04'
if
__name__
==
'__main__'
:
for
project
,
namespace
,
branch
in
requests
.
get
(
f
'
{
RAINBOARD
}
/doc'
).
json
()[
'ret'
]:
r
=
requests
.
get
(
f
'
{
GITLAB
}
/
{
namespace
}
/
{
project
}
/-/jobs/artifacts/
{
branch
}
/download'
,
{
'job'
:
f
'robotpkg-
{
project
}
-
{
VERSION
}
'
},
stream
=
True
)
url
=
f
'
{
GITLAB
}
/
{
namespace
}
/
{
project
}
/-/jobs/artifacts/
{
branch
}
/download'
r
=
requests
.
get
(
url
,
{
'job'
:
f
'robotpkg-
{
project
}
-
{
VERSION
}
'
},
stream
=
True
)
try
:
z
=
ZipFile
(
BytesIO
(
r
.
content
))
path
=
DOC
/
namespace
/
project
/
branch
path
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
z
.
extractall
(
str
(
path
))
except
:
except
BadZipFile
:
continue
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment