-
Notifications
You must be signed in to change notification settings - Fork 244
/
tasks.py
36 lines (29 loc) · 934 Bytes
/
tasks.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from pathlib import Path
import shutil
from docutils.core import publish_cmdline
from invoke import task
from rellu.tasks import clean
assert Path.cwd() == Path(__file__).parent
@task
def project_docs(ctx):
"""Generate project documentation.
These docs are visible at http://robotframework.org/WebDemo/.
"""
args = ['--stylesheet=style.css,extra.css',
'--link-stylesheet',
'README.rst',
'docs/index.html']
publish_cmdline(writer_name='html5', argv=args)
print(Path(args[-1]).absolute())
@task
def move_docs(ctx):
"""Move report.html and log.html to docs
These docs are visible http://robotframework.org/WebDemo/.
"""
log = Path('./log.html')
report = Path('./report.html')
dest = Path('.') / 'docs'
print(log.absolute())
shutil.copy(log.absolute(), str(dest))
print(report.absolute())
shutil.copy(report.absolute(), str(dest))