Example #1
0
    def init(self):
        SingleFileHTMLBuilder.init(self)

        self.deconst_config = Configuration(os.environ)

        if os.path.exists("_deconst.json"):
            with open("_deconst.json", "r", encoding="utf-8") as cf:
                self.deconst_config.apply_file(cf)

        self.should_submit = not self.deconst_config.skip_submit_reasons()
Example #2
0
    def post_process_images(self, doctree):
        """
        Publish images to the content store. Modify the image reference with
        the
        """

        SingleFileHTMLBuilder.post_process_images(self, doctree)

        if self.should_submit:
            for node in doctree.traverse(nodes.image):
                node['uri'] = self._publish_entry(node['uri'])
Example #3
0
    def init(self):
        SingleFileHTMLBuilder.init(self)

        self.deconst_config = Configuration(os.environ)

        if os.path.exists("_deconst.json"):
            with open("_deconst.json", "r", encoding="utf-8") as cf:
                self.deconst_config.apply_file(cf)

        try:
            self.git_root = self.deconst_config.get_git_root(os.getcwd())
        except FileNotFoundError:
            self.git_root = None

        self.should_submit = not self.deconst_config.skip_submit_reasons()
 def init(self):
     SingleFileHTMLBuilder.init(self)
     finalize_media(self)