Created
April 24, 2012 15:06
-
-
Save shimizukawa/2480370 to your computer and use it in GitHub Desktop.
Sphinxのnull builder。conf.pyに追記して使う。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sphinx.builders import Builder | |
class NullBuilder(Builder): | |
name = 'null' | |
def get_target_uri(self, docname, typ=None): | |
return '' | |
def get_outdated_docs(self): | |
"""毎回全てのrstを処理対象にしたい場合は、以下を参考にこのメソッドを実装。 | |
https://bitbucket.org/birkenfeld/sphinx/src/b799dcd0bb9f/sphinx/builders/text.py#cl-30 | |
""" | |
return [] | |
def write(self, build_docnames, updated_docnames, method='update'): | |
pass | |
def prepare_writing(self, docnames): | |
pass | |
def write_doc(self, docname, doctree): | |
pass | |
def setup(app): | |
app.add_builder(NullBuilder) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment