Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Autogeneration of web pages
Hello python fans,
I am a bit new to python and already liking this great language. I was trying to autogenerate html pages from cgi scripts. Basically I need to write a Python program to take a file marked up using the following system:
'* filename title' - creates a file using the given filename (with '.html' appended) and gives it the given title, both at the top of the browser (in the section) and as a top level heading (
) on the page.
'**' represents a section heading ()
'.' represents a paragraph
'-' represents an element in an unordered list ( in a )
'--' represents an element in an unordered list which is in another list
Markups must begin on the first character of a line
Markups may span multiple lines
and convert it into valid XHTML 1.0.
PLEASE EMAIL ME IF YOU HAVE ANY QUERIES. I ALREADY HAVE SOME FUNCTIONS DEFINED LIKE get_file and put_file which will be needed for this program.