private String templateDir = MirConfig.getPropWithHome("HTMLTemplateProcessor.Dir");
public static void main(String argv[]){
- /**
- * Why are we reloading the config here?
- * Can someone please explain this?
- * Hope I didn't break anything
- * -mh. <heckmann@hbe.ca>
- *
- * This is the entry point for standalone production. The code
- * is then running in a new virtual machine, e.g. when called
- * from cron-script. In that case the config has to be initliased.
- * Don't know if is ok that way //rk
- *
- * ok, i figured that out a few months ago.. -mh
- *
- */
//Configuration.initConfig("config");
System.out.println(MirConfig.getProp("Producer.DocRoot"));
}
}
-
-
public void handle(PrintWriter htmlout, EntityUsers user, boolean force,
boolean sync)
throws StorageObjectException, ModuleException {
String date = currentContent.getValue("date");
String year = date.substring(0,4);
String month = date.substring(4,6);
- htmlFileName = producerDocRoot + "/" + year + "/" + month + "/" +
+ htmlFileName = "/" + year + "/" + month + "/" +
currentContent.getValue("id") + ".shtml";
//produce html
//produce xsl:fo and pdf version(if desired)
if (generateFO.toLowerCase().equals("yes")){
- foFileName = producerDocRoot + "/" + year + "/" + month + "/"
+ foFileName = "/" + year + "/" + month + "/"
+ currentContent.getValue("id") + ".fo";
boolean foRetVal = produce(contentPrintableTemplate, foFileName,
- mergeData, htmlout);
+ mergeData, htmlout, "UTF8");
if (generatePDF.toLowerCase().equals("yes")){
- pdfFileName = producerStorageRoot + producerDocRoot +"/" + year
+ pdfFileName = producerStorageRoot + "/" + year
+ "/" + month + "/"
+ currentContent.getValue("id") + ".pdf";
Driver driver = new Driver();