def htmlABFcontent(ID,group,d):
html="<STR_LIT>"<EOL>files=[]<EOL>for abfID in group:<EOL><INDENT>files.extend(d[abfID])<EOL><DEDENT>files=sorted(files)<EOL>html+="<STR_LIT>"<EOL>for fname in files:<EOL><INDENT>if "<STR_LIT>" in fname.lower() and not "<STR_LIT>" in fname:<EOL><INDENT>fname="<STR_LIT>"+os.path.basename(fname)<EOL>html+='<STR_LIT>'%(fname,fname)<EOL><DEDENT><DEDENT>html+="<STR_LIT>"<EOL>lastID='<STR_LIT>'<EOL>for fname in sorted(files):<EOL><INDENT>if not "<STR_LIT>" in fname:<EOL><INDENT>continue<EOL><DEDENT>ID=os.path.basename(fname).split("<STR_LIT:_>")[<NUM_LIT:0>]<EOL>if not ID==lastID:<EOL><INDENT>lastID=ID<EOL>html+="<STR_LIT>"%os.path.basename(fname).split("<STR_LIT:_>")[<NUM_LIT:0>]<EOL><DEDENT>if "<STR_LIT>" in fname.lower():<EOL><INDENT>fname=os.path.basename(fname)<EOL>html+='<STR_LIT>'%(fname,fname)<EOL>continue<EOL><DEDENT><DEDENT>html+="<STR_LIT>"<EOL>for fname in files:<EOL><INDENT>if not "<STR_LIT>" in fname:<EOL><INDENT>continue<EOL><DEDENT>if "<STR_LIT>" in fname:<EOL><INDENT>callit=os.path.basename(fname)<EOL>thing=cm.getPkl(fname)<EOL>if "<STR_LIT>" in fname:<EOL><INDENT>callit+="<STR_LIT>"<EOL>thing=cm.dictFlat(thing)<EOL>if len(thing):<EOL><INDENT>thing=thing[<NUM_LIT:0>]<EOL><DEDENT><DEDENT>elif "<STR_LIT>" in fname:<EOL><INDENT>if type(thing) == dict:<EOL><INDENT>callit+="<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>callit+="<STR_LIT>"<EOL>thing=thing[<NUM_LIT:0>]<EOL><DEDENT><DEDENT>elif "<STR_LIT>" in fname:<EOL><INDENT>continue <EOL><DEDENT>elif "<STR_LIT>" in fname or "<STR_LIT>" in fname:<EOL><INDENT>pass <EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>"%os.path.basename(fname))<EOL>continue<EOL><DEDENT>if type(thing) is dict:<EOL><INDENT>thing=cm.msgDict(thing)<EOL><DEDENT>if type(thing) is list:<EOL><INDENT>out='<STR_LIT>'<EOL>for item in thing:<EOL><INDENT>out+=str(item)+"<STR_LIT:\n>"<EOL><DEDENT>thing=out<EOL><DEDENT>thing=str(thing) <EOL>thing="<STR_LIT>"%os.path.basename(fname)+thing<EOL>html+="<STR_LIT>"%(os.path.basename(fname),thing)<EOL><DEDENT><DEDENT>return html<EOL>
generate text to go inside <body> for single ABF page.