use of org.opensextant.xtext.collectors.mailbox.OutlookPSTCrawler in project Xponents by OpenSextant.
the class XText method convertOutlookPST.
/**
*
* @param input
* input PST object
* @throws IOException
* on err
* @throws ConfigException
* on err
*/
public void convertOutlookPST(File input) throws ConfigException, IOException {
if (!paths.isSaving()) {
log.error("Warning -- PST file found, but save = true is required to parse it. Enable saving and chose a cache folder");
}
OutlookPSTCrawler pst = new OutlookPSTCrawler(input);
pst.setConverter(this);
pst.overwriteMode = ConvertedDocument.overwrite;
pst.incrementalMode = true;
File saveFolder = paths.getArchiveExportDir(input);
String savePrefix = paths.getStipPrefixPath();
paths.setStripPrefixPath(saveFolder.getAbsolutePath());
paths.setInputRoot(saveFolder);
pst.setOutputPSTDir(saveFolder);
pst.configure();
log.info("\tPST Email Archive Found ({}). Expanding to {}", input, saveFolder);
try {
pst.collect();
} catch (Exception err) {
throw new ConfigException("Unable to fully digest PST file " + input, err);
}
// Done:
paths.setStripPrefixPath(savePrefix);
}
use of org.opensextant.xtext.collectors.mailbox.OutlookPSTCrawler in project Xponents by OpenSextant.
the class TestPST method main.
public static void main(String[] args) {
try {
OutlookPSTCrawler pst = new OutlookPSTCrawler(args[0]);
pst.incrementalMode = true;
pst.overwriteMode = true;
pst.setOutputDir(new File("/tmp"));
pst.configure();
pst.collect();
} catch (Exception err) {
err.printStackTrace();
}
}
Aggregations