Robot Framework
create_libdoc_data.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import sys
4 from os.path import abspath, dirname, join, normpath
5 
6 BASE = dirname(abspath(__file__))
7 SRC = normpath(join(BASE, '..', '..', '..', '..', 'src'))
8 INPUT = join(BASE, 'libdoc_data.py')
9 OUTPUT = join(BASE, 'libdoc.js')
10 
11 sys.path.insert(0, SRC)
12 
13 from robot.libdoc import LibraryDocumentation
14 
15 libdoc = LibraryDocumentation(INPUT)
16 libdoc.convert_docs_to_html()
17 with open(OUTPUT, 'w') as output:
18  output.write('libdoc = ')
19  output.write(libdoc.to_json())
20 
21 print(OUTPUT)
def LibraryDocumentation(library_or_resource, name=None, version=None, doc_format=None)
Generate keyword documentation for the given library, resource or suite file.
Definition: builder.py:55
def abspath(path, case_normalize=False)
Replacement for os.path.abspath with some enhancements and bug fixes.
Definition: robotpath.py:65
def normpath(path, case_normalize=False)
Replacement for os.path.normpath with some enhancements.
Definition: robotpath.py:46