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

Doc: use myst-nb with ipython3 and shell execution for gdalinfo outputs #11298

Closed
wants to merge 3 commits into from

Conversation

rouault
Copy link
Member

@rouault rouault commented Nov 19, 2024

I tried to use the "bash" jupyter kernel, but the output is not satisfactory as there is a padding line between each output line. And if using the merge_streams: True option as done with the "python" kernel, which fixes that issue, in bash mode, leading spaces are also removed, breaking the indentation. The annoying thing with the solution in this PR is that if we don't add :tags: [remove-input] in the code-cell, the leading "!" character will appear in the output HTML/PDF, which isn't expected in that context. Thus we have to hide the cell input, and use standard markdown to make it appear.

@rouault rouault added the documentation Issues and contributions to the documentation content label Nov 19, 2024
@dbaston
Copy link
Member

dbaston commented Nov 19, 2024

This pattern seems like it would make the docs more difficult to maintain. I think we should really try to avoid a big mixture of rst and markdown. If we want to automatically run bash commands from the program docs (the number of cases where this would be useful seems small) then we might try https://sphinxcontrib-programoutput.readthedocs.io/en/latest/

@rouault rouault marked this pull request as draft November 19, 2024 02:00
@rouault
Copy link
Member Author

rouault commented Nov 19, 2024

This pattern seems like it would make the docs more difficult to maintain

agreed. Following your suggestion, closing this PR as superseded per #11301

@rouault rouault closed this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues and contributions to the documentation content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants