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
François Bailly
Gepetto Utils
Commits
e5196825
Commit
e5196825
authored
Jun 25, 2018
by
Guilhem Saurel
Browse files
doc.{py,sh} get coverage pages
parent
74af097f
Changes
2
Hide whitespace changes
Inline
Side-by-side
scripts/doc.py
View file @
e5196825
...
...
@@ -9,7 +9,6 @@ import requests
DOC
=
Path
(
'/net/pongo/vol/vol_projects/partage_gepetto/Doc'
)
GITLAB
=
'https://gepgitlab.laas.fr'
RAINBOARD
=
'http://rainboard.laas.fr'
VERSION
=
'16.04'
INDEX
=
DOC
/
'index.html'
HEAD
=
DOC
/
'index.head.html'
...
...
@@ -22,7 +21,7 @@ if __name__ == '__main__':
for
project
,
namespace
,
branch
in
sorted
(
requests
.
get
(
f
'
{
RAINBOARD
}
/doc'
).
json
()[
'ret'
]):
url
=
f
'
{
GITLAB
}
/
{
namespace
}
/
{
project
}
/-/jobs/artifacts/
{
branch
}
/download'
path
=
DOC
/
namespace
/
project
/
branch
r
=
requests
.
get
(
url
,
{
'job'
:
f
'robotpkg-
{
project
}
-
{
VERSION
}
-releas
e'
},
stream
=
True
)
r
=
requests
.
get
(
url
,
{
'job'
:
'doc-coverag
e'
},
stream
=
True
)
try
:
z
=
ZipFile
(
BytesIO
(
r
.
content
))
path
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
...
...
@@ -33,7 +32,14 @@ if __name__ == '__main__':
if
path
.
exists
():
with
INDEX
.
open
(
'a'
)
as
f
:
link
=
path
.
relative_to
(
DOC
)
print
(
f
'<tr><td>
{
project
}
</td><td>
{
namespace
}
</td><td><a href="
{
link
}
">
{
branch
}
</a></td></tr>'
,
file
=
f
)
doxygen
,
coverage
=
link
/
'doxygen-html'
,
link
/
'coverage'
print
(
f
'<tr><td>
{
project
}
</td><td>
{
namespace
}
</td><td>
{
branch
}
</td><td>'
,
file
=
f
)
if
(
DOC
/
doxygen
).
is_dir
():
print
(
f
'<a href="
{
doxygen
}
">Doc</a>'
,
file
=
f
)
print
(
'</td><td>'
,
file
=
f
)
if
(
DOC
/
coverage
).
is_dir
():
print
(
f
'<a href="
{
coverage
}
">Coverage</a>'
,
file
=
f
)
print
(
'</td></tr>'
,
file
=
f
)
with
INDEX
.
open
(
'a'
)
as
f
:
print
(
'</table></body></html>'
,
file
=
f
)
scripts/doc.sh
View file @
e5196825
...
...
@@ -6,24 +6,5 @@ set -e
cd
/net/pongo/vol/vol_projects/partage_gepetto/Doc
for
namespace
in
*
;
do
[[
-d
$namespace
]]
||
continue
pushd
$namespace
for
project
in
*
;
do
pushd
$project
for
branch
in
*
;
do
pushd
$branch
for
folder
in
html doxygen-html
;
do
[[
-d
$folder
]]
||
continue
cp
-r
$folder
/
*
.
rm
-r
$folder
done
popd
done
popd
done
popd
done
find
.
-type
d
-exec
chmod
0775
{}
\;
find
.
-type
f
-exec
chmod
0664
{}
\;
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