Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 64b7cf0b authored by AGUIRRE-CERVANTES Jose-Luis's avatar AGUIRRE-CERVANTES Jose-Luis
Browse files

Set links to other experiences for Setting and Hypotheses in params.sh

parent a85ededb
No related branches found
No related tags found
No related merge requests found
from configobj import ConfigObj from configobj import ConfigObj
import re
def read_parameter_file( path ): def read_parameter_file( path ):
instring = False instring = False
...@@ -39,3 +40,24 @@ def get_parameter( params, key, default='' ): ...@@ -39,3 +40,24 @@ def get_parameter( params, key, default='' ):
value = value[1:-1] value = value[1:-1]
return value.replace( '___', '\n' ) return value.replace( '___', '\n' )
def set_link_labels( text ):
regExp = '^(.*?)(\[?\[?[0-9]{8}(a|b)?-NOOR\]?\]?)(.*)$'
lookForLabels = True;
newText = ''
while lookForLabels:
match = re.match(regExp,text)
if match:
label = match.group(2)
pos = text.find(label)
newText += text[:pos]
text = text[pos+len(label):]
if label.startswith('['):
label = label[1:-1]
if label.startswith('['):
label = label[1:-1]
newText += "["+label+"](../"+label+")"
else:
newText += text
lookForLabels = False
return newText
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment