Search in sources :

Example 1 with AbstractParatextFormat

use of biblemulticonverter.format.paratext.AbstractParatextFormat in project BibleMultiConverter by schierlm.

the class ParatextConverter method run.

@Override
public void run(String... args) throws Exception {
    Module<ImportFormat> importModule = Main.importFormats.get(args[0]);
    Module<ExportFormat> exportModule = Main.exportFormats.get(args[2]);
    AbstractParatextFormat importFormat = (AbstractParatextFormat) importModule.getImplementationClass().newInstance();
    AbstractParatextFormat exportFormat = (AbstractParatextFormat) exportModule.getImplementationClass().newInstance();
    List<ParatextBook> books = importFormat.doImportBooks(new File(args[1]));
    exportFormat.doExportBooks(books, Arrays.copyOfRange(args, 3, args.length));
}
Also used : AbstractParatextFormat(biblemulticonverter.format.paratext.AbstractParatextFormat) ParatextBook(biblemulticonverter.format.paratext.ParatextBook) ExportFormat(biblemulticonverter.format.ExportFormat) File(java.io.File) ImportFormat(biblemulticonverter.format.ImportFormat)

Aggregations

ExportFormat (biblemulticonverter.format.ExportFormat)1 ImportFormat (biblemulticonverter.format.ImportFormat)1 AbstractParatextFormat (biblemulticonverter.format.paratext.AbstractParatextFormat)1 ParatextBook (biblemulticonverter.format.paratext.ParatextBook)1 File (java.io.File)1