Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make docs only for the first level #16

Open
Moshikol opened this issue Mar 26, 2018 · 14 comments
Open

make docs only for the first level #16

Moshikol opened this issue Mar 26, 2018 · 14 comments

Comments

@Moshikol
Copy link

the make docx function making a word document only with the first level of tree
word:
image

html:
image

@hugobuddel
Copy link
Collaborator

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?

@Moshikol
Copy link
Author

Moshikol commented Mar 26, 2018

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.

@hugobuddel
Copy link
Collaborator

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?

@Moshikol
Copy link
Author

Moshikol commented Mar 27, 2018

this is the srt file:
image
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:
image
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

@hugobuddel
Copy link
Collaborator

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.

@Moshikol
Copy link
Author

Ok so what do we need to do to solve this issue?

@hugobuddel
Copy link
Collaborator

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.

@hugobuddel
Copy link
Collaborator

The indentation is correct now, now the styles

@hugobuddel
Copy link
Collaborator

@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.

@hugobuddel
Copy link
Collaborator

Perhaps the field_list should be a table, then the parameters, returns and return types would align properly

@Moshikol
Copy link
Author

Great now it working Thanks. but I have some styling comments

  1. the class/function signature should be only the class name and not the whole path, and it should be bolded and underlined.
  2. 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!

@hugobuddel
Copy link
Collaborator

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.

@Moshikol
Copy link
Author

Moshikol commented Mar 28, 2018

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

@hugobuddel
Copy link
Collaborator

hugobuddel commented Jul 13, 2018

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants