' % ModeSpan.mode)
# detect SyncEvolution line prefix
tag = re.compile(r'^(\[([A-Z]+) [^\]]*\])( .*)')
# hyperlink to HTML version of source code
sourcefile = re.compile(r'((\w+\.(?:cpp|c|h)):(\d+))')
# highlight:
# - any text after ***
# *** clean via source A
# *** starting Client::Source::egroupware-dav_caldav::testChanges ***
# - simple prefixes at the start of a line, after the [] tag (removed already)
# caldav #A:
# - HTTP requests
# REPORT /egw/groupdav.php/syncevolution/calendar/ HTTP/1.1
# PROPFIND /egw/groupdav.php/syncevolution/calendar/1234567890%40dummy.ics HTTP/1.1
highlight = re.compile(r'(\*\*\* .*|^ [a-zA-Z0-9_\- #]*: |(?:REPORT|PUT|GET|DELETE|PROPFIND) .*HTTP/\d\.\d$)')
# hyperlink to sync session directory
session = re.compile(r'(Client_(?:Source|Sync)(?:_\w+)+\S+)')
out.write('''
''')
def simplifyFilename(test):
"same as client-test-main.cpp simplifyFilename()"
test = test.replace(':', '_')
test = test.replace('__', '_')
return test
for line in log:
line = line.rstrip()
m = tag.match(line)
if m:
ModeSpan.setMode(m.group(2))
out.write('%s' % m.group(1))
line = m.group(3)
line = cgi.escape(line)
line = sourcefile.sub(r'\1', line)
line = highlight.sub(r'\1', line)
line = session.sub(r'\1', line)
out.write(line)
out.write('\n')
# close any opened before
ModeSpan.setMode(None)
out.write('''
''')