chore(doc): remove javadoc creation
@@ -13,8 +13,6 @@ class GenerateApiDocs:
AUTODOC_DIR = join(BUILD_DIR, 'autodoc')
ROOT = normpath(join(BUILD_DIR, '..', '..'))
ROBOT_DIR = join(ROOT, 'src', 'robot')
- JAVA_SRC = join(ROOT, 'src', 'java')
- JAVA_TARGET = join(BUILD_DIR, '_static', 'javadoc')
def __init__(self):
try:
@@ -25,8 +23,6 @@ class GenerateApiDocs:
def run(self):
self.create_autodoc()
- if self.options.javadoc:
- self.create_javadoc()
orig_dir = abspath(os.curdir)
os.chdir(self.BUILD_DIR)
rc = call(['make', 'html'], shell=os.name == 'nt')
@@ -47,18 +43,6 @@ class GenerateApiDocs:
print(' '.join(command))
call(command)
- def create_javadoc(self):
- print('Generating javadoc')
- self._clean_directory(self.JAVA_TARGET)
- command = ['javadoc',
- '-locale', 'en_US',
- '-sourcepath', self.JAVA_SRC,
- '-d', self.JAVA_TARGET,
- '-notimestamp',
- 'org.robotframework']
- print(' '.join(command))
- call(command)
-
def _clean_directory(self, dirname):
if os.path.exists(dirname):
print('Cleaning', dirname)
@@ -69,38 +53,18 @@ class GeneratorOptions:
usage = '''
generate.py [options]
- This script creates API documentation from both Python and Java source code
- included in `src/python and `src/java`, respectively. Python autodocs are
- created in `doc/api/autodoc` and Javadocs in `doc/api/_static/javadoc`.
+ This script creates API documentation from Python source code
+ included in `src/python. Python autodocs are
+ created in `doc/api/autodoc`.
API documentation entry point is create using Sphinx's `make html`.
- Sphinx, sphinx-apidoc and javadoc commands need to be in $PATH.
+ Sphinx and sphinx-apidoc commands need to be in $PATH.
'''
def __init__(self):
self._parser = OptionParser(self.usage)
- self._add_options()
self._options, _ = self._parser.parse_args()
- if not self._options.javadoc:
- self._prompt_for_generation('javadoc')
-
- @property
- def javadoc(self):
- return self._options.javadoc
-
- def _add_options(self):
- self._parser.add_option('-j', '--javadoc',
- action='store_true',
- dest='javadoc',
- help='Generates Javadoc'
- )
-
- def _prompt_for_generation(self, attr_name):
- selection = input('Generate also %s? '
- '[Y/N] (N by default) > ' % attr_name.title())
- if selection and selection[0].lower() == 'y':
- setattr(self._options, attr_name, True)
if __name__ == '__main__':
