import java.io.*;
import java.util.*;
public class help2Website
{
public static void main(String [] args)
{
try{
Hashtable targets = new Hashtable();
File toc = new File("helpTOC.xml");
File jhm = new File("help.jhm");
BufferedReader in = new BufferedReader(new FileReader(jhm));
PrintWriter out = new PrintWriter(new FileWriter("helpTOC.html"));
out.println("
Jalview - Help \n"
+"\n"
+"Contents\n");
String line;
StringTokenizer st;
StringBuffer indent = new StringBuffer();
String target, url, text;
while( (line = in.readLine()) != null)
{
if(line.indexOf("target")==-1)
continue;
st = new StringTokenizer(line, "\"");
st.nextToken(); //")!=-1)
indent.setLength(indent.length()-18);
if(line.indexOf(""+indent+""
+text
+"");
else
out.println("
"+indent+text);
if(line.indexOf("/>")==-1)
indent.append(" ");
}
out.println("\n