Wei-Wei Guo napisal(a): Hi Wei-Wei,
> Does there any other file need to be created except builders/context.py and > writers/context.py? If your plan is to make it a builtin feature, then you'll have to add simple import line to sphinx/builder.py and config values to the config_values dictionary in sphinx/config.py if you need any. Moreover, in sphinx/builders/__init__.py you'll have to add a line to BUILTIN_BUILDERS dict. These are minor changes, though. > Can builder and writer be installed in the way like the extensions do? They can. The question is: do you want to distribute it as a third-party extension, or are you rather interested in making it a builtin part of Sphinx later on? Switching from one solution to another is not hard anyway, so it's not life-or-death decision. If you want to start with an extension, then take a look at this: http://tosh.pl/gminick/code/sphinx/sphinx-pdfbuilder.py It's dramatically simplified version of rst2pdf builder that I am working on(*). Take a look at it to get some general feeling, and then try to read the code of builtin builders, to get the details. > If it is not too > complicated, is want to have a try. Go for it. Good luck! (*) - branch for this builder is available here: http://bitbucket.org/gminick/sphinx-rst2pdf-builder/ ...but there's no code yet :-) I will push all my changes during the weekend. -- Regards, Wojtek Walczak, http://tosh.pl/gminick/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
