6.10.10.2.6. Include html

6.10.10.2.6. Include html

The @html and @include_html commands switch the input parser from raw interscript to a small subset of HTML. The parser maps tags to calls to interscript commands. For example, <B> is translated to call the bold() command.

Python script can be included in the html using the tags <SCRIPT LANGUAGE="python"> .. </SCRIPT> At present, the translator has even less features than interscript: it's only a stub for a more full scale translator.

The @html() command is similar, except it takes html data from the current input source.

In both cases, </HTML> terminates HTML parsing.

Start python section to interscript/frames/inputf.py[11]
   273: #line 444 "input_frame.ipk"
   274:   def include_html(source):
   275:     self.select(None)
   276:     r = []
   277:     self.pass_frame.include_files.append((self.depth+1,'html: '+self.tangler.language,name))
   278:     inpt = input_frame(
   279:       self.pass_frame,
   280:       source,
   281:       r,
   282:       self.weaver,
   283:       self.userdict.copy(),
   284:       self.depth+1)
   285:     inpt.html_parser = sgml_wrapper(html_filter(inpt))
   286:     r.append((inpt.any_line_re,inpt.do_html))
   287:     inpt.file_pass()
   288: 
   289:   def html(self):
   290:     self.select(None)
   291:     r = []
   292:     inpt = input_frame(
   293:       self.pass_frame,
   294:       self.source,
   295:       r,
   296:       self.weaver,
   297:       self.userdict.copy(),
   298:       self.depth)
   299:     inpt.html_parser = sgml_wrapper(html_filter(inpt))
   300:     r.append((inpt.any_line_re,inpt.do_html))
   301:     inpt.file_pass()
   302: 
   303: 
   304: 
End python section to interscript/frames/inputf.py[11]