[docs] Include rally-openstack plugins into docs
Change-Id: I349b92245f800d141ba33f1d9009761f15742e30
This commit is contained in:
@@ -22,15 +22,17 @@ from docutils.parsers import rst
|
|||||||
from docutils import utils
|
from docutils import utils
|
||||||
import string
|
import string
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
|
|
||||||
def parse_text(text):
|
def parse_text(text):
|
||||||
parser = rst.Parser()
|
parser = rst.Parser()
|
||||||
settings = frontend.OptionParser(
|
settings = frontend.OptionParser(
|
||||||
components=(rst.Parser,)).get_default_values()
|
components=(rst.Parser,)).get_default_values()
|
||||||
document = utils.new_document(text, settings)
|
document = utils.new_document(text, settings)
|
||||||
parser.parse(text, document)
|
try:
|
||||||
|
parser.parse(text, document)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"WARNING: {e}")
|
||||||
|
return []
|
||||||
return document.children
|
return document.children
|
||||||
|
|
||||||
|
|
||||||
@@ -51,7 +53,7 @@ def make_definition(term, ref, descriptions):
|
|||||||
{"ref": ref, "term": term})
|
{"ref": ref, "term": term})
|
||||||
for descr in descriptions:
|
for descr in descriptions:
|
||||||
if descr:
|
if descr:
|
||||||
if isinstance(descr, (six.text_type, six.binary_type)):
|
if isinstance(descr, (str, bytes)):
|
||||||
if descr[0] not in string.ascii_uppercase:
|
if descr[0] not in string.ascii_uppercase:
|
||||||
descr = descr.capitalize()
|
descr = descr.capitalize()
|
||||||
descr = paragraph(" %s" % descr)
|
descr = paragraph(" %s" % descr)
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
# we are using theme from it
|
# we are using theme from it
|
||||||
oslosphinx
|
oslosphinx
|
||||||
|
|
||||||
|
# Rally plugins
|
||||||
|
rally-openstack
|
||||||
Reference in New Issue
Block a user