Convert a text file to an HTML List
mkhtml.c
 
Often times I want to print a hierarchical list, perhaps a to-do list or a list of books.
 
 
I wrote makehtml() as a way to produce a printable copy of that list. mkhtml takes a text file in the form described in Hierarchy filters and produces an HTML list.
 
LIke most filters, mkhtml has embedded help text explaining its purpose and usage. It can be viewed by running the program with the -h option, e.g. mkhtml -h. I've reproduced that help text here.
 
 
mkhtml input mkhtml output
Talk about treepad
    Add a sample node
         This as a lower level node
         -
         with a sample
         two-line note
         -
    This is a higher level node
<HTML>
<HEAD>
<TITLE>
Talk about treepad
<⁄TITLE>
<⁄HEAD>
<!-- HTML created by David Elins mkhtml program -->
<BODY>
<CENTER>
<H1>
Talk about treepad
<⁄H1>
<⁄CENTER>
<UL>
<LI>
<B>
Add a sample node
<⁄B>
<⁄LI>
<UL>
<LI>
<B>
This as a lower level node
<⁄B>
<⁄LI>
<!-- David Elins mkhtml Note Start -->
<BR>
<I>
with a sample
<BR>
two-line note
<BR>
<⁄I>
<!-- David Elins mkhtml Note End -->
<⁄UL>
<LI>
<B>
This is a higher level node
<⁄B>
<⁄LI>
<⁄BODY>
<⁄HTML>
 
Resulting HTML, rendered
 
.

Talk about treepad

  • Add a sample node
    • This as a lower level node

    • with a sample
      two-line note
  • This is a higher level node
 
 
 
 
Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 24 of 485)
 
Comments, flames, broken links?
Please send email to maintainer@intricate-simplicity.com