Search in sources :

Example 1 with TablePrinter

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));
}
Also used : TablePrinter(info.ata4.disunity.cli.util.TablePrinter)

Example 2 with TablePrinter

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);
}
Also used : TablePrinter(info.ata4.disunity.cli.util.TablePrinter) ArrayList(java.util.ArrayList) TableModel(info.ata4.disunity.cli.util.TableModel)

Example 3 with TablePrinter

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);
}
Also used : Formatters(info.ata4.disunity.cli.util.Formatters) TablePrinter(info.ata4.disunity.cli.util.TablePrinter) ArrayList(java.util.ArrayList) TextTableFormat(info.ata4.disunity.cli.util.TextTableFormat) TableModel(info.ata4.disunity.cli.util.TableModel)

Aggregations

TablePrinter (info.ata4.disunity.cli.util.TablePrinter)3 TableModel (info.ata4.disunity.cli.util.TableModel)2 ArrayList (java.util.ArrayList)2 Formatters (info.ata4.disunity.cli.util.Formatters)1 TextTableFormat (info.ata4.disunity.cli.util.TextTableFormat)1