Wojtek Walczak 写道:

Hi Wojtek,

> 
> 'context_documents' variable is now available in ConTextBuilder
> through 'self.config.context_documents'
> 
> 
> An example using a handler for 'builder-inited' core event:
> 
> --------------------------------------------------------
> from sphinx.builders import Builder
> 
> class ConTeXtBuilder(Builder):
>     """'myvar' is available through: self.config.myvar"""
>     def __init__(self):
>        pass
> 
> def init(app):
>     print app.config.myvar
> 
> def setup(app):
>     app.add_config_value('myvar', 'myval', False)
>     app.connect('builder-inited', init)
>     app.add_builder(ConTeXtBuilder)
> -------------------------------------------------------
> 
> Now, when I add it to conf.py as an extension and run
> 'make html'
> it prints this line among standard output:
> 
> $ make html|grep myval
> myval
> $
> 
> I can also overwrite the value in conf.py. I add this to conf.py:
> 
> myvar = 'otherval'
> 
> and now do:
> 
> $ make html|grep "otherval"
> otherval
> $
> 

I'm trying around the ConTeXt builder now. Thanks for your help!

Wei-Wei

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to