X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=utils%2Fhelp2Website.java;h=83e4b5f11ee6ff15cee9fdcb9bbccd657d7de73f;hb=b1e2aea95b3839a1a53f809c579666075cd3d348;hp=7156c1acbcbb323cc222a095656706b004f6c0b9;hpb=397839d27a0ef4e39b5fbf944ac05ca21eff12f8;p=jalview.git diff --git a/utils/help2Website.java b/utils/help2Website.java index 7156c1a..83e4b5f 100755 --- a/utils/help2Website.java +++ b/utils/help2Website.java @@ -1,90 +1,110 @@ -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("
\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(); // "+indent+text); - - - if(line.indexOf("/>")==-1) - indent.append(" "); - - } - - - out.close(); - - } - - catch(Exception ex) - { - ex.printStackTrace(); - - System.out.println("Usage: move to Help directory. help2Website will read" - +"\nhelpTOC.xml and help.jhm producing output helpTOC.html"); - } - } - - -} \ No newline at end of file +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see " + indent + text); + + if (line.indexOf("/>") == -1) + indent.append(" "); + + } + // Add Googletracker. + + out.close(); + + } + + catch (Exception ex) + { + + ex.printStackTrace(); + + System.out.println("\n" + line + "\n"); + + System.out + .println("Usage: move to Help directory. help2Website will read" + + "\nhelpTOC.xml and help.jhm producing output helpTOC.html"); + } + } + +} |