On Fri, 24 Jan 2025, David Malcolm wrote: > Changed in v2: rather than replacing "mhc", this version runs the > output from mhc through the Python script.
Unless I'm missing something that makes sense, yes. > With this approach we could gradually move parts of the mhc > functionality into the python script, at whatever pace is comfortable. That sounds like a plan. It would be really great if you could find some time on merging your original script into this. MetaHTML really has become quite some technical debt. > Gerald: can you test this with mhc? Alternatively, can I go ahead > and try pushing this? Yes, and sorry for the delay. Though ... > + if ! python3 $SOURCETREE/bin/process_html.py $TMPDIR/output.raw > $TMPDIR/output.after-py; then > + echo "bin/process_html.py failed; aborting." > + exit 1 > + fi ... great you didn't push it yet: python3: can't open file '/www/gcc/htdocs-preformatted/bin/process_html.py': [Errno 2] No such file or directory bin/process_html.py failed; aborting. I tried replacing this with just "process_html.py" or "./process_html.py", alas neither did the job. So for now I used "/www/gcc/bin/process_html.py" (on gcc.gnu.org), which is a bit heavy handed, but works. I then preprocessed the whole htdocs tree into a new target directory and manually inspected the diff which essentially features two kinds of change: < <h2 id="system">The host system</h2> > <h2 id="system"><a href="#system">The host system</a></h2> which is what you are adding, and < Last modified 2022-11-14.</p><!-- IGNORE DIFF --> > Last modified 2025-01-29.</p><!-- IGNORE DIFF --> in the footers of pages. I'm fine if you commit just hardcoding the name of the script and will then take it from there. If you prefer me to commit your patch with necessary updates and then double test on the live system, I'll also be happy to do so. Simply let me know! Just one question: Are you very attached to the current name of the Python script or can we call it preprocess-html for consistency with the main script? (The comment at the top already reads "script to preprocess .html files below htdocs". :-) Cheers, Gerald