use of info.ata4.disunity.cli.util.TablePrinter in project disunity by ata4.
the class AssetTableCommand method runSerializedFile.
@Override
protected void runSerializedFile(Path file, SerializedFile serialized) {
TablePrinter tablePrinter = TablePrinter.fromOutputFormat(outputFormat.get(), output());
tablePrinter.file(file);
tablePrinter.print(tableModel(serialized));
}
use of info.ata4.disunity.cli.util.TablePrinter in project disunity by ata4.
the class BundleInfo method runBundle.
@Override
protected void runBundle(Path file, Bundle bundle) {
if (outputFormat.get() == OutputFormat.TEXT) {
output().println(file);
}
List<TableModel> tables = new ArrayList<>();
tables.add(new TableModel("Header", buildHeaderTable(bundle.header())));
TablePrinter tablePrinter = TablePrinter.fromOutputFormat(outputFormat.get(), output());
tablePrinter.file(file);
tablePrinter.print(tables);
}
use of info.ata4.disunity.cli.util.TablePrinter in project disunity by ata4.
the class BundleList method runBundle.
@Override
protected void runBundle(Path file, Bundle bundle) {
if (outputFormat.get() == OutputFormat.TEXT) {
output().println(file);
}
TableModel tableModel = new TableModel("Files", buildEntryTable(bundle));
TextTableFormat format = tableModel.format();
format.columnFormatter(2, Formatters::hex);
List<TableModel> tables = new ArrayList<>();
tables.add(tableModel);
TablePrinter tablePrinter = TablePrinter.fromOutputFormat(outputFormat.get(), output());
tablePrinter.file(file);
tablePrinter.print(tables);
}
Aggregations