1 package jalview.help.freemarker;
3 import jalview.io.AppletFormatAdapter;
6 import java.io.FileWriter;
7 import java.io.IOException;
8 import java.io.OutputStreamWriter;
10 import java.util.HashMap;
13 import freemarker.template.Configuration;
14 import freemarker.template.Template;
15 import freemarker.template.TemplateException;
17 public class AllignmentMenuTemplateData
20 public static void main(String[] args)
22 // System.out.println("Absolute Path " + new File().getAbsoluteFile());
23 generateAllignmentMenuTemplateData();
25 public static void generateAllignmentMenuTemplateData()
27 Configuration cfg = new Configuration();
30 // Load template from source folder
31 Template template = cfg
32 .getTemplate("/help/freemarker_templates/alignmentMenu.ftl");
34 // Build the data-model
35 Map<String, Object> data = new HashMap<String, Object>();
36 data.put("format_adapters", AppletFormatAdapter.WRITEABLE_FORMATS);
39 Writer out = new OutputStreamWriter(System.out);
40 template.process(data, out);
44 Writer file = new FileWriter(
46 "help/html/freemarker_html_output/alignmentMenu.html"));
47 template.process(data, file);
51 } catch (IOException e)
54 } catch (TemplateException e)