-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 14.12.2010 09:27, schrieb Mathieu Lacage:
> hi,
>
> I have the documentation carefully
> (http://sphinx.pocoo.org/builders.html#sphinx.builders.html.SerializingHTMLBuilder)
> but I have to confess that I still have not figured out how to make it
> work. Do I necessarily need to add a new builder to sphinx itself (or
> to sphinx-contrib), and specify the builder name with sphinx-build -b
> for the php dump or is it possible to write a simple script that
> registers it and then requests a rebuild with this new builder ?
I understand you want to create a builder serializing to a PHP format?
For that, you have to subclass SerializingHTMLBuilder and provide a dump/load
implementation for your format. For example:
class PHPHTMLBuilder(SerializingHTMLBuilder):
implementation = phpserialize
implementation_dumps_unicode = False
name = 'php'
... # other attributes just like for e.g. JSONHTMLBuilder
where phpserialize is a module that has dump/dumps/load/loads functions.
cheers,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iEYEARECAAYFAk0o9fAACgkQN9GcIYhpnLAergCfZixQKBqKPaEH0dRhxq4JqrSz
ZRAAn0hC5z1t3vzbBIRbzN7ikXtgfuEz
=XKoA
-----END PGP SIGNATURE-----
--
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.