[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")
|
my_args.add_section("cible", "generate in order set")
|
||||||
local_argument = my_args.parse()
|
local_argument = my_args.parse()
|
||||||
|
|
||||||
|
debug.set_level(6)
|
||||||
|
|
||||||
##
|
##
|
||||||
## @brief Display the help of this makefile
|
## @brief Display the help of this makefile
|
||||||
##
|
##
|
||||||
@ -77,23 +79,23 @@ def start():
|
|||||||
debug.warning("Can not understand argument : '" + argument.get_option_name() + "'")
|
debug.warning("Can not understand argument : '" + argument.get_option_name() + "'")
|
||||||
usage()
|
usage()
|
||||||
else:
|
else:
|
||||||
module = module.get_module(argument.get_arg())
|
module_value = module.get_module(argument.get_arg())
|
||||||
module.parse_code()
|
module_value.parse_code()
|
||||||
module.generate()
|
module_value.generate()
|
||||||
actionDone=True
|
actionDone=True
|
||||||
# if no action done : we do "all" ...
|
# if no action done : we do "all" ...
|
||||||
if actionDone==False:
|
if actionDone==False:
|
||||||
#Must generate all docs :
|
#Must generate all docs :
|
||||||
moduleElements = module.get_all_module()
|
moduleElements = module.get_all_module()
|
||||||
for module in moduleElements:
|
for module_value in moduleElements:
|
||||||
module.parse_code()
|
module_value.parse_code()
|
||||||
for module in moduleElements:
|
for module_value in moduleElements:
|
||||||
module.generate()
|
module_value.generate()
|
||||||
|
|
||||||
##
|
##
|
||||||
## @brief When the user use with make.py we initialise ourself
|
## @brief When the user use with make.py we initialise ourself
|
||||||
##
|
##
|
||||||
if __name__ == '__main__':
|
#if __name__ == '__main__':
|
||||||
sys.path.append(tools.get_run_folder())
|
sys.path.append(tools.get_run_folder())
|
||||||
# Import all sub path without out and archive
|
# Import all sub path without out and archive
|
||||||
for folder in os.listdir("."):
|
for folder in os.listdir("."):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import codeHL
|
import codeHL
|
||||||
import re
|
import re
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @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\]',
|
||||||
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>',
|
replace_code, #r'<pre>\4</pre>',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
value = re.sub(r'\n:',
|
value = re.sub(r'\n:',
|
||||||
r'\n:INDENT:',
|
r'\n:INDENT:',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
|
|
||||||
# named link : [[http://plop.html | link name]]
|
# named link : [[http://plop.html | link name]]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ import re
|
|||||||
## @param[in] string String to transform.
|
## @param[in] string String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
value = re.sub(r'\[b\](.*?)\[/b\]',
|
value = re.sub(r'\[b\](.*?)\[/b\]',
|
||||||
r'<span style="font-weight: bold;">\1</span>',
|
r'<span style="font-weight: bold;">\1</span>',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
value = re.sub(r'=\?=(.*?)=\?=',
|
value = re.sub(r'=\?=(.*?)=\?=',
|
||||||
r'<h1><center>\1</center></h1>',
|
r'<h1><center>\1</center></h1>',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
value = re.sub(r'\/\*(.*?)\*\/',
|
value = re.sub(r'\/\*(.*?)\*\/',
|
||||||
r'',
|
r'',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
value = re.sub(r'\r\n',
|
value = re.sub(r'\r\n',
|
||||||
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
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import codeHLcpp
|
import codeHLcpp
|
||||||
import codeHLBBcode
|
import codeHLBBcode
|
||||||
import codeHLJava
|
import codeHLJava
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
listRegExp = [
|
listRegExp = [
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
listRegExp = [
|
listRegExp = [
|
||||||
|
@ -1,10 +1,37 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
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):
|
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
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
listRegExp = [
|
listRegExp = [
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import codeHL
|
import codeHL
|
||||||
import re
|
import re
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @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\]',
|
||||||
"""
|
"""
|
||||||
value = re.sub(r'```(( |\t|\n|\r){\.(.*?))?\}(.*?)\```',
|
value = re.sub(r'```(( |\t|\n|\r){\.(.*?))?\}(.*?)\```',
|
||||||
@ -24,6 +24,9 @@ def transcode(value):
|
|||||||
value,
|
value,
|
||||||
flags=re.DOTALL)
|
flags=re.DOTALL)
|
||||||
"""
|
"""
|
||||||
|
value = re.sub(r'```(.*?)```',
|
||||||
|
r'<code>\1</code>',
|
||||||
|
value)
|
||||||
value = re.sub(r'```(( |\t|\n|\r)*(\{\.(.*?)\}))?(.*?)\```',
|
value = re.sub(r'```(( |\t|\n|\r)*(\{\.(.*?)\}))?(.*?)\```',
|
||||||
replace_code, #r'<pre>\4</pre>',
|
replace_code, #r'<pre>\4</pre>',
|
||||||
value,
|
value,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -12,8 +12,33 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @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
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -33,28 +33,99 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path = ""):
|
||||||
value = re.sub(r'\n(( - )|( * )|( # ))',
|
value = re.sub(r'\n(( - )|( \* )|( # )|(\* ))',
|
||||||
r'\n:INDENT:[STAR]',
|
r'\n:INDENT_1:[STAR]',
|
||||||
value)
|
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)
|
flags=re.DOTALL)
|
||||||
value = p.sub(replace_wiki_identation,
|
value = p.sub(replace_wiki_identation_1,
|
||||||
value)
|
value)
|
||||||
|
|
||||||
value = re.sub(r'\[STAR\](.*?)\n',
|
value = re.sub(r'\[STAR\](.*?)\n',
|
||||||
r'<li>\1</li>',
|
r'<li>\1</li>',
|
||||||
value,
|
value,
|
||||||
flags=re.DOTALL)
|
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
|
return value
|
||||||
|
|
||||||
|
|
||||||
def replace_wiki_identation(match):
|
def replace_wiki_identation_1(match):
|
||||||
if match.group() == "":
|
if match.group() == "":
|
||||||
return ""
|
return ""
|
||||||
#debug.verbose("plop: " + str(match.group()))
|
#debug.verbose("plop: " + str(match.group()))
|
||||||
value = "<ul>"
|
value = "<ul>\n"
|
||||||
value += re.sub(r':INDENT:',
|
value += re.sub(r':INDENT_1:',
|
||||||
r'',
|
r'',
|
||||||
match.group())
|
match.group())
|
||||||
value += "</ul>"
|
value += "\n</ul>"
|
||||||
return transcode(value)
|
|
||||||
|
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
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -14,9 +14,9 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
# named link : [[http://plop.html | link name]]
|
# named link : [[http://plop.html | link name]]
|
||||||
value = re.sub(r'\[\[http://(.*?) \| (.*?)\]\]',
|
value = re.sub(r'\[\[http://(.*?) \| (.*?)\]\]',
|
||||||
r'<a href="http://\1">\2</a>',
|
r'<a href="http://\1">\2</a>',
|
||||||
@ -26,6 +26,15 @@ def transcode(value):
|
|||||||
value = re.sub(r'\[\[http://(.*?)\]\]',
|
value = re.sub(r'\[\[http://(.*?)\]\]',
|
||||||
r'<a href="http://\1">http://\1</a>',
|
r'<a href="http://\1">http://\1</a>',
|
||||||
value)
|
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]]
|
# direct lib link : [lib[libname]]
|
||||||
value = re.sub(r'\[lib\[(.*?) \| (.*?)\]\]',
|
value = re.sub(r'\[lib\[(.*?) \| (.*?)\]\]',
|
||||||
@ -43,27 +52,42 @@ def transcode(value):
|
|||||||
value = re.sub(r'\[(lib|class|methode)\[(.*?)\]\]',
|
value = re.sub(r'\[(lib|class|methode)\[(.*?)\]\]',
|
||||||
replace_link_class,
|
replace_link_class,
|
||||||
value)
|
value)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
p = re.compile('\[\[(.*?)(|(.*?))\]\])',
|
if len(_base_path) != 0:
|
||||||
flags=re.DOTALL)
|
base_path = (_base_path + '/').replace('/','__')
|
||||||
value = p.sub(replace_link,
|
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)
|
||||||
"""
|
"""
|
||||||
|
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
|
return value
|
||||||
|
|
||||||
"""
|
|
||||||
def replace_link(match):
|
def replace_link(match):
|
||||||
if match.group() == "":
|
if match.group() == "":
|
||||||
return ""
|
return ""
|
||||||
#debug.verbose("plop: " + str(match.group()))
|
debug.verbose("plop: " + str(match.group()))
|
||||||
value = "<ul>"
|
value = '<a href="'
|
||||||
value += re.sub(r':INDENT:',
|
value += match.groups()[1].replace("/", "__")
|
||||||
r'',
|
value += '.html">' + match.groups()[0] + '</a>'
|
||||||
match.group())
|
return value
|
||||||
value += "</ul>"
|
|
||||||
return transcode(value)
|
|
||||||
"""
|
|
||||||
|
|
||||||
def replace_link_class(match):
|
def replace_link_class(match):
|
||||||
if match.group() == "":
|
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
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
@ -1,20 +1,15 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## @brief Transcode table:
|
## @brief Transcode table:
|
||||||
## { | tableau_type_1
|
## | colone 1 ||
|
||||||
## | [b]colone 1[/b]
|
## | ligne 1 | colone 2 ligne 1 |
|
||||||
## ligne 1
|
## | colone 1 ligne 1 | colone 2 ligne 2|
|
||||||
## | colone 2 ligne 1
|
|
||||||
## |---
|
|
||||||
## | colone 1 ligne 1
|
|
||||||
## | colone 2 ligne 2
|
|
||||||
## |}
|
|
||||||
## Avec autant de ligne et de colone que vous voullez..
|
## 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...
|
## 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...
|
## En bref sa tend a marcher comme sur un Wiki...
|
||||||
@ -28,15 +23,40 @@ import re
|
|||||||
## | colone 1 ligne 1 | colone 2 ligne 2 |
|
## | 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.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @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
|
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
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ import re
|
|||||||
## @param[in] string String to transform.
|
## @param[in] string String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
value = re.sub(r'\*\*(.*?)\*\*',
|
value = re.sub(r'\*\*(.*?)\*\*',
|
||||||
r'<strong>\1</strong>',
|
r'<strong>\1</strong>',
|
||||||
@ -36,11 +36,12 @@ def transcode(value):
|
|||||||
r'<em>\1</em>',
|
r'<em>\1</em>',
|
||||||
value,
|
value,
|
||||||
flags=re.DOTALL)
|
flags=re.DOTALL)
|
||||||
|
"""
|
||||||
value = re.sub(r'_(.*?)_',
|
value = re.sub(r'_(.*?)_',
|
||||||
r'<em>\1</em>',
|
r'<em>\1</em>',
|
||||||
value,
|
value,
|
||||||
flags=re.DOTALL)
|
flags=re.DOTALL)
|
||||||
|
"""
|
||||||
value = re.sub(r'____(.*?)\n',
|
value = re.sub(r'____(.*?)\n',
|
||||||
r'<hr>',
|
r'<hr>',
|
||||||
value,
|
value,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
value = "\n" + value
|
value = "\n" + value
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
_comment_code = "[comment]:"
|
_comment_code = "[comment]:"
|
||||||
@ -11,7 +11,7 @@ _comment_code = "[comment]:"
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
out = "";
|
out = "";
|
||||||
for elem in value.split("\n"):
|
for elem in value.split("\n"):
|
||||||
if len(elem) >= len(_comment_code) \
|
if len(elem) >= len(_comment_code) \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ import re
|
|||||||
## @param[in] value String to transform.
|
## @param[in] value String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path):
|
||||||
|
|
||||||
value = re.sub(r'\r\n',
|
value = re.sub(r'\r\n',
|
||||||
r'\n',
|
r'\n',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import sys
|
import sys
|
||||||
import monkTools
|
from monk import tools
|
||||||
import re
|
import re
|
||||||
"""
|
"""
|
||||||
import BB_Link
|
import BB_Link
|
||||||
@ -15,13 +15,17 @@ import MD_IndentAndDot
|
|||||||
import MD_Title
|
import MD_Title
|
||||||
import MD_comment
|
import MD_comment
|
||||||
import MD_lineReturn
|
import MD_lineReturn
|
||||||
|
import MD_Image
|
||||||
import MD_Code
|
import MD_Code
|
||||||
|
import MD_Link
|
||||||
|
import MD_Table
|
||||||
|
import MD_ResultSelection
|
||||||
##
|
##
|
||||||
## @brief Transcode input data in the corect format.
|
## @brief Transcode input data in the corect format.
|
||||||
## @param[in] string String to transform.
|
## @param[in] string String to transform.
|
||||||
## @return Transformed string.
|
## @return Transformed string.
|
||||||
##
|
##
|
||||||
def transcode(value):
|
def transcode(value, _base_path = ""):
|
||||||
# remove html property
|
# remove html property
|
||||||
value = re.sub(r'&', r'&', value)
|
value = re.sub(r'&', r'&', value)
|
||||||
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'\r\n', r'\n', value)
|
||||||
value = re.sub(r'\n\r', r'\n', value)
|
value = re.sub(r'\n\r', r'\n', value)
|
||||||
value = re.sub(r'\r', r'\n', value)
|
value = re.sub(r'\r', r'\n', value)
|
||||||
value = MD_comment.transcode(value)
|
value = MD_comment.transcode(value, _base_path)
|
||||||
value = MD_Title.transcode(value)
|
value = MD_Title.transcode(value, _base_path)
|
||||||
value = MD_IndentAndDot.transcode(value)
|
value = MD_IndentAndDot.transcode(value, _base_path)
|
||||||
value = MD_Code.transcode(value)
|
value = MD_Code.transcode(value, _base_path)
|
||||||
value = MD_lineReturn.transcode(value)
|
value = MD_lineReturn.transcode(value, _base_path)
|
||||||
value = MD_Text.transcode(value)
|
value = MD_Text.transcode(value, _base_path)
|
||||||
"""
|
"""
|
||||||
value = BB_Text.transcode(value)
|
value = BB_Text.transcode(value, _base_path)
|
||||||
value = BB_Link.transcode(value)
|
value = BB_Specification.transcode(value, _base_path)
|
||||||
value = BB_Image.transcode(value)
|
|
||||||
value = BB_Table.transcode(value)
|
|
||||||
value = BB_Specification.transcode(value)
|
|
||||||
"""
|
"""
|
||||||
|
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)
|
value = MD_Code.transcode_part2(value)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
@ -50,12 +55,12 @@ def transcode(value):
|
|||||||
## @return True if the file is transformed
|
## @return True if the file is transformed
|
||||||
##
|
##
|
||||||
def transcode_file(inputFileName, outputFileName):
|
def transcode_file(inputFileName, outputFileName):
|
||||||
inData = monkTools.file_read_data(inputFileName)
|
inData = tools.file_read_data(inputFileName)
|
||||||
if inData == "":
|
if inData == "":
|
||||||
return False
|
return False
|
||||||
outData = transcode(inData)
|
outData = transcode(inData)
|
||||||
debug.warning(" out: " + outputFileName)
|
debug.warning(" out: " + outputFileName)
|
||||||
monkTools.file_write_data(outputFileName, outData)
|
tools.file_write_data(outputFileName, outData)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
117
monk/module.py
117
monk/module.py
@ -4,10 +4,10 @@ import os
|
|||||||
import inspect
|
import inspect
|
||||||
import fnmatch
|
import fnmatch
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkTools as tools
|
from . import tools
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
import monkParse as Parse
|
from . import monkParse as Parse
|
||||||
import monkHtml
|
from . import monkHtml
|
||||||
import re
|
import re
|
||||||
import json
|
import json
|
||||||
|
|
||||||
@ -30,7 +30,10 @@ class Module:
|
|||||||
# Name of the module
|
# Name of the module
|
||||||
self.name=moduleName
|
self.name=moduleName
|
||||||
self.list_doc_file = []
|
self.list_doc_file = []
|
||||||
|
self.list_image_file = []
|
||||||
self.list_tutorial_file = []
|
self.list_tutorial_file = []
|
||||||
|
self.list_manual_file = []
|
||||||
|
self.list_test_file = []
|
||||||
self.web_site = ""
|
self.web_site = ""
|
||||||
self.web_source = ""
|
self.web_source = ""
|
||||||
self.path_parsing = ""
|
self.path_parsing = ""
|
||||||
@ -115,9 +118,9 @@ class Module:
|
|||||||
tmpList = fnmatch.filter(filenames, "*.hpp")
|
tmpList = fnmatch.filter(filenames, "*.hpp")
|
||||||
# Import the module :
|
# Import the module :
|
||||||
for filename in tmpList:
|
for filename in tmpList:
|
||||||
fileCompleteName = os.path.join(root, filename)
|
file_complete_name = os.path.join(root, filename)
|
||||||
debug.debug(" Find a file : '" + fileCompleteName + "'")
|
debug.debug(" Find a file : '" + file_complete_name + "'")
|
||||||
self.add_file(fileCompleteName)
|
self.add_file(file_complete_name)
|
||||||
# all file is parset ==> now we create the namespacing of all elements:
|
# all file is parset ==> now we create the namespacing of all elements:
|
||||||
self.structure_lib.set_namespace()
|
self.structure_lib.set_namespace()
|
||||||
self.structure_lib.set_module_link(self)
|
self.structure_lib.set_module_link(self)
|
||||||
@ -130,19 +133,36 @@ class Module:
|
|||||||
tmpList = fnmatch.filter(filenames, "*.md")
|
tmpList = fnmatch.filter(filenames, "*.md")
|
||||||
# Import the module :
|
# Import the module :
|
||||||
for filename in tmpList:
|
for filename in tmpList:
|
||||||
fileCompleteName = os.path.join(root, filename)
|
file_complete_name = os.path.join(root, filename)
|
||||||
tutorialPath = os.path.join(self.path_global_doc, "tutorial/")
|
tutorial_path = os.path.join(self.path_global_doc, "tutorial/")
|
||||||
pathBase = fileCompleteName[len(self.path_global_doc):len(fileCompleteName)-3]
|
test_path = os.path.join(self.path_global_doc, "test/")
|
||||||
while len(pathBase) > 0 \
|
manual_path = os.path.join(self.path_global_doc, "manual/")
|
||||||
and pathBase[0] == '/':
|
path_base = file_complete_name[len(self.path_global_doc):len(file_complete_name)-3]
|
||||||
pathBase = pathBase[1:]
|
while len(path_base) > 0 \
|
||||||
debug.verbose(" Find a doc file : fileCompleteName='" + fileCompleteName + "'")
|
and path_base[0] == '/':
|
||||||
if fileCompleteName[:len(tutorialPath)] == tutorialPath:
|
path_base = path_base[1:]
|
||||||
debug.warning("add_tutorial_doc : '" + fileCompleteName + "' ==> '" + pathBase + "'")
|
debug.verbose(" Find a doc file : file_complete_name='" + file_complete_name + "'")
|
||||||
self.add_tutorial_doc(fileCompleteName, pathBase)
|
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:
|
else:
|
||||||
debug.warning("add_file_doc : '" + fileCompleteName + "' ==> '" + pathBase + "'")
|
debug.warning("add_file_doc : '" + file_complete_name + "' ==> '" + path_base + "'")
|
||||||
self.add_file_doc(fileCompleteName, pathBase)
|
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)
|
## @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.append([filename, outPath])
|
||||||
self.list_doc_file = self.sort_list_first_elem(self.list_doc_file)
|
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
|
## @brief Add a documentation file at the parsing system
|
||||||
## @param[in] filename File To add at the parsing element 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
|
## @return True if no error occured, False otherwise
|
||||||
##
|
##
|
||||||
def add_tutorial_doc(self, filename, outPath):
|
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 + "'");
|
debug.debug("adding file in documantation : '" + filename + "'");
|
||||||
done = False
|
done = False
|
||||||
for iii in range(0,len(self.list_tutorial_file)):
|
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)
|
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
|
## @brief Add a file at the parsing system
|
||||||
## @param[in] filename File To add at the parsing element system.
|
## @param[in] filename File To add at the parsing element system.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
import monkModule as module
|
from . import module
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
|
|
||||||
class Enum(Node.Node):
|
class Enum(Node.Node):
|
||||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||||
|
231
monk/monkHtml.py
231
monk/monkHtml.py
@ -5,11 +5,11 @@ from . import tools
|
|||||||
#import CppHeaderParser
|
#import CppHeaderParser
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import codeBB
|
from . import codeBB
|
||||||
import codeMarkDown
|
from . import codeMarkDown
|
||||||
import collections
|
import collections
|
||||||
import monkModule as module
|
from . import module
|
||||||
import monkNode as node
|
from . import monkNode as node
|
||||||
|
|
||||||
htmlCodes = (
|
htmlCodes = (
|
||||||
('&', '&'),
|
('&', '&'),
|
||||||
@ -310,9 +310,12 @@ def write_methode(element, namespaceStack, displaySize = None, link = True):
|
|||||||
ret += '<br/>'
|
ret += '<br/>'
|
||||||
return ret
|
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 :
|
# create index.hml :
|
||||||
filename = outFolder + "/index.html"
|
filename = out_folder + "/index.html"
|
||||||
tools.create_directory_of_file(filename);
|
tools.create_directory_of_file(filename);
|
||||||
file = open(filename, "w")
|
file = open(filename, "w")
|
||||||
file.write(header)
|
file.write(header)
|
||||||
@ -324,15 +327,19 @@ def generate_stupid_index_page(outFolder, header, footer, my_lutin_doc):
|
|||||||
file.write(footer)
|
file.write(footer)
|
||||||
file.close();
|
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)
|
debug.print_element("code-doc", name_lib, "<==", element.name)
|
||||||
currentPageSite = element.get_doc_website_page()
|
currentPageSite = element.get_doc_website_page()
|
||||||
namespaceStack = element.get_namespace()
|
namespaceStack = element.get_namespace()
|
||||||
if element.get_node_type() in ['library', 'application', 'namespace', 'class', 'struct', 'enum', 'union', 'using']:
|
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'])
|
listBase = element.get_all_sub_type(['library', 'application', 'namespace', 'class', 'struct', 'enum', 'union', 'using'])
|
||||||
for elem in listBase:
|
for elem in listBase:
|
||||||
generate_page(outFolder, header, footer, elem['node'], name_lib)
|
generate_page(out_folder, header, footer, elem['node'], name_lib)
|
||||||
filename = outFolder + '/' + generate_html_page_name(element)
|
filename = out_folder + '/' + generate_html_page_name(element)
|
||||||
tools.create_directory_of_file(filename);
|
tools.create_directory_of_file(filename);
|
||||||
file = open(filename, "w")
|
file = open(filename, "w")
|
||||||
file.write(header)
|
file.write(header)
|
||||||
@ -627,11 +634,10 @@ def generate_page(outFolder, header, footer, element, name_lib=""):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def create_generic_header(my_lutin_doc, out_folder) :
|
||||||
def generate(my_lutin_doc, outFolder) :
|
|
||||||
my_doc = my_lutin_doc.get_base_doc_node()
|
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/base.css", out_folder+"/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/menu.css", out_folder+"/menu.css")
|
||||||
# create common header
|
# create common header
|
||||||
generic_header = '<!DOCTYPE html>\n'
|
generic_header = '<!DOCTYPE html>\n'
|
||||||
generic_header += '<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'
|
generic_header += ' <h1><a href="index.html">' + my_doc.get_name() + '</a></h1>\n'
|
||||||
if my_lutin_doc.get_website_sources() != '':
|
if my_lutin_doc.get_website_sources() != '':
|
||||||
generic_header += ' <h4><a href="' + my_lutin_doc.get_website_sources() + '"> [ sources ]</a></h4>\n'
|
generic_header += ' <h4><a href="' + my_lutin_doc.get_website_sources() + '"> [ sources ]</a></h4>\n'
|
||||||
|
|
||||||
|
api_menu = generate_menu(my_doc)
|
||||||
|
if len(api_menu) != 0:
|
||||||
generic_header += '<h3>API:</h3>'
|
generic_header += '<h3>API:</h3>'
|
||||||
generic_header += ' <div id="menu">\n'
|
generic_header += ' <div id="menu">\n'
|
||||||
#generic_header += ' <h2>' + my_doc.moduleName + '</h2>\n'
|
#generic_header += ' <h2>' + my_doc.moduleName + '</h2>\n'
|
||||||
generic_header += generate_menu(my_doc)
|
generic_header += api_menu
|
||||||
#generic_header += ' <h3> </h3>\n'
|
#generic_header += ' <h3> </h3>\n'
|
||||||
generic_header += ' </div>\n'
|
generic_header += ' </div>\n'
|
||||||
|
|
||||||
# TODO : add Generic doc main point.
|
# TODO : add Generic doc main point.
|
||||||
if len(my_lutin_doc.list_doc_file) > 0:
|
if len(my_lutin_doc.list_manual_file) > 0:
|
||||||
docList = ""
|
manual_list = ""
|
||||||
for docInputName,outpath in my_lutin_doc.list_doc_file:
|
for doc_input_name,outpath in my_lutin_doc.list_manual_file:
|
||||||
outputFileName = outFolder + "/" + outpath.replace('/','_') +".html"
|
output_file_name = out_folder + "/" + outpath.replace('/','__') +".html"
|
||||||
outputFileName = outputFileName.split('/')[-1]
|
output_file_name = output_file_name.split('/')[-1]
|
||||||
name = outputFileName.split('_')[-1][:-5]
|
name = output_file_name.split('_')[-1][:-5]
|
||||||
if name == "index":
|
if name == "index":
|
||||||
continue
|
continue
|
||||||
docList += '<ul class="niveau1">'
|
manual_list += '<ul class="niveau1">'
|
||||||
docList += '<li><a href="' + outputFileName + '">' + capitalise_first_letter(camel_case_decode(name)) + '</a></li>\n'
|
manual_list += '<li><a href="' + output_file_name + '">' + capitalise_first_letter(camel_case_decode(name)) + '</a></li>\n'
|
||||||
docList += '</ul>'
|
manual_list += '</ul>'
|
||||||
if docList != "":
|
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 += '<h3>Documentation:</h3>'
|
||||||
generic_header += '<div id="menu">\n'
|
generic_header += '<div id="menu">\n'
|
||||||
generic_header += docList
|
generic_header += doc_list
|
||||||
generic_header += '</div>\n'
|
generic_header += '</div>\n'
|
||||||
|
|
||||||
# TODO : add Tutorial doc main point.
|
# TODO : add Tutorial doc main point.
|
||||||
if len(my_lutin_doc.list_tutorial_file) > 0:
|
if len(my_lutin_doc.list_tutorial_file) > 0:
|
||||||
tutorialList = ""
|
tutorialList = ""
|
||||||
for docInputName,outpath in my_lutin_doc.list_tutorial_file:
|
for doc_input_name,outpath in my_lutin_doc.list_tutorial_file:
|
||||||
outputFileName = outFolder + "/" + outpath+".html"
|
output_file_name = out_folder + "/" + outpath+".html"
|
||||||
outputFileName = outputFileName.split('/')[-1]
|
output_file_name = output_file_name.split('/')[-1]
|
||||||
name = outputFileName.split('_')[-1][:-5]
|
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":
|
if name == "index":
|
||||||
continue
|
continue
|
||||||
tutorialList += '<ul class="niveau1">'
|
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>'
|
tutorialList += '</ul>'
|
||||||
if tutorialList != "":
|
if tutorialList != "":
|
||||||
generic_header += '<h3>Tutorials:</h3>'
|
generic_header += '<h3>Tutorials:</h3>'
|
||||||
@ -691,6 +736,30 @@ def generate(my_lutin_doc, outFolder) :
|
|||||||
generic_header += tutorialList
|
generic_header += tutorialList
|
||||||
generic_header += '</div>\n'
|
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()
|
localWebsite = my_lutin_doc.get_website()
|
||||||
# add other libs entry point :
|
# 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 += "<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>\n"
|
generic_header += " </div>\n"
|
||||||
generic_header += " <div class=\"container\" id=\"content\">\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"
|
generic_footer = " </div>\n"
|
||||||
googleData = tools.file_read_data("google-analytics.txt")
|
googleData = tools.file_read_data("google-analytics.txt")
|
||||||
if googleData != "":
|
if googleData != "":
|
||||||
@ -731,63 +809,78 @@ def generate(my_lutin_doc, outFolder) :
|
|||||||
generic_footer += "</body>\n"
|
generic_footer += "</body>\n"
|
||||||
generic_footer += "</html>\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:
|
# 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:
|
# 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)) :
|
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] == '/':
|
if outpath[0] == '/':
|
||||||
outpath = outpath[1:]
|
outpath = outpath[1:]
|
||||||
outputFileName = os.path.join(outFolder, outpath.replace('/','_') + ".html")
|
output_file_name = os.path.join(out_folder, outpath.replace('/','__') + ".html")
|
||||||
debug.debug("output file : " + outputFileName + " out path=" + outFolder + " baseName=" + outpath)
|
debug.debug("output file : " + output_file_name + " out path=" + out_folder + " baseName=" + outpath)
|
||||||
tools.create_directory_of_file(outputFileName)
|
tools.create_directory_of_file(output_file_name)
|
||||||
name = outputFileName.split('_')[-1][:-5]
|
name = output_file_name.split('_')[-1][:-5]
|
||||||
inData = tools.file_read_data(docInputName)
|
inData = tools.file_read_data(doc_input_name)
|
||||||
if inData == "":
|
if inData == "":
|
||||||
continue
|
continue
|
||||||
outData = generic_header
|
outData = create_generic_header(my_lutin_doc, out_folder)
|
||||||
localHeader = ""
|
local_header = ""
|
||||||
localHeader += "=?=" + camel_case_decode(name) + "=?=\n___________________________\n"
|
local_header += "=?=" + camel_case_decode(name) + "=?=\n___________________________\n"
|
||||||
if iii != 0:
|
if iii != 0:
|
||||||
previousName, previousOutpath = my_lutin_doc.list_tutorial_file[iii-1]
|
previous_name, previous_out_path = my_lutin_doc.list_tutorial_file[iii-1]
|
||||||
previousName = previousName.split('_')[-1][:-3]
|
previous_name = previous_name.split('_')[-1][:-3]
|
||||||
previousOutpath = previousOutpath.split('/')[-1]
|
previous_out_path = previous_out_path.split('/')[-1]
|
||||||
localHeader += "[left][tutorial[" + previousOutpath + " | Previous: " + capitalise_first_letter(camel_case_decode(previousName)) + "]][/left] "
|
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:
|
if iii != len(my_lutin_doc.list_tutorial_file)-1:
|
||||||
nextName, nextOutpath = my_lutin_doc.list_tutorial_file[iii+1]
|
next_name, next_out_path = my_lutin_doc.list_tutorial_file[iii+1]
|
||||||
nextName = nextName.split('_')[-1][:-3]
|
next_name = next_name.split('_')[-1][:-3]
|
||||||
nextOutpath = nextOutpath.split('/')[-1]
|
next_out_path = next_out_path.split('/')[-1]
|
||||||
localHeader += " [right][tutorial[" + nextOutpath + " | Next: " + capitalise_first_letter(camel_case_decode(nextName)) + "]][/right]"
|
local_header += " [right][tutorial[" + next_out_path + " | Next: " + capitalise_first_letter(camel_case_decode(next_name)) + "]][/right]"
|
||||||
localHeader += "\n"
|
local_header += "\n"
|
||||||
outData += codeBB.transcode(localHeader)
|
outData += codeBB.transcode(local_header)
|
||||||
#debug.info(localHeader)
|
#debug.info(local_header)
|
||||||
if docInputName[-2:] == "bb":
|
if doc_input_name[-2:] == "bb":
|
||||||
outData += codeBB.transcode(inData)
|
outData += codeBB.transcode(inData)
|
||||||
elif docInputName[-2:] == "md":
|
elif doc_input_name[-2:] == "md":
|
||||||
outData += codeMarkDown.transcode(inData)
|
outData += codeMarkDown.transcode(inData)
|
||||||
outData += genericFooter
|
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)
|
||||||
|
|
||||||
for docInputName,outpath in my_lutin_doc.list_doc_file :
|
output_file_name = out_folder + outpath.replace('/','__') + ".html"
|
||||||
debug.print_element("doc", my_lutin_doc.name, "<==", docInputName)
|
debug.debug("output file : " + output_file_name)
|
||||||
outputFileName = outFolder + outpath + ".html"
|
tools.create_directory_of_file(output_file_name)
|
||||||
debug.debug("output file : " + outputFileName)
|
inData = tools.file_read_data(doc_input_name)
|
||||||
tools.create_directory_of_file(outputFileName)
|
|
||||||
inData = tools.file_read_data(docInputName)
|
|
||||||
if inData == "":
|
if inData == "":
|
||||||
continue
|
continue
|
||||||
outData = generic_header
|
outData = create_generic_header(my_lutin_doc, out_folder)
|
||||||
if docInputName[-2:] == "bb":
|
if doc_input_name[-2:] == "bb":
|
||||||
outData += codeBB.transcode(inData)
|
outData += codeBB.transcode(inData, base_path)
|
||||||
elif docInputName[-2:] == "md":
|
elif doc_input_name[-2:] == "md":
|
||||||
outData += codeMarkDown.transcode(inData)
|
outData += codeMarkDown.transcode(inData, base_path)
|
||||||
outData += generic_footer
|
outData += create_generic_footer(my_lutin_doc, out_folder)
|
||||||
tools.file_write_data(outputFileName, outData)
|
tools.file_write_data(output_file_name, 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
|
##!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
import monkType as Type
|
from . import monkType as Type
|
||||||
import monkVariable as Variable
|
from . import monkVariable as Variable
|
||||||
|
|
||||||
class Methode(Node.Node):
|
class Methode(Node.Node):
|
||||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[], className = ""):
|
def __init__(self, stack=[], file="", lineNumber=0, documentation=[], className = ""):
|
||||||
@ -65,7 +65,7 @@ class Methode(Node.Node):
|
|||||||
while len(stack) > 0\
|
while len(stack) > 0\
|
||||||
and ( stack[0] == 'virtual'\
|
and ( stack[0] == 'virtual'\
|
||||||
or stack[0] == 'static'\
|
or stack[0] == 'static'\
|
||||||
or stack[0] == 'inline')::
|
or stack[0] == 'inline'):
|
||||||
if stack[0] == 'virtual':
|
if stack[0] == 'virtual':
|
||||||
self.virtual = True
|
self.virtual = True
|
||||||
stack = stack[1:]
|
stack = stack[1:]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
|
|
||||||
class Namespace(Node.Node):
|
class Namespace(Node.Node):
|
||||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||||
|
@ -226,6 +226,8 @@ class Node():
|
|||||||
def get_doc_website_page(self):
|
def get_doc_website_page(self):
|
||||||
if self.module_link == None:
|
if self.module_link == None:
|
||||||
return ""
|
return ""
|
||||||
|
if self.module_link.get_website() == "":
|
||||||
|
return ""
|
||||||
ret = self.module_link.get_website()
|
ret = self.module_link.get_website()
|
||||||
if ret[-1] != '/':
|
if ret[-1] != '/':
|
||||||
ret += '/'
|
ret += '/'
|
||||||
|
@ -15,16 +15,16 @@ import lex
|
|||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkClass as Class
|
from . import monkClass as Class
|
||||||
import monkNamespace as Namespace
|
from . import monkNamespace as Namespace
|
||||||
import monkStruct as Struct
|
from . import monkStruct as Struct
|
||||||
import monkUnion as Union
|
from . import monkUnion as Union
|
||||||
import monkMethode as Methode
|
from . import monkMethode as Methode
|
||||||
import monkEnum as Enum
|
from . import monkEnum as Enum
|
||||||
import monkVariable as Variable
|
from . import monkVariable as Variable
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
import monkUsing as Using
|
from . import monkUsing as Using
|
||||||
import monkTypedef as Typedef
|
from . import monkTypedef as Typedef
|
||||||
|
|
||||||
tokens = [
|
tokens = [
|
||||||
'NUMBER',
|
'NUMBER',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
|
|
||||||
class Struct(Node.Node):
|
class Struct(Node.Node):
|
||||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkType as Type
|
from . import monkType as Type
|
||||||
import monkNode as node
|
from . import monkNode as node
|
||||||
from . import module
|
from . import module
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
|
|
||||||
class Typedef(Node.Node):
|
class Typedef(Node.Node):
|
||||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
|
|
||||||
class Union(Node.Node):
|
class Union(Node.Node):
|
||||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
import monkType as Type
|
from . import monkType as Type
|
||||||
|
|
||||||
class Using(Node.Node):
|
class Using(Node.Node):
|
||||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
from realog import debug
|
from realog import debug
|
||||||
import monkType as Type
|
from . import monkType as Type
|
||||||
import monkNode as Node
|
from . import monkNode as Node
|
||||||
|
|
||||||
class Variable(Node.Node):
|
class Variable(Node.Node):
|
||||||
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
def __init__(self, stack=[], file="", lineNumber=0, documentation=[]):
|
||||||
|
@ -29,6 +29,10 @@ body {
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
display: block;
|
display: block;
|
||||||
|
background-image: url('entreprise.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-attachment: fixed;
|
||||||
|
background-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar div {
|
.navbar div {
|
||||||
@ -47,12 +51,12 @@ body {
|
|||||||
right: 0;
|
right: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
background-color: #d44413;
|
background-color: #7fac1e;
|
||||||
border: 1px solid #c64012;
|
border: 1px solid #7fac1e;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
text-shadow: 0 1px 0 #ce4213;
|
text-shadow: 0 1px 0 #3b510c;
|
||||||
padding: 10px 20px 10px;
|
padding: 10px 20px 10px;
|
||||||
margin-left: -20px;
|
margin-left: -20px;
|
||||||
overflow:scroll;
|
overflow:scroll;
|
||||||
@ -79,6 +83,28 @@ p {
|
|||||||
display: block;
|
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 {
|
pre {
|
||||||
#margin-left: 20px;
|
#margin-left: 20px;
|
||||||
display: block;
|
display: block;
|
||||||
@ -201,3 +227,23 @@ pre {
|
|||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
color:#006cb4;
|
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-----------------*/
|
/*----------------MENU-----------------*/
|
||||||
div#menu {
|
div#menu {
|
||||||
border-left: 4px solid #8d2d0d;
|
border-left: 4px solid #3b510c;
|
||||||
border-bottom: 4px solid #8d2d0d;
|
border-bottom: 4px solid #3b510c;
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
}
|
}
|
||||||
@ -14,24 +14,24 @@ div#menu h2{
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
padding-left: 6px;
|
padding-left: 6px;
|
||||||
background: #d44413;
|
background: #70981a;
|
||||||
}
|
}
|
||||||
div#menu h3{
|
div#menu h3{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
background: #d44413;
|
background: #70981a;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#menu a{
|
div#menu a{
|
||||||
color: #000000;
|
color: #000000;
|
||||||
bgcolor=#d44413;
|
bgcolor=#70981a;
|
||||||
FONT-FAMILY: Arial;
|
FONT-FAMILY: Arial;
|
||||||
FONT-SIZE: 9pt;
|
FONT-SIZE: 9pt;
|
||||||
}
|
}
|
||||||
div#menu li {
|
div#menu li {
|
||||||
list-style:none;
|
list-style:none;
|
||||||
width:160px;
|
width:160px;
|
||||||
border-top: 1px solid #d44413;
|
border-top: 1px solid #70981a;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#menu ul {
|
div#menu ul {
|
||||||
@ -44,19 +44,19 @@ div#menu li a {
|
|||||||
padding: 2px 0px 2px 4px;
|
padding: 2px 0px 2px 4px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
width:160px;
|
width:160px;
|
||||||
border-left: 4px solid #8d2d0d;
|
border-left: 4px solid #70981a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
div#menu ul.niveau1 ul {
|
div#menu ul.niveau1 ul {
|
||||||
border-left: 20px solid #d44413;
|
border-left: 20px solid #70981a;
|
||||||
background: #1a62db;
|
background: #739d19;
|
||||||
}
|
}
|
||||||
div#menu ul.niveau1 li {
|
div#menu ul.niveau1 li {
|
||||||
background: #b43a10;
|
background: #638716;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#menu li a:hover {
|
div#menu li a:hover {
|
||||||
border-left-color: #ff3800;
|
border-left-color: #b3f329;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
3
setup.py
3
setup.py
@ -37,7 +37,8 @@ setup(name='monk',
|
|||||||
packages=['monk',
|
packages=['monk',
|
||||||
'monk/codeBB',
|
'monk/codeBB',
|
||||||
'monk/codeHL',
|
'monk/codeHL',
|
||||||
'monk/codeMarkDown'],
|
'monk/codeMarkDown',
|
||||||
|
'monk/theme'],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
|
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import monkModule
|
from monk import module
|
||||||
import monkTools as tools
|
from monk import tools as tools
|
||||||
|
|
||||||
def get_desc():
|
def get_desc():
|
||||||
return "monk test all element that is capable"
|
return "monk test all element that is capable"
|
||||||
|
|
||||||
def create():
|
def create():
|
||||||
# module name is 'ewol' and type binary.
|
# module name is 'ewol' and type binary.
|
||||||
myModule = monkModule.Module(__file__, 'testMonk', 'LIBRARY')
|
myModule = module.Module(__file__, 'testMonk', 'LIBRARY')
|
||||||
# enable doculentation :
|
# enable doculentation :
|
||||||
myModule.set_website("http://heeroyui.github.io/monk/")
|
myModule.set_website("http://heeroyui.github.io/monk/")
|
||||||
myModule.set_website_sources("http://github.com/heeroyui/monk/test/")
|
myModule.set_website_sources("http://github.com/heeroyui/monk/test/")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user