docxsphinx
docxsphinx copied to clipboard
make docs only for the first level
the make docx function making a word document only with the first level of tree
word:
html:
Could you please elaborate on what you are trying to achieve @Moshikol and what is not working as expected?
Could you include instructions on how to reproduce the problem?
I have tried to make a docx file from Sphinx, the docx file came out only with the first level of data. which mean that there are a lot of data missing from the inner level of the file tree. file tree: index->glooko->functions to doc after I ran the command make docx on the docs folder, in the word output file there was only the headline of index page and not the functions in the inner level of the file tree in the bottom line, none of the inner level data was in the output word.
Thank you @Moshikol.
Could you give a pointer to the doc directory you mention, or otherwise perhaps give an example of how the files are laid out?
this is the srt file:
within any one of the endpoint you see in the file there are functions that was supposed to get into the docx file.
there is the docx file with all of the lists open:
for example under glooko headline should be 15 functions who are not in the file at all.
its seems like your program parse only the first 2 levels of the file tree.
the file tree in short:
modules(0 level)->External DMS integration(1 level)->Glooko(2 level)->functions(3 level)
the third part of the file three does not exist
Thanks for the example @Moshikol. I've reproduced the problem see branch https://github.com/mherkazandjian/docxsphinx/tree/hb/feature/autodoc3
It seems that the docx builder is not able to handle the autodoc directive properly. (Also when the autodoc directive is placed at a higher level, so it is not just a problem for the third level.)
Not sure how much work it is to improve this though.
Ok so what do we need to do to solve this issue?
Above branch now will include the module information, but not in the right style (so it is ugly and useless). I don't know how these styles are handled, let me have a look.
The indentation is correct now, now the styles
@Moshikol, would you be willing to try branch hb/feature/autodoc3?
The automodule directive should work now, but there are probably cases that I have not tested. (In general we do not have a full test suite yet.)
If you try it, could you also indicate how the style can be improved? It is similar to the html output, but not (yet) as pretty.
Perhaps the field_list should be a table, then the parameters, returns and return types would align properly
Great now it working Thanks. but I have some styling comments
- the class/function signature should be only the class name and not the whole path, and it should be bolded and underlined.
- i don't know really why but the format of the page looks a bit wired Thank you very much for fixing it in just short amount of time!
Thanks for showing interest in our little project @Moshikol. We started it mainly to scratch our own itch, as in we had to produce Word documents and there wasn't a good way to do so automatically. The project has grown to be quite useful already, but many sphinx/rst features are not yet implemented (or not well enough).
The next weeks are a bit busy and chaotic, but I'll try to work on it a bit more. This is a side project for us, but we're proud that it works. Improving the class/function signature shouldn't be hard. (Or feel free to fork and try yourself.)
The formatting is quite simple by default. However it is possible to provide an empty docx document as template that has the styles the way you want (similar as with html). I'm not sure we have documented that properly though. For this particular case of autodoc it would require using styles specific for these 'description lists', which is currently not done. Also, we can make it a bit prettier by default.
I have noticed another BUG when I try to add numbering like so: "[#] some text" and bullet lists like so:" - some text" the whole section of text disappears of curse in the HTML file it is working
The hb/feature/autodoc3 is gone, but the hb/feature/autodoc now exists. See also #20. It should look a bit better. But as you can see, not much time to work on it..