Example #1
0
 def init(self):
     PickleHTMLBuilder.init(self)
     # templates are needed for this builder, but the serializing
     # builder does not initialize them
     self.init_templates()
     if not isinstance(self.templates, BuiltinTemplateLoader):
         raise RuntimeError("websupport builder must be used with " "the builtin templates")
     # add our custom JS
     self.script_files.append("_static/websupport.js")
Example #2
0
 def init(self):
     PickleHTMLBuilder.init(self)
     # templates are needed for this builder, but the serializing
     # builder does not initialize them
     self.init_templates()
     if not isinstance(self.templates, BuiltinTemplateLoader):
         raise RuntimeError('websupport builder must be used with '
                            'the builtin templates')
     # add our custom JS
     self.script_files.append('_static/websupport.js')
Example #3
0
    def handle_finish(self):
        # get global values for css and script files
        _, doc_ctx = self._render_page('tmp', {}, 'page.html')
        self.globalcontext['css'] = doc_ctx['css']
        self.globalcontext['script'] = doc_ctx['script']

        PickleHTMLBuilder.handle_finish(self)

        # move static stuff over to separate directory
        directories = [self.imagedir, '_static']
        for directory in directories:
            src = path.join(self.outdir, directory)
            dst = path.join(self.staticdir, directory)
            if path.isdir(src):
                if path.isdir(dst):
                    shutil.rmtree(dst)
                shutil.move(src, dst)
Example #4
0
    def handle_finish(self):
        # get global values for css and script files
        _, doc_ctx = self._render_page('tmp', {}, 'page.html')
        self.globalcontext['css'] = doc_ctx['css']
        self.globalcontext['script'] = doc_ctx['script']

        PickleHTMLBuilder.handle_finish(self)

        # move static stuff over to separate directory
        directories = [self.imagedir, '_static']
        for directory in directories:
            src = path.join(self.outdir, directory)
            dst = path.join(self.staticdir, directory)
            if path.isdir(src):
                if path.isdir(dst):
                    shutil.rmtree(dst)
                shutil.move(src, dst)
Example #5
0
    def handle_finish(self):
        # get global values for css and script files
        _, doc_ctx = self._render_page("tmp", {}, "page.html")
        self.globalcontext["css"] = doc_ctx["css"]
        self.globalcontext["script"] = doc_ctx["script"]

        PickleHTMLBuilder.handle_finish(self)

        # move static stuff over to separate directory
        directories = ["_images", "_static"]
        for directory in directories:
            src = path.join(self.outdir, directory)
            dst = path.join(self.staticdir, directory)
            if path.isdir(src):
                if path.isdir(dst):
                    shutil.rmtree(dst)
                shutil.move(src, dst)
Example #6
0
 def prepare_writing(self, docnames):
     PickleHTMLBuilder.prepare_writing(self, docnames)
     self.globalcontext['no_search_suffix'] = True
Example #7
0
 def prepare_writing(self, docnames):
     # type: (Iterable[str]) -> None
     PickleHTMLBuilder.prepare_writing(self, docnames)
     self.globalcontext['no_search_suffix'] = True
Example #8
0
 def prepare_writing(self, docnames):
     # type: (Iterable[unicode]) -> None
     PickleHTMLBuilder.prepare_writing(self, docnames)
     self.globalcontext['no_search_suffix'] = True
Example #9
0
 def prepare_writing(self, docnames):
     PickleHTMLBuilder.prepare_writing(self, docnames)
     self.globalcontext['no_search_suffix'] = True
Example #10
0
 def prepare_writing(self, docnames):
     PickleHTMLBuilder.prepare_writing(self, docnames)
     self.docsettings.initial_header_level = 2