/* * [Tidy.java] * * Summary: tidies input HTML table, applies prelude, postlude, displays size. * * Copyright: (c) 1996-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 1998-01-01 */ package com.mindprod.reorg; import java.io.IOException; /** * tidies input HTML table, applies prelude, postlude, displays size. * * @author Roedy Green, Canadian Mind Products * @version 1.0 1998-01-01 * @since 1996 */ public final class Tidy extends Common { private static final int FIRST_COPYRIGHT_YEAR = 1996; /** * non-displaying copyright */ @SuppressWarnings( { "UnusedDeclaration" } ) private static final String EMBEDDED_COPYRIGHT = "Copyright: (c) 1996-2017 Roedy Green, Canadian Mind Products, http://mindprod.com"; // end getMatrix /** * main * * @param args arg[0] ignored * * @throws java.io.IOException if any problem reading or writing the html */ public static void main( String[] args ) throws IOException { // get entire table into a string. final String[][] matrix = getMatrix( IN_FILENAME ); final int rows = rows( matrix ); final int cols = cols( matrix ); displayRowAndColCounts( "input", rows, cols ); trimMatrix( matrix ); writeMatrix( matrix, OUT_FILENAME ); } // end main }