- private static Logger LOG = Logger.getLogger(Main.class.getSimpleName());
- private static String KEY_HTML_HEADER_FILE = "html.header.file";
+ private static final Logger LOG = Logger.getLogger(Main.class.getSimpleName());
+ private static final String KEY_HTML_HEADER_FILE = "html.header.file";
+ private static final String KEY_FEED_TITLE = "feed.title";
- private static String getHTMLHeader(Properties props) throws IOException {
+ private static String getFeedTitle(Properties props) {
+ return props.getProperty(KEY_FEED_TITLE);
+ }
+
+ private static void appendHTMLHeader(StringBuffer sb, Properties props)
+ throws IOException {
- return new String(Files.readAllBytes(f.toPath()),
- StandardCharsets.UTF_8);
+
+ sb.append("<head>\n");
+ sb.append(new String(Files.readAllBytes(f.toPath()),
+ StandardCharsets.UTF_8));
+ sb.append("</head>\n");
feed.setDescription(props.getProperty("feed.description"));
feed.setLink(props.getProperty("feed.link"));
entries = new ArrayList<SyndEntry>();
news = new StringBuffer();
feed.setDescription(props.getProperty("feed.description"));
feed.setLink(props.getProperty("feed.link"));
entries = new ArrayList<SyndEntry>();
news = new StringBuffer();
System.out.println(news.toString());
Files.write(new File(outDir, "news.html").toPath(), news.toString().getBytes());
}
System.out.println(news.toString());
Files.write(new File(outDir, "news.html").toPath(), news.toString().getBytes());
}