6.23.10.2.8. 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.

Comienzo python section to interscript/frames/inputf.py[12 /41 ] Siguiente Previo Primero Ăšltimo
   433: #line 618 "input_frame.ipk"
   434:   def include_html(source):
   435:     self.select(None)
   436:     r = []
   437:     self.pass_frame.include_files.append((self.depth+1,'html: '+self.current_tangler.language,name))
   438:     inpt = input_frame(
   439:       self.pass_frame,
   440:       source,
   441:       r,
   442:       self.current_weaver,
   443:       self.userdict.copy(),
   444:       self.depth+1)
   445:     inpt.html_parser = sgml_wrapper(html_filter(inpt))
   446:     r.append((inpt.any_line_re,inpt.do_html))
   447:     inpt.file_pass()
   448: 
   449:   def html(self):
   450:     self.select(None)
   451:     r = []
   452:     inpt = input_frame(
   453:       self.pass_frame,
   454:       self.source,
   455:       r,
   456:       self.current_weaver,
   457:       self.userdict.copy(),
   458:       self.depth)
   459:     inpt.html_parser = sgml_wrapper(html_filter(inpt))
   460:     r.append((inpt.any_line_re,inpt.do_html))
   461:     inpt.file_pass()
   462: 
   463: 
   464: 
End python section to interscript/frames/inputf.py[12]