Hi, I am having kind of the same problem. I would like to have only the files referenced in my masterdoc to be included in the html build of sphinx.
My current setup is the following one: source ------index.rst (with references to each departmentX.rst) ------------general_src/lostsoffilesanddirectories ------------departementA ------------------conf.py (In this file I reference the index.rst file as master) ------------------departmentA.rst (this file is referencing files which are in the general_src directory) ------------departementB IDEM ------------departementC IDEM So the moment sphinx is reading its files, it reads in all the files of the general_src directory. But I only reference a couple of files of that directory. I was trying to using the exclude_pattern but this does not really solves the issue. So after I build the documentation a lot of unused files are ending up in my build directory. They are not referenced but still they are in the html build. Is there a way to circumvent this? Only thing I can think of at the moment is adding some extra step which reads the toc, copies the files to one directory and then execute a sphinx-build for that directory only, but this is a bit overkill I guess. Could be that I am using sphinx in the wrong way so if somebody has an idea how to circumvent this? Koen On Wednesday, February 16, 2011 5:21:52 PM UTC+1, Johannes Stallkamp wrote: > > Hello, > > Am 16.02.2011 15:47, schrieb gilberto dos santos alves: > > there are one parameter that sets true or false to show warning messages. > you could find in manual of sphinx in directory ./doc > > I assume you are referring to "unused_docs" (which is deprecated since > 1.0), which _suppresses_ the warnings. > > I am not looking for a way to simply suppress the warnings. My problem is > that the files that is warned about still end up in the final > documentation. However, when packaging our software, not all components > will be part of the final package. Therefore, I only want to include > documentation for those components that are actually packaged. However, > sphinx includes all documentation it can find in any subdirectory. > > I only found a way to explicitly _exclude_ certain files. Is there any > switch/option to tell sphinx which files it should _include_ (only)? > > Explicit exclusion via "exclude_patterns/trees/dirnames" would be very > inconvenient as it would require exhaustive listing of all files/subtrees > that are not part of the package. > > Unfortunately, I am not very familiar with Python and not at all with > modifying/recompiling (?) Python eggs (like Sphinx). Otherwise, I'd > probably have look at the code directly and try to supply a patch ( if > desired). > > Johannes > > > 2011/2/9 Johannes Stallkamp <johannes.stallk...@ini.ruhr-uni-bochum.de> > >> Hello, >> >> I am new to Sphinx and I am wondering whether it is possible to only >> include rst files that are actually referenced in the TOC. >> IIUC, I can only explicitly _exclude_ files. However, our projects >> contain a flexible number of subcomponents in one large directory tree. >> I create the master index file dynamically via CMake to include only >> references to the docs of those components that are included. When >> running sphinx, I get warnings that some documents are not indexed (the >> ones of the excluded components) but they are nevertheless included. >> >> Is there any way to tell Sphinx to only include explicitly listed files? >> >> Kind regards >> Johannes >> >> -- >> Johannes Stallkamp >> Lehrstuhl Theorie kognitiver Systeme >> Institut für Neuroinformatik >> Ruhr-Universität Bochum >> 44780 Bochum, Germany >> >> office: NB 3 / 71 >> tel: +49 234 32 25566 >> fax: +49 234 32 14209 >> email: johannes.stallk...@ini.ruhr-uni-bochum.de >> URL: http://www.ini.ruhr-uni-bochum.de >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sphinx-dev" group. >> To post to this group, send email to sphinx-dev@googlegroups.com. >> To unsubscribe from this group, send email to >> sphinx-dev+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/sphinx-dev?hl=en. >> >> > > > -- > gilberto dos santos alves > > (11) 8646-5049 > são paulo - SP - Brasil > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-dev" group. > To post to this group, send email to sphinx-dev@googlegroups.com. > To unsubscribe from this group, send email to > sphinx-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sphinx-dev?hl=en. > > > > -- > Johannes Stallkamp > Lehrstuhl Theorie kognitiver Systeme > Institut für Neuroinformatik > Ruhr-Universität Bochum > 44780 Bochum, Germany > > office: NB 3 / 71 > tel: +49 234 32 25566 > fax: +49 234 32 14209 > email: johannes.stallk...@ini.ruhr-uni-bochum.de > URL: http://www.ini.ruhr-uni-bochum.de > > On Wednesday, February 16, 2011 5:21:52 PM UTC+1, Johannes Stallkamp wrote: > > Hello, > > Am 16.02.2011 15:47, schrieb gilberto dos santos alves: > > there are one parameter that sets true or false to show warning messages. > you could find in manual of sphinx in directory ./doc > > I assume you are referring to "unused_docs" (which is deprecated since > 1.0), which _suppresses_ the warnings. > > I am not looking for a way to simply suppress the warnings. My problem is > that the files that is warned about still end up in the final > documentation. However, when packaging our software, not all components > will be part of the final package. Therefore, I only want to include > documentation for those components that are actually packaged. However, > sphinx includes all documentation it can find in any subdirectory. > > I only found a way to explicitly _exclude_ certain files. Is there any > switch/option to tell sphinx which files it should _include_ (only)? > > Explicit exclusion via "exclude_patterns/trees/dirnames" would be very > inconvenient as it would require exhaustive listing of all files/subtrees > that are not part of the package. > > Unfortunately, I am not very familiar with Python and not at all with > modifying/recompiling (?) Python eggs (like Sphinx). Otherwise, I'd > probably have look at the code directly and try to supply a patch ( if > desired). > > Johannes > > > 2011/2/9 Johannes Stallkamp <johannes.stallk...@ini.ruhr-uni-bochum.de> > >> Hello, >> >> I am new to Sphinx and I am wondering whether it is possible to only >> include rst files that are actually referenced in the TOC. >> IIUC, I can only explicitly _exclude_ files. However, our projects >> contain a flexible number of subcomponents in one large directory tree. >> I create the master index file dynamically via CMake to include only >> references to the docs of those components that are included. When >> running sphinx, I get warnings that some documents are not indexed (the >> ones of the excluded components) but they are nevertheless included. >> >> Is there any way to tell Sphinx to only include explicitly listed files? >> >> Kind regards >> Johannes >> >> -- >> Johannes Stallkamp >> Lehrstuhl Theorie kognitiver Systeme >> Institut für Neuroinformatik >> Ruhr-Universität Bochum >> 44780 Bochum, Germany >> >> office: NB 3 / 71 >> tel: +49 234 32 25566 >> fax: +49 234 32 14209 >> email: johannes.stallk...@ini.ruhr-uni-bochum.de >> URL: http://www.ini.ruhr-uni-bochum.de >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sphinx-dev" group. >> To post to this group, send email to sphinx-dev@googlegroups.com. >> To unsubscribe from this group, send email to >> sphinx-dev+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/sphinx-dev?hl=en. >> >> > > > -- > gilberto dos santos alves > > (11) 8646-5049 > são paulo - SP - Brasil > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-dev" group. > To post to this group, send email to sphinx-dev@googlegroups.com. > To unsubscribe from this group, send email to > sphinx-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sphinx-dev?hl=en. > > > > -- > Johannes Stallkamp > Lehrstuhl Theorie kognitiver Systeme > Institut für Neuroinformatik > Ruhr-Universität Bochum > 44780 Bochum, Germany > > office: NB 3 / 71 > tel: +49 234 32 25566 > fax: +49 234 32 14209 > email: johannes.stallk...@ini.ruhr-uni-bochum.de > URL: http://www.ini.ruhr-uni-bochum.de > > -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To view this discussion on the web visit https://groups.google.com/d/msg/sphinx-dev/-/tvCUaGeYXFEJ. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.