Hello Everyone !
Thanks for your comments, and they will make the codes better.
To summerize, I have got several things to do to produce the next version of the static_page_generating tool:
1) -F option, which is supposed to parse all the files in certain directory;
2) Generate static DYKs (Do You Know);
3) Handling the glossary popups and links;
4) More error handling.
Jim, I am considering your idea of splitting the codes into two pieces. Since I use existing functions to generate static pages by redirecting their outputs, the main code is not likely to be too long, while many minor changes may occur in the existing codes. My suggestion is to add more switch variables in all_variable file, such as USE_STATIC_DYK,USE_STATIC_TYK and the like. They can be grouped into a configuration part together with USE_STATIC_PAGES and STATIC_PAGES_PATH I already added. This way, I can branch the existing functions into either the new way (generating static pages) or the old way (generating dynamic pages) according to the switch variables, deciding which part of the mainframe is static or dynamic.
Comments are welcome.
Best regards,