from match import Match
import string
class dbk2htm_conversion:
mapping = { "" : "", "
" : "",
"" : "", "
" : "
" ,
"" : "", "" : "" }
def __init__(self):
pass
def section2html(self, text):
for str in self.mapping:
text = string.replace(text, str, self.mapping[str])
return text
def paramdef2html(self, text):
s = Match()
txt = text & s(r"\s+") >> r"\n"
txt &= s(r"") >> r""
txt &= s(r"") >> r""
txt &= s(r"") >> r"\n "
txt &= s(r"
") >> r"\n"
return txt
def section2html(text):
return dbk2htm_conversion().section2html(text)
def paramdef2html(text):
return dbk2htm_conversion().paramdef2html(text)