-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Automate creation of idlelib/help.html from Doc/.../idle.html #69405
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
Comments
This continues bpo-16893, which replaced help.txt with help.html for the Idle doc display. It also replaced the display classes with new classes in help.py. I currently create help.html in a .bat file. With Doc as current directory, it uses This issue is first about revising Zack Ware's makefile patch, https://bugs.python.org/file36975/issue16893-v4.diff, which adds an 'idledoc' target. It is attached to bpo-16893. It needs 'copy' replaced by 'copy, strip, and rename'. The command above requires finding a compatible python.exe, and I do not know if that is a problem. In normal use, 'idledoc' should only be invoked for the earliest 3.x getting maintenance patches, and the result merged forward. If this is resolved, it would be nice if the new 'idledoc' target were built as apart of the release process, and any changes checked in. But the latter should currently still be done for all 3.x branches |
Zach, I currently build idlelib/help.html by first building a complete doc set and then copying from Doc/.../idle.html, stripping trailing whitespace on the say. One problem is that the result has a lot of extraneous stuff aside from the doc text itself: the code for the header, sidebar, and footer. These are a nuisance when committing changes and for extracting just the text we want. I would prefer to create a clean .html from Doc/library/idle.rst that just has the code for the doc, without the extraneous matter. Do you know how? I looked in Doc/make.bat and it says it will not work on single files. |
Sphinx can be run with an empty conf like so:
And then stripping everything that is not in Maybe an action could be added that runs when idle.html is modified? It would build, extract the file and then create the conf and then a simple bash script with a counter to clean up. Otherwise we have to manually update with each PR. (This should probably be done in the meantime as it has not been done for a while) *The only thing left is :source: but maybe we can just modify the docs to a link to clean that up? |
I now use a custom .bat file to run sphinx and copy-trim the result. This works as long as I am the only one editing idle.rst and remember to run the .bat file. |
FWIW, there is some tooling for |
Adding a workflow for when a PR modifies /Doc/Lib/idle.rst would be better than updating with releases in my opinion. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
The text was updated successfully, but these errors were encountered: