[DEV] update to new documention model
This commit is contained in:
parent
b256a30b36
commit
e2ca9ebddc
@ -20,6 +20,8 @@ my_args.add("C", "color", desc="Display makefile output in color")
|
||||
my_args.add_section("cible", "generate in order set")
|
||||
local_argument = my_args.parse()
|
||||
|
||||
debug.set_level(6)
|
||||
|
||||
##
|
||||
## @brief Display the help of this makefile
|
||||
##
|
||||
@ -77,33 +79,33 @@ def start():
|
||||
debug.warning("Can not understand argument : '" + argument.get_option_name() + "'")
|
||||
usage()
|
||||
else:
|
||||
module = module.get_module(argument.get_arg())
|
||||
module.parse_code()
|
||||
module.generate()
|
||||
module_value = module.get_module(argument.get_arg())
|
||||
module_value.parse_code()
|
||||
module_value.generate()
|
||||
actionDone=True
|
||||
# if no action done : we do "all" ...
|
||||
if actionDone==False:
|
||||
#Must generate all docs :
|
||||
moduleElements = module.get_all_module()
|
||||
for module in moduleElements:
|
||||
module.parse_code()
|
||||
for module in moduleElements:
|
||||
module.generate()
|
||||
for module_value in moduleElements:
|
||||
module_value.parse_code()
|
||||
for module_value in moduleElements:
|
||||
module_value.generate()
|
||||
|
||||
##
|
||||
## @brief When the user use with make.py we initialise ourself
|
||||
##
|
||||
if __name__ == '__main__':
|
||||
sys.path.append(tools.get_run_folder())
|
||||
# Import all sub path without out and archive
|
||||
for folder in os.listdir("."):
|
||||
if os.path.isdir(folder)==True:
|
||||
if folder.lower()!="android" \
|
||||
and folder.lower()!="archive" \
|
||||
and folder.lower()!="out" :
|
||||
debug.debug("Automatic load path: '" + folder + "'")
|
||||
module.import_path(folder)
|
||||
start()
|
||||
#if __name__ == '__main__':
|
||||
sys.path.append(tools.get_run_folder())
|
||||
# Import all sub path without out and archive
|
||||
for folder in os.listdir("."):
|
||||
if os.path.isdir(folder)==True:
|
||||
if folder.lower()!="android" \
|
||||
and folder.lower()!="archive" \
|
||||
and folder.lower()!="out" :
|
||||
debug.debug("Automatic load path: '" + folder + "'")
|
||||
module.import_path(folder)
|
||||
start()
|
||||
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import codeHL
|
||||
import re
|
||||
|
||||
@ -16,7 +16,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
#value = re.sub(r'\[code(( |\t|\n|\r)+style=(.*))?\](.*?)\[/code\]',
|
||||
value = re.sub(r'\[code(( |\t|\n|\r)+style=(.*?))?\](.*?)\[/code\]',
|
||||
replace_code, #r'<pre>\4</pre>',
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
return value
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
value = re.sub(r'\n:',
|
||||
r'\n:INDENT:',
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
|
||||
# named link : [[http://plop.html | link name]]
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
return value
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
return value
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ import re
|
||||
## @param[in] string String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
value = re.sub(r'\[b\](.*?)\[/b\]',
|
||||
r'<span style="font-weight: bold;">\1</span>',
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
value = re.sub(r'=\?=(.*?)=\?=',
|
||||
r'<h1><center>\1</center></h1>',
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
value = re.sub(r'\/\*(.*?)\*\/',
|
||||
r'',
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
value = re.sub(r'\r\n',
|
||||
r'\n',
|
||||
|
52
monk/codeBB/__init__.py
Normal file
52
monk/codeBB/__init__.py
Normal file
@ -0,0 +1,52 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
from monk import tools
|
||||
import re
|
||||
import BB_Title
|
||||
import BB_Text
|
||||
import BB_IndentAndDot
|
||||
import BB_Link
|
||||
import BB_Image
|
||||
import BB_Table
|
||||
|
||||
import BB_comment
|
||||
import BB_lineReturn
|
||||
import BB_Code
|
||||
import BB_Specification
|
||||
|
||||
##
|
||||
## @brief Transcode input data in the corect format.
|
||||
## @param[in] string String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value, _base_path = ""):
|
||||
# remove html property
|
||||
value = re.sub(r'<', r'<', value)
|
||||
value = re.sub(r'>', r'>', value)
|
||||
value = BB_comment.transcode(value, _base_path)
|
||||
value = BB_Title.transcode(value, _base_path)
|
||||
value = BB_Text.transcode(value, _base_path)
|
||||
value = BB_IndentAndDot.transcode(value, _base_path)
|
||||
value = BB_Link.transcode(value, _base_path)
|
||||
value = BB_Image.transcode(value, _base_path)
|
||||
value = BB_Table.transcode(value, _base_path)
|
||||
value = BB_Code.transcode(value, _base_path)
|
||||
value = BB_Specification.transcode(value, _base_path)
|
||||
value = BB_lineReturn.transcode(value, _base_path)
|
||||
return value
|
||||
|
||||
##
|
||||
## @brief transcode a BBcode file in a html file
|
||||
## @return True if the file is transformed
|
||||
##
|
||||
def transcode_file(inputFileName, outputFileName):
|
||||
inData = tools.file_read_data(inputFileName)
|
||||
if inData == "":
|
||||
return False
|
||||
outData = transcode(inData)
|
||||
debug.warning(" out: " + outputFileName)
|
||||
tools.file_write_data(outputFileName, outData)
|
||||
return True
|
||||
|
||||
|
@ -1,52 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
import re
|
||||
import BB_Title
|
||||
import BB_Text
|
||||
import BB_IndentAndDot
|
||||
import BB_Link
|
||||
import BB_Image
|
||||
import BB_Table
|
||||
|
||||
import BB_comment
|
||||
import BB_lineReturn
|
||||
import BB_Code
|
||||
import BB_Specification
|
||||
|
||||
##
|
||||
## @brief Transcode input data in the corect format.
|
||||
## @param[in] string String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
# remove html property
|
||||
value = re.sub(r'<', r'<', value)
|
||||
value = re.sub(r'>', r'>', value)
|
||||
value = BB_comment.transcode(value)
|
||||
value = BB_Title.transcode(value)
|
||||
value = BB_Text.transcode(value)
|
||||
value = BB_IndentAndDot.transcode(value)
|
||||
value = BB_Link.transcode(value)
|
||||
value = BB_Image.transcode(value)
|
||||
value = BB_Table.transcode(value)
|
||||
value = BB_Code.transcode(value)
|
||||
value = BB_Specification.transcode(value)
|
||||
value = BB_lineReturn.transcode(value)
|
||||
return value
|
||||
|
||||
##
|
||||
## @brief transcode a BBcode file in a html file
|
||||
## @return True if the file is transformed
|
||||
##
|
||||
def transcode_file(inputFileName, outputFileName):
|
||||
inData = monkTools.file_read_data(inputFileName)
|
||||
if inData == "":
|
||||
return False
|
||||
outData = transcode(inData)
|
||||
debug.warning(" out: " + outputFileName)
|
||||
monkTools.file_write_data(outputFileName, outData)
|
||||
return True
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import codeHLcpp
|
||||
import codeHLBBcode
|
||||
import codeHLJava
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
listRegExp = [
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
listRegExp = [
|
||||
|
@ -1,10 +1,37 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
listRegExp = [
|
||||
[ r'"((\\"|.)*?)"', 'code-text-quote'],
|
||||
[ r"'(('|.)*?)'", 'code-text-quote'],
|
||||
[ r'(true|false|null)',
|
||||
'code-type'],
|
||||
[ r'(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)',
|
||||
'code-type']
|
||||
]
|
||||
|
||||
def transcode(value):
|
||||
return value
|
||||
inValue = value
|
||||
outValue = ""
|
||||
haveFindSomething = False;
|
||||
for reg1, color in listRegExp:
|
||||
result = re.search(reg1, inValue, re.DOTALL)
|
||||
while result != None:
|
||||
haveFindSomething = True
|
||||
# sub parse the start :
|
||||
outValue += transcode(inValue[:result.start()])
|
||||
# transform local
|
||||
outValue += '<span class="' + color + '">'
|
||||
outValue += result.group()
|
||||
outValue += '</span>'
|
||||
|
||||
# change the input value
|
||||
inValue = inValue[result.end():]
|
||||
# Search again ...
|
||||
result = re.search(reg1, inValue, re.DOTALL)
|
||||
outValue += inValue
|
||||
return outValue
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
listRegExp = [
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import codeHL
|
||||
import re
|
||||
|
||||
@ -16,7 +16,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
#value = re.sub(r'\[code(( |\t|\n|\r)+style=(.*))?\](.*?)\[/code\]',
|
||||
"""
|
||||
value = re.sub(r'```(( |\t|\n|\r){\.(.*?))?\}(.*?)\```',
|
||||
@ -24,6 +24,9 @@ def transcode(value):
|
||||
value,
|
||||
flags=re.DOTALL)
|
||||
"""
|
||||
value = re.sub(r'```(.*?)```',
|
||||
r'<code>\1</code>',
|
||||
value)
|
||||
value = re.sub(r'```(( |\t|\n|\r)*(\{\.(.*?)\}))?(.*?)\```',
|
||||
replace_code, #r'<pre>\4</pre>',
|
||||
value,
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -12,8 +12,33 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
|
||||
def transcode(value, _base_path):
|
||||
if len(_base_path) != 0:
|
||||
base_path = (_base_path + '/').replace('/','__')
|
||||
else:
|
||||
base_path = ""
|
||||
# named image : 
|
||||
value = re.sub(r'!\[http://(.*?)\][ \t]*\((.*?)\)',
|
||||
r'<img src="http://\2" alt="\1"/>',
|
||||
value)
|
||||
value = re.sub(r'!\[https://(.*?)\][ \t]*\((.*?)\)',
|
||||
r'<img src="https://\2" alt="\1"/>',
|
||||
value)
|
||||
value = re.sub(r'!\[(.*?)\][ \t]*\((.*?)\?w=([0-9]+)%\)',
|
||||
r'<img src="' + base_path + r'\2" alt="\1" width="\3%"/>',
|
||||
value)
|
||||
value = re.sub(r'!\[(.*?)\][ \t]*\((.*?)\?w=([0-9]+)px\)',
|
||||
r'<img src="' + base_path + r'\2" alt="\1" width="\3px"/>',
|
||||
value)
|
||||
value = re.sub(r'!\[(.*?)\][ \t]*\((.*?)\?h=([0-9]+)px\)',
|
||||
r'<img src="' + base_path + r'\2" alt="\1" height="\3px"/>',
|
||||
value)
|
||||
value = re.sub(r'!\[(.*?)\][ \t]*\((.*?)\?w=([0-9]+)px&h=([0-9]+)px\)',
|
||||
r'<img src="' + base_path + r'\2" alt="\1" width="\3px" height="\4px"/>',
|
||||
value)
|
||||
value = re.sub(r'!\[(.*?)\][ \t]*\((.*?)\)',
|
||||
r'<img src="' + base_path + r'\2" alt="\1"/>',
|
||||
value)
|
||||
return value
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -33,28 +33,99 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
value = re.sub(r'\n(( - )|( * )|( # ))',
|
||||
r'\n:INDENT:[STAR]',
|
||||
def transcode(value, _base_path = ""):
|
||||
value = re.sub(r'\n(( - )|( \* )|( # )|(\* ))',
|
||||
r'\n:INDENT_1:[STAR]',
|
||||
value)
|
||||
p = re.compile('((\:INDENT\:(.*?)\n)*)',
|
||||
value = re.sub(r'\n(( - \[ \] )|( \* \[ \] )|( # \[ \] )|(\* \[ \] ))',
|
||||
r'\n:INDENT_1:[CHECK_BOX_0]',
|
||||
value)
|
||||
value = re.sub(r'\n(( - \[(x|X)\] )|( \* \[(x|X)\] )|( # \[(x|X)\] )|(\* \[(x|X)\] ))',
|
||||
r'\n:INDENT_1:[CHECK_BOX_1]',
|
||||
value)
|
||||
value = re.sub(r'\n( |\t)(( - )|( \* )|( # )|(\* ))',
|
||||
r'\n:INDENT_1::INDENT_2:[STAR]',
|
||||
value)
|
||||
value = re.sub(r'\n( |\t)(( - \[ \] )|( \* \[ \] )|( # \[ \] )|(\* \[ \] ))',
|
||||
r'\n:INDENT_1::INDENT_2:[CHECK_BOX_0]',
|
||||
value)
|
||||
value = re.sub(r'\n( |\t)(( - \[(x|X)\] )|( \* \[(x|X)\] )|( # \[(x|X)\] )|(\* \[(x|X)\] ))',
|
||||
r'\n:INDENT_1::INDENT_2:[CHECK_BOX_1]',
|
||||
value)
|
||||
value = re.sub(r'\n( |\t\t)(( - )|( \* )|( # )|(\* ))',
|
||||
r'\n:INDENT_1::INDENT_2::INDENT_3:[STAR]',
|
||||
value)
|
||||
value = re.sub(r'\n( |\t\t)(( - \[ \] )|( \* \[ \] )|( # \[ \] )|(\* \[ \] ))',
|
||||
r'\n:INDENT_1::INDENT_2::INDENT_3:[CHECK_BOX_0]',
|
||||
value)
|
||||
value = re.sub(r'\n( |\t\t)(( - \[(x|X)\] )|( \* \[(x|X)\] )|( # \[(x|X)\] )|(\* \[(x|X)\] ))',
|
||||
r'\n:INDENT_1::INDENT_2::INDENT_3:[CHECK_BOX_1]',
|
||||
value)
|
||||
p = re.compile('((\:INDENT_1\:(.*?)\n)*)',
|
||||
flags=re.DOTALL)
|
||||
value = p.sub(replace_wiki_identation,
|
||||
value = p.sub(replace_wiki_identation_1,
|
||||
value)
|
||||
|
||||
value = re.sub(r'\[STAR\](.*?)\n',
|
||||
r'<li>\1</li>',
|
||||
value,
|
||||
flags=re.DOTALL)
|
||||
value = re.sub(r'\[CHECK_BOX_1\](.*?)\n',
|
||||
r'<li><input type="checkbox" checked=""/>\1</li>',
|
||||
value,
|
||||
flags=re.DOTALL)
|
||||
value = re.sub(r'\[CHECK_BOX_0\](.*?)\n',
|
||||
r'<li><input type="checkbox"/>\1</li>',
|
||||
value,
|
||||
flags=re.DOTALL)
|
||||
|
||||
|
||||
return value
|
||||
|
||||
|
||||
def replace_wiki_identation(match):
|
||||
def replace_wiki_identation_1(match):
|
||||
if match.group() == "":
|
||||
return ""
|
||||
#debug.verbose("plop: " + str(match.group()))
|
||||
value = "<ul>"
|
||||
value += re.sub(r':INDENT:',
|
||||
value = "<ul>\n"
|
||||
value += re.sub(r':INDENT_1:',
|
||||
r'',
|
||||
match.group())
|
||||
value += "</ul>"
|
||||
return transcode(value)
|
||||
value += "\n</ul>"
|
||||
|
||||
p = re.compile('((\:INDENT_2\:(.*?)\n)*)',
|
||||
flags=re.DOTALL)
|
||||
value = p.sub(replace_wiki_identation_2,
|
||||
value)
|
||||
|
||||
return value
|
||||
|
||||
def replace_wiki_identation_2(match):
|
||||
if match.group() == "":
|
||||
return ""
|
||||
#debug.verbose("plop: " + str(match.group()))
|
||||
value = "<ul>\n"
|
||||
value += re.sub(r':INDENT_2:',
|
||||
r'',
|
||||
match.group())
|
||||
value += "\n</ul>"
|
||||
|
||||
p = re.compile('((\:INDENT_3\:(.*?)\n)*)',
|
||||
flags=re.DOTALL)
|
||||
value = p.sub(replace_wiki_identation_3,
|
||||
value)
|
||||
|
||||
return value
|
||||
|
||||
def replace_wiki_identation_3(match):
|
||||
if match.group() == "":
|
||||
return ""
|
||||
#debug.verbose("plop: " + str(match.group()))
|
||||
value = "<ul>\n"
|
||||
value += re.sub(r':INDENT_3:',
|
||||
r'',
|
||||
match.group())
|
||||
value += "\n</ul>"
|
||||
return value
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -14,9 +14,9 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
|
||||
def transcode(value, _base_path):
|
||||
|
||||
"""
|
||||
# named link : [[http://plop.html | link name]]
|
||||
value = re.sub(r'\[\[http://(.*?) \| (.*?)\]\]',
|
||||
r'<a href="http://\1">\2</a>',
|
||||
@ -26,6 +26,15 @@ def transcode(value):
|
||||
value = re.sub(r'\[\[http://(.*?)\]\]',
|
||||
r'<a href="http://\1">http://\1</a>',
|
||||
value)
|
||||
# named link : [[https://plop.html | link name]]
|
||||
value = re.sub(r'\[\[https://(.*?) \| (.*?)\]\]',
|
||||
r'<a href="https://\1">\2</a>',
|
||||
value)
|
||||
|
||||
# direct link : [[https://plop.html]]
|
||||
value = re.sub(r'\[\[https://(.*?)\]\]',
|
||||
r'<a href="https://\1">http://\1</a>',
|
||||
value)
|
||||
|
||||
# direct lib link : [lib[libname]]
|
||||
value = re.sub(r'\[lib\[(.*?) \| (.*?)\]\]',
|
||||
@ -43,27 +52,42 @@ def transcode(value):
|
||||
value = re.sub(r'\[(lib|class|methode)\[(.*?)\]\]',
|
||||
replace_link_class,
|
||||
value)
|
||||
|
||||
"""
|
||||
p = re.compile('\[\[(.*?)(|(.*?))\]\])',
|
||||
flags=re.DOTALL)
|
||||
if len(_base_path) != 0:
|
||||
base_path = (_base_path + '/').replace('/','__')
|
||||
else:
|
||||
base_path = ""
|
||||
# named image : 
|
||||
value = re.sub(r'\[(.*?)\][ \t]*\(http://(.*?)\)',
|
||||
r'<a href="http://\2">\1</a>',
|
||||
value)
|
||||
value = re.sub(r'\[(.*?)\][ \t]*\(https://(.*?)\)',
|
||||
r'<a href="https://\2">\1</a>',
|
||||
value)
|
||||
"""
|
||||
value = re.sub(r'\[(.*?)\][ \t]*\((.*?)\.md\)',
|
||||
r'<a href="' + base_path + r'\2.html">\1</a>',
|
||||
value)
|
||||
"""
|
||||
p = re.compile('\[(.*?)\][ \t]*\((.*?)\.md\)')
|
||||
value = p.sub(replace_link,
|
||||
value)
|
||||
"""
|
||||
p = re.compile('\[(.*?)\][ \t]*\((.*?)\)')
|
||||
value = p.sub(replace_link,
|
||||
value)
|
||||
|
||||
return value
|
||||
|
||||
"""
|
||||
|
||||
def replace_link(match):
|
||||
if match.group() == "":
|
||||
return ""
|
||||
#debug.verbose("plop: " + str(match.group()))
|
||||
value = "<ul>"
|
||||
value += re.sub(r':INDENT:',
|
||||
r'',
|
||||
match.group())
|
||||
value += "</ul>"
|
||||
return transcode(value)
|
||||
"""
|
||||
debug.verbose("plop: " + str(match.group()))
|
||||
value = '<a href="'
|
||||
value += match.groups()[1].replace("/", "__")
|
||||
value += '.html">' + match.groups()[0] + '</a>'
|
||||
return value
|
||||
|
||||
|
||||
def replace_link_class(match):
|
||||
if match.group() == "":
|
||||
|
32
monk/codeMarkDown/MD_ResultSelection.py
Normal file
32
monk/codeMarkDown/MD_ResultSelection.py
Normal file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
##
|
||||
## @brief Transcode
|
||||
## commencez les lignes par:
|
||||
##
|
||||
def transcode(value, _base_path = ""):
|
||||
p = re.compile('\[([a-zA-Z0-9_-\| ]*)\]',
|
||||
flags=re.DOTALL)
|
||||
value = p.sub(replace_result_list,
|
||||
value)
|
||||
return value
|
||||
|
||||
|
||||
def replace_result_list(match):
|
||||
if match.group() == "":
|
||||
return ""
|
||||
debug.warning("parse RESULT ... : '" + str(match.group()) + "'")
|
||||
value = '<table id="my-table"><tr>'
|
||||
tmpppp = match.group().replace("]", "").replace("[", "").replace("\n", "").split('|')
|
||||
for elem in tmpppp:
|
||||
if len(elem) == 0:
|
||||
continue
|
||||
value += '<td>' + elem + "</td>"
|
||||
value += "</tr></table>"
|
||||
debug.warning(" ==> out " + value)
|
||||
return value
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
return value
|
||||
|
||||
|
@ -1,20 +1,15 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
##
|
||||
## @brief Transcode table:
|
||||
## { | tableau_type_1
|
||||
## | [b]colone 1[/b]
|
||||
## ligne 1
|
||||
## | colone 2 ligne 1
|
||||
## |---
|
||||
## | colone 1 ligne 1
|
||||
## | colone 2 ligne 2
|
||||
## |}
|
||||
## | colone 1 ||
|
||||
## | ligne 1 | colone 2 ligne 1 |
|
||||
## | colone 1 ligne 1 | colone 2 ligne 2|
|
||||
## Avec autant de ligne et de colone que vous voullez..
|
||||
## Il est possible de faire des retour a la ligne dans une case du tableau...
|
||||
## En bref sa tend a marcher comme sur un Wiki...
|
||||
@ -28,15 +23,40 @@ import re
|
||||
## | colone 1 ligne 1 | colone 2 ligne 2 |
|
||||
## +------------------+------------------+
|
||||
##
|
||||
## TODO : Create simple table like :
|
||||
## | colone 1 ||
|
||||
## | ligne 1 | colone 2 ligne 1 |
|
||||
## | colone 1 ligne 1 | colone 2 ligne 2|
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
p = re.compile('((\n\|(.*)\|)*)',
|
||||
flags=re.DOTALL)
|
||||
value = p.sub(replace_table,
|
||||
value)
|
||||
return value
|
||||
|
||||
|
||||
|
||||
def replace_table(match):
|
||||
if match.group() == "":
|
||||
return ""
|
||||
#debug.verbose("plop: " + str(match.group()))
|
||||
value = "<table>"
|
||||
p = re.compile('\n(.*)')
|
||||
value += p.sub(replace_table_line,
|
||||
match.group())
|
||||
value += "</table>"
|
||||
return value
|
||||
|
||||
def replace_table_line(match):
|
||||
if match.group() == "":
|
||||
return ""
|
||||
debug.warning("parse LINE ... : '" + str(match.group()) + "'")
|
||||
value = "<tr>"
|
||||
tmpppp = match.group().replace("\n", "").split('|')
|
||||
for elem in tmpppp:
|
||||
if len(elem) == 0:
|
||||
continue
|
||||
value += "<td>" + elem + "</td>"
|
||||
value += "</tr>"
|
||||
debug.warning(" ==> out " + value)
|
||||
return value
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ import re
|
||||
## @param[in] string String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
value = re.sub(r'\*\*(.*?)\*\*',
|
||||
r'<strong>\1</strong>',
|
||||
@ -36,11 +36,12 @@ def transcode(value):
|
||||
r'<em>\1</em>',
|
||||
value,
|
||||
flags=re.DOTALL)
|
||||
"""
|
||||
value = re.sub(r'_(.*?)_',
|
||||
r'<em>\1</em>',
|
||||
value,
|
||||
flags=re.DOTALL)
|
||||
|
||||
"""
|
||||
value = re.sub(r'____(.*?)\n',
|
||||
r'<hr>',
|
||||
value,
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
value = "\n" + value
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
_comment_code = "[comment]:"
|
||||
@ -11,7 +11,7 @@ _comment_code = "[comment]:"
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
out = "";
|
||||
for elem in value.split("\n"):
|
||||
if len(elem) >= len(_comment_code) \
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import re
|
||||
## @param[in] value String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path):
|
||||
|
||||
value = re.sub(r'\r\n',
|
||||
r'\n',
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import sys
|
||||
import monkTools
|
||||
from monk import tools
|
||||
import re
|
||||
"""
|
||||
import BB_Link
|
||||
@ -15,13 +15,17 @@ import MD_IndentAndDot
|
||||
import MD_Title
|
||||
import MD_comment
|
||||
import MD_lineReturn
|
||||
import MD_Image
|
||||
import MD_Code
|
||||
import MD_Link
|
||||
import MD_Table
|
||||
import MD_ResultSelection
|
||||
##
|
||||
## @brief Transcode input data in the corect format.
|
||||
## @param[in] string String to transform.
|
||||
## @return Transformed string.
|
||||
##
|
||||
def transcode(value):
|
||||
def transcode(value, _base_path = ""):
|
||||
# remove html property
|
||||
value = re.sub(r'&', r'&', value)
|
||||
value = re.sub(r'<', r'<', value)
|
||||
@ -29,19 +33,20 @@ def transcode(value):
|
||||
value = re.sub(r'\r\n', r'\n', value)
|
||||
value = re.sub(r'\n\r', r'\n', value)
|
||||
value = re.sub(r'\r', r'\n', value)
|
||||
value = MD_comment.transcode(value)
|
||||
value = MD_Title.transcode(value)
|
||||
value = MD_IndentAndDot.transcode(value)
|
||||
value = MD_Code.transcode(value)
|
||||
value = MD_lineReturn.transcode(value)
|
||||
value = MD_Text.transcode(value)
|
||||
value = MD_comment.transcode(value, _base_path)
|
||||
value = MD_Title.transcode(value, _base_path)
|
||||
value = MD_IndentAndDot.transcode(value, _base_path)
|
||||
value = MD_Code.transcode(value, _base_path)
|
||||
value = MD_lineReturn.transcode(value, _base_path)
|
||||
value = MD_Text.transcode(value, _base_path)
|
||||
"""
|
||||
value = BB_Text.transcode(value)
|
||||
value = BB_Link.transcode(value)
|
||||
value = BB_Image.transcode(value)
|
||||
value = BB_Table.transcode(value)
|
||||
value = BB_Specification.transcode(value)
|
||||
value = BB_Text.transcode(value, _base_path)
|
||||
value = BB_Specification.transcode(value, _base_path)
|
||||
"""
|
||||
value = MD_Table.transcode(value, _base_path)
|
||||
value = MD_Image.transcode(value, _base_path)
|
||||
value = MD_Link.transcode(value, _base_path)
|
||||
value = MD_ResultSelection.transcode(value, _base_path)
|
||||
value = MD_Code.transcode_part2(value)
|
||||
return value
|
||||
|
||||
@ -50,12 +55,12 @@ def transcode(value):
|
||||
## @return True if the file is transformed
|
||||
##
|
||||
def transcode_file(inputFileName, outputFileName):
|
||||
inData = monkTools.file_read_data(inputFileName)
|
||||
inData = tools.file_read_data(inputFileName)
|
||||
if inData == "":
|
||||
return False
|
||||
outData = transcode(inData)
|
||||
debug.warning(" out: " + outputFileName)
|
||||
monkTools.file_write_data(outputFileName, outData)
|
||||
tools.file_write_data(outputFileName, outData)
|
||||
return True
|
||||
|
||||
|
117
monk/module.py
117
monk/module.py
@ -4,10 +4,10 @@ import os
|
||||
import inspect
|
||||
import fnmatch
|
||||
from realog import debug
|
||||
import monkTools as tools
|
||||
import monkNode as Node
|
||||
import monkParse as Parse
|
||||
import monkHtml
|
||||
from . import tools
|
||||
from . import monkNode as Node
|
||||
from . import monkParse as Parse
|
||||
from . import monkHtml
|
||||
import re
|
||||
import json
|
||||
|
||||
@ -30,7 +30,10 @@ class Module:
|
||||
# Name of the module
|
||||
self.name=moduleName
|
||||
self.list_doc_file = []
|
||||
self.list_image_file = []
|
||||
self.list_tutorial_file = []
|
||||
self.list_manual_file = []
|
||||
self.list_test_file = []
|
||||
self.web_site = ""
|
||||
self.web_source = ""
|
||||
self.path_parsing = ""
|
||||
@ -115,9 +118,9 @@ class Module:
|
||||
tmpList = fnmatch.filter(filenames, "*.hpp")
|
||||
# Import the module :
|
||||
for filename in tmpList:
|
||||
fileCompleteName = os.path.join(root, filename)
|
||||
debug.debug(" Find a file : '" + fileCompleteName + "'")
|
||||
self.add_file(fileCompleteName)
|
||||
file_complete_name = os.path.join(root, filename)
|
||||
debug.debug(" Find a file : '" + file_complete_name + "'")
|
||||
self.add_file(file_complete_name)
|
||||
# all file is parset ==> now we create the namespacing of all elements:
|
||||
self.structure_lib.set_namespace()
|
||||
self.structure_lib.set_module_link(self)
|
||||
@ -130,19 +133,36 @@ class Module:
|
||||
tmpList = fnmatch.filter(filenames, "*.md")
|
||||
# Import the module :
|
||||
for filename in tmpList:
|
||||
fileCompleteName = os.path.join(root, filename)
|
||||
tutorialPath = os.path.join(self.path_global_doc, "tutorial/")
|
||||
pathBase = fileCompleteName[len(self.path_global_doc):len(fileCompleteName)-3]
|
||||
while len(pathBase) > 0 \
|
||||
and pathBase[0] == '/':
|
||||
pathBase = pathBase[1:]
|
||||
debug.verbose(" Find a doc file : fileCompleteName='" + fileCompleteName + "'")
|
||||
if fileCompleteName[:len(tutorialPath)] == tutorialPath:
|
||||
debug.warning("add_tutorial_doc : '" + fileCompleteName + "' ==> '" + pathBase + "'")
|
||||
self.add_tutorial_doc(fileCompleteName, pathBase)
|
||||
file_complete_name = os.path.join(root, filename)
|
||||
tutorial_path = os.path.join(self.path_global_doc, "tutorial/")
|
||||
test_path = os.path.join(self.path_global_doc, "test/")
|
||||
manual_path = os.path.join(self.path_global_doc, "manual/")
|
||||
path_base = file_complete_name[len(self.path_global_doc):len(file_complete_name)-3]
|
||||
while len(path_base) > 0 \
|
||||
and path_base[0] == '/':
|
||||
path_base = path_base[1:]
|
||||
debug.verbose(" Find a doc file : file_complete_name='" + file_complete_name + "'")
|
||||
if file_complete_name[:len(tutorial_path)] == tutorial_path:
|
||||
debug.warning("add_tutorial_doc : '" + file_complete_name + "' ==> '" + path_base + "'")
|
||||
self.add_tutorial_doc(file_complete_name, path_base)
|
||||
elif file_complete_name[:len(test_path)] == test_path:
|
||||
debug.warning("add_test_doc : '" + file_complete_name + "' ==> '" + path_base + "'")
|
||||
self.add_test_doc(file_complete_name, path_base)
|
||||
elif file_complete_name[:len(manual_path)] == manual_path:
|
||||
debug.warning("add_user_manual_doc : '" + file_complete_name + "' ==> '" + path_base + "'")
|
||||
self.add_user_manual_doc(file_complete_name, path_base)
|
||||
else:
|
||||
debug.warning("add_file_doc : '" + fileCompleteName + "' ==> '" + pathBase + "'")
|
||||
self.add_file_doc(fileCompleteName, pathBase)
|
||||
debug.warning("add_file_doc : '" + file_complete_name + "' ==> '" + path_base + "'")
|
||||
self.add_file_doc(file_complete_name, path_base)
|
||||
for root, dirnames, filenames in os.walk(self.path_global_doc):
|
||||
for filename in filenames:
|
||||
if not filename.endswith(('.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.svg', '.SVG', '.gif', '.GIF', '.tga', '.TGA')):
|
||||
continue
|
||||
file_complete_name = os.path.join(root, filename)
|
||||
path_base = file_complete_name[len(self.path_global_doc)+1:]
|
||||
debug.verbose(" Find a doc file : file_complete_name='" + file_complete_name + "'")
|
||||
debug.warning("add_image_doc: '" + file_complete_name + "' ==> '" + path_base + "'")
|
||||
self.add_image_doc(file_complete_name, path_base)
|
||||
|
||||
##
|
||||
## @brief Sort a list of n element containing a list of element (order with the first)
|
||||
@ -181,6 +201,24 @@ class Module:
|
||||
self.list_doc_file.append([filename, outPath])
|
||||
self.list_doc_file = self.sort_list_first_elem(self.list_doc_file)
|
||||
|
||||
##
|
||||
## @brief Add a documentation image file to copy to the output
|
||||
## @param[in] filename File To add in the output documentation.
|
||||
## @param[in] outPath output system file.
|
||||
## @return True if no error occured, False otherwise
|
||||
##
|
||||
def add_image_doc(self, filename, outPath):
|
||||
debug.debug("adding file in documantation : '" + filename + "'");
|
||||
done = False
|
||||
for iii in range(0,len(self.list_image_file)):
|
||||
if self.list_image_file[iii][0] > filename:
|
||||
self.list_image_file.insert(iii, [filename, outPath])
|
||||
done = True
|
||||
break
|
||||
if done == False:
|
||||
self.list_image_file.append([filename, outPath])
|
||||
self.list_image_file = self.sort_list_first_elem(self.list_image_file)
|
||||
|
||||
##
|
||||
## @brief Add a documentation file at the parsing system
|
||||
## @param[in] filename File To add at the parsing element system.
|
||||
@ -188,7 +226,7 @@ class Module:
|
||||
## @return True if no error occured, False otherwise
|
||||
##
|
||||
def add_tutorial_doc(self, filename, outPath):
|
||||
count = int(filename.split('/')[-1].split('_')[0])
|
||||
#count = int(filename.split('/')[-1].split('_')[0])
|
||||
debug.debug("adding file in documantation : '" + filename + "'");
|
||||
done = False
|
||||
for iii in range(0,len(self.list_tutorial_file)):
|
||||
@ -201,6 +239,45 @@ class Module:
|
||||
self.list_tutorial_file = self.sort_list_first_elem(self.list_tutorial_file)
|
||||
|
||||
|
||||
##
|
||||
## @brief Add a documentation file at the parsing system
|
||||
## @param[in] filename File To add at the parsing element system.
|
||||
## @param[in] outPath output system file.
|
||||
## @return True if no error occured, False otherwise
|
||||
##
|
||||
def add_user_manual_doc(self, filename, outPath):
|
||||
#count = int(filename.split('/')[-1].split('_')[0])
|
||||
debug.debug("adding file in user manual documantation : '" + filename + "'");
|
||||
done = False
|
||||
for iii in range(0,len(self.list_tutorial_file)):
|
||||
if self.list_manual_file[iii][0] > filename:
|
||||
self.list_manual_file.insert(iii, [filename, outPath])
|
||||
done = True
|
||||
break
|
||||
if done == False:
|
||||
self.list_manual_file.append([filename, outPath])
|
||||
self.list_manual_file = self.sort_list_first_elem(self.list_manual_file)
|
||||
|
||||
##
|
||||
## @brief Add a documentation file at the parsing system
|
||||
## @param[in] filename File To add at the parsing element system.
|
||||
## @param[in] outPath output system file.
|
||||
## @return True if no error occured, False otherwise
|
||||
##
|
||||
def add_test_doc(self, filename, outPath):
|
||||
#count = int(filename.split('/')[-1].split('_')[0])
|
||||
debug.debug("adding file in test documantation : '" + filename + "'");
|
||||
done = False
|
||||
for iii in range(0,len(self.list_tutorial_file)):
|
||||
if self.list_test_file[iii][0] > filename:
|
||||
self.list_test_file.insert(iii, [filename, outPath])
|
||||
done = True
|
||||
break
|
||||
if done == False:
|
||||
self.list_test_file.append([filename, outPath])
|
||||
self.list_test_file = self.sort_list_first_elem(self.list_test_file)
|
||||
|
||||
|
||||
##
|
||||
## @brief Add a file at the parsing system
|
||||
## @param[in] filename File To add at the parsing element system.
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import monkNode as Node
|
||||
import monkModule as module
|
||||
from . import monkNode as Node
|
||||
from . import module
|
||||
|
||||
|
||||
##
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import monkNode as Node
|
||||
from . import monkNode as Node
|
||||
|
||||
class Enum(Node.Node):
|
||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||
|
245
monk/monkHtml.py
245
monk/monkHtml.py
@ -5,11 +5,11 @@ from . import tools
|
||||
#import CppHeaderParser
|
||||
import os
|
||||
import re
|
||||
import codeBB
|
||||
import codeMarkDown
|
||||
from . import codeBB
|
||||
from . import codeMarkDown
|
||||
import collections
|
||||
import monkModule as module
|
||||
import monkNode as node
|
||||
from . import module
|
||||
from . import monkNode as node
|
||||
|
||||
htmlCodes = (
|
||||
('&', '&'),
|
||||
@ -310,9 +310,12 @@ def write_methode(element, namespaceStack, displaySize = None, link = True):
|
||||
ret += '<br/>'
|
||||
return ret
|
||||
|
||||
def generate_stupid_index_page(outFolder, header, footer, my_lutin_doc):
|
||||
def generate_stupid_index_page(my_lutin_doc, out_folder):
|
||||
header = create_generic_header(my_lutin_doc, out_folder)
|
||||
footer = create_generic_footer(my_lutin_doc, out_folder)
|
||||
|
||||
# create index.hml :
|
||||
filename = outFolder + "/index.html"
|
||||
filename = out_folder + "/index.html"
|
||||
tools.create_directory_of_file(filename);
|
||||
file = open(filename, "w")
|
||||
file.write(header)
|
||||
@ -324,15 +327,19 @@ def generate_stupid_index_page(outFolder, header, footer, my_lutin_doc):
|
||||
file.write(footer)
|
||||
file.close();
|
||||
|
||||
def generate_page(outFolder, header, footer, element, name_lib=""):
|
||||
def generate_page(my_lutin_doc, out_folder, element, name_lib=""):
|
||||
|
||||
header = create_generic_header(my_lutin_doc, out_folder)
|
||||
footer = create_generic_footer(my_lutin_doc, out_folder)
|
||||
|
||||
debug.print_element("code-doc", name_lib, "<==", element.name)
|
||||
currentPageSite = element.get_doc_website_page()
|
||||
namespaceStack = element.get_namespace()
|
||||
if element.get_node_type() in ['library', 'application', 'namespace', 'class', 'struct', 'enum', 'union', 'using']:
|
||||
listBase = element.get_all_sub_type(['library', 'application', 'namespace', 'class', 'struct', 'enum', 'union', 'using'])
|
||||
for elem in listBase:
|
||||
generate_page(outFolder, header, footer, elem['node'], name_lib)
|
||||
filename = outFolder + '/' + generate_html_page_name(element)
|
||||
generate_page(out_folder, header, footer, elem['node'], name_lib)
|
||||
filename = out_folder + '/' + generate_html_page_name(element)
|
||||
tools.create_directory_of_file(filename);
|
||||
file = open(filename, "w")
|
||||
file.write(header)
|
||||
@ -627,11 +634,10 @@ def generate_page(outFolder, header, footer, element, name_lib=""):
|
||||
|
||||
|
||||
|
||||
|
||||
def generate(my_lutin_doc, outFolder) :
|
||||
def create_generic_header(my_lutin_doc, out_folder) :
|
||||
my_doc = my_lutin_doc.get_base_doc_node()
|
||||
tools.copy_file(tools.get_current_path(__file__)+"/theme/base.css", outFolder+"/base.css")
|
||||
tools.copy_file(tools.get_current_path(__file__)+"/theme/menu.css", outFolder+"/menu.css")
|
||||
tools.copy_file(tools.get_current_path(__file__)+"/theme/base.css", out_folder+"/base.css")
|
||||
tools.copy_file(tools.get_current_path(__file__)+"/theme/menu.css", out_folder+"/menu.css")
|
||||
# create common header
|
||||
generic_header = '<!DOCTYPE html>\n'
|
||||
generic_header += '<html>\n'
|
||||
@ -650,40 +656,79 @@ def generate(my_lutin_doc, outFolder) :
|
||||
generic_header += ' <h1><a href="index.html">' + my_doc.get_name() + '</a></h1>\n'
|
||||
if my_lutin_doc.get_website_sources() != '':
|
||||
generic_header += ' <h4><a href="' + my_lutin_doc.get_website_sources() + '"> [ sources ]</a></h4>\n'
|
||||
generic_header += '<h3>API:</h3>'
|
||||
generic_header += ' <div id="menu">\n'
|
||||
#generic_header += ' <h2>' + my_doc.moduleName + '</h2>\n'
|
||||
generic_header += generate_menu(my_doc)
|
||||
#generic_header += ' <h3> </h3>\n'
|
||||
generic_header += ' </div>\n'
|
||||
|
||||
api_menu = generate_menu(my_doc)
|
||||
if len(api_menu) != 0:
|
||||
generic_header += '<h3>API:</h3>'
|
||||
generic_header += ' <div id="menu">\n'
|
||||
#generic_header += ' <h2>' + my_doc.moduleName + '</h2>\n'
|
||||
generic_header += api_menu
|
||||
#generic_header += ' <h3> </h3>\n'
|
||||
generic_header += ' </div>\n'
|
||||
|
||||
# TODO : add Generic doc main point.
|
||||
if len(my_lutin_doc.list_doc_file) > 0:
|
||||
docList = ""
|
||||
for docInputName,outpath in my_lutin_doc.list_doc_file:
|
||||
outputFileName = outFolder + "/" + outpath.replace('/','_') +".html"
|
||||
outputFileName = outputFileName.split('/')[-1]
|
||||
name = outputFileName.split('_')[-1][:-5]
|
||||
if len(my_lutin_doc.list_manual_file) > 0:
|
||||
manual_list = ""
|
||||
for doc_input_name,outpath in my_lutin_doc.list_manual_file:
|
||||
output_file_name = out_folder + "/" + outpath.replace('/','__') +".html"
|
||||
output_file_name = output_file_name.split('/')[-1]
|
||||
name = output_file_name.split('_')[-1][:-5]
|
||||
if name == "index":
|
||||
continue
|
||||
docList += '<ul class="niveau1">'
|
||||
docList += '<li><a href="' + outputFileName + '">' + capitalise_first_letter(camel_case_decode(name)) + '</a></li>\n'
|
||||
docList += '</ul>'
|
||||
if docList != "":
|
||||
manual_list += '<ul class="niveau1">'
|
||||
manual_list += '<li><a href="' + output_file_name + '">' + capitalise_first_letter(camel_case_decode(name)) + '</a></li>\n'
|
||||
manual_list += '</ul>'
|
||||
if manual_list != "":
|
||||
generic_header += '<h3>User manual:</h3>'
|
||||
generic_header += '<div id="menu">\n'
|
||||
generic_header += manual_list
|
||||
generic_header += '</div>\n'
|
||||
|
||||
# TODO : add Generic doc main point.
|
||||
if len(my_lutin_doc.list_doc_file) > 0:
|
||||
doc_list = ""
|
||||
for doc_input_name,outpath in my_lutin_doc.list_doc_file:
|
||||
output_file_name = out_folder + "/" + outpath.replace('/','__') +".html"
|
||||
output_file_name = output_file_name.split('/')[-1]
|
||||
base_name_rework = output_file_name.split('__')[-1]
|
||||
name_list = base_name_rework.split('_')
|
||||
debug.warning(str(name_list))
|
||||
if len(name_list) >= 2:
|
||||
name = base_name_rework[len(name_list[0])+1:].replace("_", " ")
|
||||
else:
|
||||
name = base_name_rework
|
||||
name = name[:-5]
|
||||
debug.warning(name)
|
||||
|
||||
if name == "index":
|
||||
continue
|
||||
doc_list += '<ul class="niveau1">'
|
||||
doc_list += '<li><a href="' + output_file_name + '">' + capitalise_first_letter(camel_case_decode(name)) + '</a></li>\n'
|
||||
doc_list += '</ul>'
|
||||
if doc_list != "":
|
||||
generic_header += '<h3>Documentation:</h3>'
|
||||
generic_header += '<div id="menu">\n'
|
||||
generic_header += docList
|
||||
generic_header += doc_list
|
||||
generic_header += '</div>\n'
|
||||
|
||||
# TODO : add Tutorial doc main point.
|
||||
if len(my_lutin_doc.list_tutorial_file) > 0:
|
||||
tutorialList = ""
|
||||
for docInputName,outpath in my_lutin_doc.list_tutorial_file:
|
||||
outputFileName = outFolder + "/" + outpath+".html"
|
||||
outputFileName = outputFileName.split('/')[-1]
|
||||
name = outputFileName.split('_')[-1][:-5]
|
||||
for doc_input_name,outpath in my_lutin_doc.list_tutorial_file:
|
||||
output_file_name = out_folder + "/" + outpath+".html"
|
||||
output_file_name = output_file_name.split('/')[-1]
|
||||
base_name_rework = output_file_name.split('__')[-1]
|
||||
name_list = base_name_rework.split('_')
|
||||
#debug.warning(str(name_list))
|
||||
if len(name_list) >= 2:
|
||||
name = base_name_rework[len(name_list[0])+1:].replace("_", " ")
|
||||
else:
|
||||
name = base_name_rework
|
||||
name = name[:-5]
|
||||
if name == "index":
|
||||
continue
|
||||
tutorialList += '<ul class="niveau1">'
|
||||
tutorialList += '<li><a href="tutorial_' + outputFileName + '">' + capitalise_first_letter(camel_case_decode(name)) + '</a></li>\n'
|
||||
tutorialList += '<li><a href="tutorial_' + output_file_name + '">' + capitalise_first_letter(camel_case_decode(name)) + '</a></li>\n'
|
||||
tutorialList += '</ul>'
|
||||
if tutorialList != "":
|
||||
generic_header += '<h3>Tutorials:</h3>'
|
||||
@ -691,6 +736,30 @@ def generate(my_lutin_doc, outFolder) :
|
||||
generic_header += tutorialList
|
||||
generic_header += '</div>\n'
|
||||
|
||||
if len(my_lutin_doc.list_test_file) > 0:
|
||||
test_list = ""
|
||||
for doc_input_name,outpath in my_lutin_doc.list_test_file:
|
||||
output_file_name = out_folder + "/" + outpath.replace('/','__') +".html"
|
||||
output_file_name = output_file_name.split('/')[-1]
|
||||
base_name_rework = output_file_name.split('__')[-1]
|
||||
name_list = base_name_rework.split('_')
|
||||
#debug.warning(str(name_list))
|
||||
if len(name_list) >= 2:
|
||||
name = base_name_rework[len(name_list[0])+1:].replace("_", " ")
|
||||
else:
|
||||
name = base_name_rework
|
||||
name = name[:-5]
|
||||
#debug.error(str(name))
|
||||
if name == "index":
|
||||
continue
|
||||
test_list += '<ul class="niveau1">'
|
||||
test_list += '<li><a href="' + output_file_name + '">' + capitalise_first_letter(camel_case_decode(name)) + '</a></li>\n'
|
||||
test_list += '</ul>'
|
||||
if test_list != "":
|
||||
generic_header += '<h3>Tests process:</h3>'
|
||||
generic_header += '<div id="menu">\n'
|
||||
generic_header += test_list
|
||||
generic_header += '</div>\n'
|
||||
|
||||
localWebsite = my_lutin_doc.get_website()
|
||||
# add other libs entry point :
|
||||
@ -719,10 +788,19 @@ def generate(my_lutin_doc, outFolder) :
|
||||
generic_header += "<br/>\n"
|
||||
generic_header += "<br/>\n"
|
||||
generic_header += "<br/>\n"
|
||||
generic_header += '<image src="entreprise.png" width="200px" style="border:4px solid #FFFFFF;"/>\n'
|
||||
generic_header += " </div>\n"
|
||||
generic_header += " </div>\n"
|
||||
generic_header += " <div class=\"container\" id=\"content\">\n"
|
||||
|
||||
return generic_header
|
||||
|
||||
def create_generic_footer(my_lutin_doc, out_folder) :
|
||||
my_doc = my_lutin_doc.get_base_doc_node()
|
||||
tools.copy_file(tools.get_current_path(__file__)+"/theme/base.css", out_folder+"/base.css")
|
||||
tools.copy_file(tools.get_current_path(__file__)+"/theme/menu.css", out_folder+"/menu.css")
|
||||
|
||||
|
||||
generic_footer = " </div>\n"
|
||||
googleData = tools.file_read_data("google-analytics.txt")
|
||||
if googleData != "":
|
||||
@ -731,63 +809,78 @@ def generate(my_lutin_doc, outFolder) :
|
||||
generic_footer += "</body>\n"
|
||||
generic_footer += "</html>\n"
|
||||
|
||||
return generic_footer
|
||||
|
||||
def generate(my_lutin_doc, out_folder) :
|
||||
my_doc = my_lutin_doc.get_base_doc_node()
|
||||
tools.copy_file(tools.get_current_path(__file__)+"/theme/base.css", out_folder+"/base.css")
|
||||
tools.copy_file(tools.get_current_path(__file__)+"/theme/menu.css", out_folder+"/menu.css")
|
||||
|
||||
# create index.hml:
|
||||
generate_stupid_index_page(outFolder, generic_header, generic_footer, my_lutin_doc)
|
||||
generate_stupid_index_page(my_lutin_doc, out_folder)
|
||||
|
||||
# create the namespace index properties:
|
||||
generate_page(outFolder, generic_header, generic_footer, my_doc, name_lib=my_lutin_doc.name)
|
||||
generate_page(my_lutin_doc, out_folder, my_doc, name_lib=my_lutin_doc.name)
|
||||
|
||||
for iii in range(0, len(my_lutin_doc.list_tutorial_file)) :
|
||||
docInputName,outpath = my_lutin_doc.list_tutorial_file[iii]
|
||||
doc_input_name,outpath = my_lutin_doc.list_tutorial_file[iii]
|
||||
|
||||
debug.print_element("tutorial", my_lutin_doc.name, "<==", docInputName)
|
||||
debug.print_element("tutorial", my_lutin_doc.name, "<==", doc_input_name)
|
||||
if outpath[0] == '/':
|
||||
outpath = outpath[1:]
|
||||
outputFileName = os.path.join(outFolder, outpath.replace('/','_') + ".html")
|
||||
debug.debug("output file : " + outputFileName + " out path=" + outFolder + " baseName=" + outpath)
|
||||
tools.create_directory_of_file(outputFileName)
|
||||
name = outputFileName.split('_')[-1][:-5]
|
||||
inData = tools.file_read_data(docInputName)
|
||||
output_file_name = os.path.join(out_folder, outpath.replace('/','__') + ".html")
|
||||
debug.debug("output file : " + output_file_name + " out path=" + out_folder + " baseName=" + outpath)
|
||||
tools.create_directory_of_file(output_file_name)
|
||||
name = output_file_name.split('_')[-1][:-5]
|
||||
inData = tools.file_read_data(doc_input_name)
|
||||
if inData == "":
|
||||
continue
|
||||
outData = generic_header
|
||||
localHeader = ""
|
||||
localHeader += "=?=" + camel_case_decode(name) + "=?=\n___________________________\n"
|
||||
outData = create_generic_header(my_lutin_doc, out_folder)
|
||||
local_header = ""
|
||||
local_header += "=?=" + camel_case_decode(name) + "=?=\n___________________________\n"
|
||||
if iii != 0:
|
||||
previousName, previousOutpath = my_lutin_doc.list_tutorial_file[iii-1]
|
||||
previousName = previousName.split('_')[-1][:-3]
|
||||
previousOutpath = previousOutpath.split('/')[-1]
|
||||
localHeader += "[left][tutorial[" + previousOutpath + " | Previous: " + capitalise_first_letter(camel_case_decode(previousName)) + "]][/left] "
|
||||
previous_name, previous_out_path = my_lutin_doc.list_tutorial_file[iii-1]
|
||||
previous_name = previous_name.split('_')[-1][:-3]
|
||||
previous_out_path = previous_out_path.split('/')[-1]
|
||||
local_header += "[left][tutorial[" + previous_out_path + " | Previous: " + capitalise_first_letter(camel_case_decode(previous_name)) + "]][/left] "
|
||||
if iii != len(my_lutin_doc.list_tutorial_file)-1:
|
||||
nextName, nextOutpath = my_lutin_doc.list_tutorial_file[iii+1]
|
||||
nextName = nextName.split('_')[-1][:-3]
|
||||
nextOutpath = nextOutpath.split('/')[-1]
|
||||
localHeader += " [right][tutorial[" + nextOutpath + " | Next: " + capitalise_first_letter(camel_case_decode(nextName)) + "]][/right]"
|
||||
localHeader += "\n"
|
||||
outData += codeBB.transcode(localHeader)
|
||||
#debug.info(localHeader)
|
||||
if docInputName[-2:] == "bb":
|
||||
next_name, next_out_path = my_lutin_doc.list_tutorial_file[iii+1]
|
||||
next_name = next_name.split('_')[-1][:-3]
|
||||
next_out_path = next_out_path.split('/')[-1]
|
||||
local_header += " [right][tutorial[" + next_out_path + " | Next: " + capitalise_first_letter(camel_case_decode(next_name)) + "]][/right]"
|
||||
local_header += "\n"
|
||||
outData += codeBB.transcode(local_header)
|
||||
#debug.info(local_header)
|
||||
if doc_input_name[-2:] == "bb":
|
||||
outData += codeBB.transcode(inData)
|
||||
elif docInputName[-2:] == "md":
|
||||
elif doc_input_name[-2:] == "md":
|
||||
outData += codeMarkDown.transcode(inData)
|
||||
outData += genericFooter
|
||||
tools.file_write_data(outputFileName, outData)
|
||||
tools.file_write_data(output_file_name, outData)
|
||||
for list_value in [my_lutin_doc.list_doc_file, my_lutin_doc.list_test_file, my_lutin_doc.list_manual_file]:
|
||||
for doc_input_name,outpath in list_value :
|
||||
debug.print_element("doc", my_lutin_doc.name, "<==", doc_input_name)
|
||||
base_path = os.path.dirname(outpath)
|
||||
|
||||
output_file_name = out_folder + outpath.replace('/','__') + ".html"
|
||||
debug.debug("output file : " + output_file_name)
|
||||
tools.create_directory_of_file(output_file_name)
|
||||
inData = tools.file_read_data(doc_input_name)
|
||||
if inData == "":
|
||||
continue
|
||||
outData = create_generic_header(my_lutin_doc, out_folder)
|
||||
if doc_input_name[-2:] == "bb":
|
||||
outData += codeBB.transcode(inData, base_path)
|
||||
elif doc_input_name[-2:] == "md":
|
||||
outData += codeMarkDown.transcode(inData, base_path)
|
||||
outData += create_generic_footer(my_lutin_doc, out_folder)
|
||||
tools.file_write_data(output_file_name, outData)
|
||||
|
||||
for docInputName,outpath in my_lutin_doc.list_doc_file :
|
||||
debug.print_element("doc", my_lutin_doc.name, "<==", docInputName)
|
||||
outputFileName = outFolder + outpath + ".html"
|
||||
debug.debug("output file : " + outputFileName)
|
||||
tools.create_directory_of_file(outputFileName)
|
||||
inData = tools.file_read_data(docInputName)
|
||||
if inData == "":
|
||||
continue
|
||||
outData = generic_header
|
||||
if docInputName[-2:] == "bb":
|
||||
outData += codeBB.transcode(inData)
|
||||
elif docInputName[-2:] == "md":
|
||||
outData += codeMarkDown.transcode(inData)
|
||||
outData += generic_footer
|
||||
tools.file_write_data(outputFileName, outData)
|
||||
|
||||
for image_input_name,outpath in my_lutin_doc.list_image_file:
|
||||
debug.print_element("image", my_lutin_doc.name, "<==", image_input_name)
|
||||
output_file_name = out_folder + outpath.replace('/','__')
|
||||
tools.copy_file(image_input_name, output_file_name)
|
||||
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
##!/usr/bin/python
|
||||
from realog import debug
|
||||
import monkNode as Node
|
||||
import monkType as Type
|
||||
import monkVariable as Variable
|
||||
from . import monkNode as Node
|
||||
from . import monkType as Type
|
||||
from . import monkVariable as Variable
|
||||
|
||||
class Methode(Node.Node):
|
||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[], className = ""):
|
||||
@ -65,7 +65,7 @@ class Methode(Node.Node):
|
||||
while len(stack) > 0\
|
||||
and ( stack[0] == 'virtual'\
|
||||
or stack[0] == 'static'\
|
||||
or stack[0] == 'inline')::
|
||||
or stack[0] == 'inline'):
|
||||
if stack[0] == 'virtual':
|
||||
self.virtual = True
|
||||
stack = stack[1:]
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import monkNode as Node
|
||||
from . import monkNode as Node
|
||||
|
||||
class Namespace(Node.Node):
|
||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||
|
@ -226,6 +226,8 @@ class Node():
|
||||
def get_doc_website_page(self):
|
||||
if self.module_link == None:
|
||||
return ""
|
||||
if self.module_link.get_website() == "":
|
||||
return ""
|
||||
ret = self.module_link.get_website()
|
||||
if ret[-1] != '/':
|
||||
ret += '/'
|
||||
|
@ -15,16 +15,16 @@ import lex
|
||||
|
||||
import inspect
|
||||
from realog import debug
|
||||
import monkClass as Class
|
||||
import monkNamespace as Namespace
|
||||
import monkStruct as Struct
|
||||
import monkUnion as Union
|
||||
import monkMethode as Methode
|
||||
import monkEnum as Enum
|
||||
import monkVariable as Variable
|
||||
import monkNode as Node
|
||||
import monkUsing as Using
|
||||
import monkTypedef as Typedef
|
||||
from . import monkClass as Class
|
||||
from . import monkNamespace as Namespace
|
||||
from . import monkStruct as Struct
|
||||
from . import monkUnion as Union
|
||||
from . import monkMethode as Methode
|
||||
from . import monkEnum as Enum
|
||||
from . import monkVariable as Variable
|
||||
from . import monkNode as Node
|
||||
from . import monkUsing as Using
|
||||
from . import monkTypedef as Typedef
|
||||
|
||||
tokens = [
|
||||
'NUMBER',
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import monkNode as Node
|
||||
from . import monkNode as Node
|
||||
|
||||
class Struct(Node.Node):
|
||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import monkType as Type
|
||||
import monkNode as node
|
||||
from . import monkType as Type
|
||||
from . import monkNode as node
|
||||
from . import module
|
||||
import re
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import monkNode as Node
|
||||
from . import monkNode as Node
|
||||
|
||||
class Typedef(Node.Node):
|
||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import monkNode as Node
|
||||
from . import monkNode as Node
|
||||
|
||||
class Union(Node.Node):
|
||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import monkNode as Node
|
||||
import monkType as Type
|
||||
from . import monkNode as Node
|
||||
from . import monkType as Type
|
||||
|
||||
class Using(Node.Node):
|
||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from realog import debug
|
||||
import monkType as Type
|
||||
import monkNode as Node
|
||||
from . import monkType as Type
|
||||
from . import monkNode as Node
|
||||
|
||||
class Variable(Node.Node):
|
||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||
|
@ -29,6 +29,10 @@ body {
|
||||
overflow: visible;
|
||||
color: #ffffff;
|
||||
display: block;
|
||||
background-image: url('entreprise.png');
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.navbar div {
|
||||
@ -47,12 +51,12 @@ body {
|
||||
right: 0;
|
||||
left: 0;
|
||||
margin-bottom: 0;
|
||||
background-color: #d44413;
|
||||
border: 1px solid #c64012;
|
||||
background-color: #7fac1e;
|
||||
border: 1px solid #7fac1e;
|
||||
font-size: 15px;
|
||||
font-weight: 200;
|
||||
color: #ffffff;
|
||||
text-shadow: 0 1px 0 #ce4213;
|
||||
text-shadow: 0 1px 0 #3b510c;
|
||||
padding: 10px 20px 10px;
|
||||
margin-left: -20px;
|
||||
overflow:scroll;
|
||||
@ -79,6 +83,28 @@ p {
|
||||
display: block;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: rgb(251, 229, 225);
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
color: rgb(192, 52, 29);
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
line-height: 18.9px;
|
||||
margin-top: 0px;
|
||||
overflow-wrap: normal;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
padding-top: 2px;
|
||||
text-align: start;
|
||||
white-space: pre-wrap;
|
||||
word-break: keep-all;
|
||||
}
|
||||
|
||||
pre {
|
||||
#margin-left: 20px;
|
||||
display: block;
|
||||
@ -201,3 +227,23 @@ pre {
|
||||
text-decoration:none;
|
||||
color:#006cb4;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
td {
|
||||
padding:4px;
|
||||
border:1px solid #000;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
#my-table {
|
||||
width:30%;
|
||||
border-collapse:collapse;
|
||||
}
|
||||
#my-table td{
|
||||
width:2000px;
|
||||
padding:4px;
|
||||
border:1px solid #000;
|
||||
vertical-align:top;
|
||||
}
|
@ -2,8 +2,8 @@
|
||||
|
||||
/*----------------MENU-----------------*/
|
||||
div#menu {
|
||||
border-left: 4px solid #8d2d0d;
|
||||
border-bottom: 4px solid #8d2d0d;
|
||||
border-left: 4px solid #3b510c;
|
||||
border-bottom: 4px solid #3b510c;
|
||||
padding-left: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
@ -14,24 +14,24 @@ div#menu h2{
|
||||
margin: 0;
|
||||
padding: 3px;
|
||||
padding-left: 6px;
|
||||
background: #d44413;
|
||||
background: #70981a;
|
||||
}
|
||||
div#menu h3{
|
||||
margin: 0;
|
||||
padding: 6px;
|
||||
background: #d44413;
|
||||
background: #70981a;
|
||||
}
|
||||
|
||||
div#menu a{
|
||||
color: #000000;
|
||||
bgcolor=#d44413;
|
||||
bgcolor=#70981a;
|
||||
FONT-FAMILY: Arial;
|
||||
FONT-SIZE: 9pt;
|
||||
}
|
||||
div#menu li {
|
||||
list-style:none;
|
||||
width:160px;
|
||||
border-top: 1px solid #d44413;
|
||||
border-top: 1px solid #70981a;
|
||||
}
|
||||
|
||||
div#menu ul {
|
||||
@ -44,19 +44,19 @@ div#menu li a {
|
||||
padding: 2px 0px 2px 4px;
|
||||
text-decoration: none;
|
||||
width:160px;
|
||||
border-left: 4px solid #8d2d0d;
|
||||
border-left: 4px solid #70981a;
|
||||
}
|
||||
|
||||
|
||||
div#menu ul.niveau1 ul {
|
||||
border-left: 20px solid #d44413;
|
||||
background: #1a62db;
|
||||
border-left: 20px solid #70981a;
|
||||
background: #739d19;
|
||||
}
|
||||
div#menu ul.niveau1 li {
|
||||
background: #b43a10;
|
||||
background: #638716;
|
||||
}
|
||||
|
||||
div#menu li a:hover {
|
||||
border-left-color: #ff3800;
|
||||
border-left-color: #b3f329;
|
||||
font-weight:bold;
|
||||
}
|
3
setup.py
3
setup.py
@ -37,7 +37,8 @@ setup(name='monk',
|
||||
packages=['monk',
|
||||
'monk/codeBB',
|
||||
'monk/codeHL',
|
||||
'monk/codeMarkDown'],
|
||||
'monk/codeMarkDown',
|
||||
'monk/theme'],
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
|
||||
|
@ -1,13 +1,13 @@
|
||||
#!/usr/bin/python
|
||||
import monkModule
|
||||
import monkTools as tools
|
||||
from monk import module
|
||||
from monk import tools as tools
|
||||
|
||||
def get_desc():
|
||||
return "monk test all element that is capable"
|
||||
|
||||
def create():
|
||||
# module name is 'ewol' and type binary.
|
||||
myModule = monkModule.Module(__file__, 'testMonk', 'LIBRARY')
|
||||
myModule = module.Module(__file__, 'testMonk', 'LIBRARY')
|
||||
# enable doculentation :
|
||||
myModule.set_website("http://heeroyui.github.io/monk/")
|
||||
myModule.set_website_sources("http://github.com/heeroyui/monk/test/")
|
||||
|
Loading…
x
Reference in New Issue
Block a user