mirror of https://gitee.com/bigwinds/arangodb
Some improvements in the python script
This commit is contained in:
parent
82a220361c
commit
06e033c0c8
|
@ -26,7 +26,12 @@ def getTextFromSourceFile(searchText, full_path):
|
|||
match = re.search(r'@startDocuBlock\s+'+ searchText + "(?:\s+|$)" +'(.+?)@endDocuBlock', s,re.DOTALL)
|
||||
if match:
|
||||
textExtracted = match.group(1)
|
||||
textExtracted = textExtracted.replace("<br />","\n")
|
||||
textExtracted = textExtracted.replace("<br />","\n")
|
||||
textExtracted = re.sub(r"@RESTHEADER{(.*)}", r"`\g<1>`", textExtracted)
|
||||
textExtracted = re.sub(r"@RESTRETURNCODE{(.*)}", r"`HTTP \g<1>`", textExtracted)
|
||||
textExtracted = re.sub(r"@RESTBODYPARAM{(.*)}", r"*(\g<1>)*", textExtracted)
|
||||
textExtracted = textExtracted.replace("@RESTDESCRIPTION","")
|
||||
textExtracted = textExtracted.replace("@RESTRETURNCODES","###Return Codes")
|
||||
replaceText(textExtracted, full_path, searchText)
|
||||
|
||||
def replaceText(text, pathOfFile, searchText):
|
||||
|
|
|
@ -132,8 +132,7 @@ def fetch_comments(dirpath):
|
|||
fh.write("\n<!-- filename: %s -->\n" % filename)
|
||||
for _com in comment:
|
||||
_text = re.sub(r"//(/)+\s*\n", "<br />", _com)
|
||||
_text = re.sub(r"///+(\s+) + -", " -", _text)
|
||||
_text = re.sub(r"///+(\s+) + \*", " *", _text)
|
||||
_text = re.sub(r"///+(\s+\s+)([-\*\d])", r" \2", _text)
|
||||
_text = re.sub(r"///\s*", "", _text)
|
||||
_text = _text.strip("\n")
|
||||
if _text:
|
||||
|
|
|
@ -5535,7 +5535,7 @@ static v8::Handle<v8::Value> JS_DatafileScanVocbaseCol (v8::Arguments const& arg
|
|||
/// "isNewlyCreated" : true
|
||||
/// }
|
||||
/// @endcode
|
||||
/// endDocuBlock
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static v8::Handle<v8::Value> JS_EnsureIndexVocbaseCol (v8::Arguments const& argv) {
|
||||
|
|
Loading…
Reference in New Issue