HTML is a simple markup language for graphical browsers. It is widespread and there are many converters from and to HTML. Many programs have the option: Save as HTML.
Setext is a simple markup language too. Setext uses only alfanumeric characters, so even a simple terminal is enough.
HTML 2 Setext
The following HTML code will be ignored:
- Isolating the HTML code;
- Preparing text (remove HTML code that will be ignored, reorder tags if necessary, remove double spaces etcetera);
- Convert the bold, italic and underlined phrases;
- Compose the Setext.
The only tags that are formatted:
All the other tags will be ignored!
- Paragraph and break tags;
- Title tags;
- Header tags (H1..H5);
- Bold and strong tags;
- Italic tags;
- Underline tags;
- Ordered and unordered list tags. If the lists are included then they will be showed with a white line between the lists;
- Hypertext links. The text of the link will be followed with an underscore, the link itself will be showed after the paragraph.
Functionally the program is fine. The only problem is the performance. When the HTML code is too long, the browser got an ABEND (ABnormal END). At this moment I know two possible solutions:
I hope you find this little program functional enough.
- Rewrite the code in another language (Java?).
Have A Nice Smile :-)
© Copyright 1998