Skip to content
Snippets Groups Projects
Commit 65a27e9a authored by mb's avatar mb
Browse files

annotation rule

parent 57358863
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,6 @@ with open("../../stories/tabs-"+padname+".html","w+") as fileout:
for line in filein:
line = re.sub(r"\s{8}", "\t", line)
print line
m = re.search(r"^\t*", line) # for tabs
# m = re.search(r"\s{8}", line) # for 8 spaces as 1 tab
......@@ -21,17 +20,21 @@ with open("../../stories/tabs-"+padname+".html","w+") as fileout:
tab = len(m.group(0)) + 1
strtab = str(tab)
line = line.replace("\t","")
# print line, tab
if '$!' in line:
line = line.replace('$!','<span class="annotation">')
line = line+'</span>'
fontsize = 55/tab
fontsize = str(fontsize)
fontsize = str(12); # uncomment to set fixed fontsize
fileout.write('<div class="h'+strtab+'" style="font-size:'+fontsize+'px;">'+line+'</div>\n')
fileout.write("""
</div>
""")
print '*output of '+padname+' written*'
fileout.close()
\ No newline at end of file
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