def post_compile(self): """ Run the indexer tool """ if not os.path.exists(self.source): msg.log(_("strange, there is no %s") % self.source, pkg="index") return 0 if not self.run_needed(): return 0 msg.progress(_("processing index %s") % self.source) if not (self.tool_obj): if self.tool == "makeindex": index_cls = Makeindex elif self.tool == "xindy": index_cls = Xindy self.tool_obj = index_cls(self.doc, self.source, self.target, transcript=self.transcript, opts=self.opts, modules=self.modules, index_lang=self.lang, style=self.style) rc = self.tool_obj.run() if rc != 0: return rc self.doc.must_compile = 1 return 0
def run(self): msg.progress(_("running %s") % self.cmd[0]) rc = subprocess.call(self.cmd, stdout=msg.stdout) if rc != 0: msg.error(_("execution of %s failed") % self.cmd[0]) return 1 return 0
def run (self): cmd = [self.cmdexec] msg.progress(_("running %s on %s") % (cmd[0], self.source)) for opt in self.doc.paper.split(): cmd.extend(["-t", opt]) cmd.extend(self.options + ["-o", self.target, self.source]) msg.debug(" ".join(cmd)) rc = subprocess.call(cmd, stdout=msg.stdout) if rc != 0: msg.error(_("%s failed on %s") % (cmd[0], self.source)) return 1 return 0
def run(self): """ This method actually runs BibTeX with the appropriate environment variables set. """ msg.progress(_("running BibTeX on %s") % self.base) doc = {} if len(self.bib_path) != 1: os.environ["BIBINPUTS"] = string.join( self.bib_path + [os.getenv("BIBINPUTS", "")], ":") if len(self.bst_path) != 1: os.environ["BSTINPUTS"] = string.join( self.bst_path + [os.getenv("BSTINPUTS", "")], ":") rc = subprocess.call(["bibtex", self.base], stdout=msg.stdout) if rc != 0: msg.error(_("There were errors making the bibliography.")) return 1 self.run_needed = 0 self.doc.must_compile = 1 return 0