6.13.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 /40 ] Next Prev Last
   393: #line 573 "input_frame.ipk"
   394:   def include_html(source):
   395:     self.select(None)
   396:     r = []
   397:     self.pass_frame.include_files.append((self.depth+1,'html: '+self.current_tangler.language,name))
   398:     inpt = input_frame(
   399:       self.pass_frame,
   400:       source,
   401:       r,
   402:       self.current_weaver,
   403:       self.userdict.copy(),
   404:       self.depth+1)
   405:     inpt.html_parser = sgml_wrapper(html_filter(inpt))
   406:     r.append((inpt.any_line_re,inpt.do_html))
   407:     inpt.file_pass()
   408: 
   409:   def html(self):
   410:     self.select(None)
   411:     r = []
   412:     inpt = input_frame(
   413:       self.pass_frame,
   414:       self.source,
   415:       r,
   416:       self.current_weaver,
   417:       self.userdict.copy(),
   418:       self.depth)
   419:     inpt.html_parser = sgml_wrapper(html_filter(inpt))
   420:     r.append((inpt.any_line_re,inpt.do_html))
   421:     inpt.file_pass()
   422: 
   423: 
   424: 
End python section to interscript/frames/inputf.py[11]