X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=module-tools.py;h=5603722a087bbcb59e14f9c352d5abaff457f225;hb=722f124e85aa989be00c94d91d1b44e468f860c9;hp=d4d5ff0cb590cbf6d16dab238c782aa4940c75f1;hpb=0ff7e68cebd273e32f481f4fec49342a1a97a18f;p=build.git diff --git a/module-tools.py b/module-tools.py index d4d5ff0c..5603722a 100755 --- a/module-tools.py +++ b/module-tools.py @@ -142,6 +142,7 @@ class Svnpath: class Module: svn_magic_line="--This line, and those below, will be ignored--" + setting_tag_format = "Setting tag %s" redirectors=[ # ('module_name_varname','name'), ('module_version_varname','version'), @@ -237,6 +238,10 @@ class Module: def html_href (url,text): return '%s'%(url,text) @staticmethod def html_anchor (url,text): return '%s'%(url,text) + # there must be some smarter means to do that - dirty for now + @staticmethod + def html_quote (text): + return text.replace('&','&').replace('<','<').replace('>','>') # only the fake error module has multiple titles def html_store_title (self, title): @@ -247,17 +252,24 @@ class Module: self.body += html def html_store_pre (self, text): if not hasattr(self,'body'): self.body='' - self.body += '
' + text + '
' + self.body += '
' + self.html_quote(text) + '
' def html_print (self, txt): if not self.options.www: print txt else: - self.html_store_pre(txt) + if not hasattr(self,'in_list') or not self.in_list: + self.html_store_raw('') @staticmethod def html_dump_header(title): - now=time.strftime("%Y-%m-%d %H:%M") + nowdate=time.strftime("%Y-%m-%d") + nowtime=time.strftime("%H:%M") print """ @@ -272,9 +284,9 @@ span.error {text-weight:bold; color: red; } -

%s - status at %s

+

%s - status on %s at %s