Robot Framework Integrated Development Environment (RIDE)
create_libdoc_data.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 from __future__ import print_function
4 
5 import sys
6 from os.path import abspath, dirname, join, normpath
7 
8 BASE = dirname(abspath(__file__))
9 SRC = normpath(join(BASE, '..', '..', '..', '..', 'src'))
10 # must generate data next to testdoc.html to get relative sources correct
11 INPUT = join(BASE, 'libdoc.txt')
12 OUTPUT = join(BASE, 'libdoc.js')
13 
14 sys.path.insert(0, SRC)
15 
16 from robotide.lib.robot.libdoc import LibraryDocumentation
17 from robotide.lib.robot.libdocpkg.htmlwriter import LibdocModelWriter
18 
19 with open(OUTPUT, 'w') as output:
20  libdoc = LibraryDocumentation(INPUT)
21  LibdocModelWriter(output, libdoc).write_data()
22 
23 print(OUTPUT)
def LibraryDocumentation(library_or_resource, name=None, version=None, doc_format=None)
Definition: __init__.py:32
def abspath(path, case_normalize=False)
Replacement for os.path.abspath with some enhancements and bug fixes.
Definition: robotpath.py:87
def normpath(path, case_normalize=False)
Replacement for os.path.normpath with some enhancements.
Definition: robotpath.py:68