diff --git a/src/main/java/com/github/linsea/apk/compare/Main.java b/src/main/java/com/github/linsea/apk/compare/Main.java index d8bb97a..ba440a0 100644 --- a/src/main/java/com/github/linsea/apk/compare/Main.java +++ b/src/main/java/com/github/linsea/apk/compare/Main.java @@ -59,7 +59,6 @@ public static void main(String[] args) { outputDiffList.add(diffItem); } -// outputCSV(args[2], outputDiffList); outputMarkdown(args, outputDiffList); System.out.println("APK compare done!"); @@ -124,26 +123,6 @@ private static void outputMarkdown(String[] filenames, List outputDiff } } - private static void outputMarkdownDiffList(Writer writer, String title, List outputDiffList) { - if (outputDiffList.size() > 0) { - try { - writer.append("## ").append(title).append("\n"); - writer.append("| OLD FILE | NEW FILE | DIFF SIZE (byte)|\n"); - writer.append("| -------- | -------- | -------------: |\n"); - for (DiffItem diffItem : outputDiffList) { - writer.append("| ").append(diffItem.oldFilename).append(" | ") - .append(diffItem.newFilename).append(" | ") - .append(diffItem.diffSize.toString()) - .append(" |\n"); - writer.flush(); - } - writer.write("\n"); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - private static void outputMarkdownAddedList(Writer writer, List outputDiffList) { if (outputDiffList.size() > 0) { try { @@ -228,21 +207,6 @@ private static void outputMarkdownRemovedList(Writer writer, List outp } } - private static void outputCSV(String filename, List outputDiffList) { - try { - BufferedWriter writer = new BufferedWriter(new FileWriter(filename + ".csv")); - writer.append("OLD FILE,NEW FILE,DIFF SIZE(byte)\n"); - for (DiffItem diffItem : outputDiffList) { - writer.append(diffItem.oldFilename).append(',') - .append(diffItem.newFilename).append(',') - .append(diffItem.diffSize.toString()) - .append('\n'); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - private static Map getFilesInfo(String apkFilePath) { Map map = new LinkedHashMap(); try { diff --git a/src/test/java/com/github/linsea/apk/compare/ApkCompareTest.java b/src/test/java/com/github/linsea/apk/compare/ApkCompareTest.java index 551b535..fc67997 100644 --- a/src/test/java/com/github/linsea/apk/compare/ApkCompareTest.java +++ b/src/test/java/com/github/linsea/apk/compare/ApkCompareTest.java @@ -6,8 +6,8 @@ public class ApkCompareTest { @Test public void test() { String[] args = new String[]{ - "/home/andy/tmp/yymobile_client-6.0.0-SNAPSHOT-43116-official.apk", - "/home/andy/tmp/yymobile_client-6.0.5-SNAPSHOT-43366-official.apk", + "/home/andy/tmp/app-6.0.0.apk", + "/home/andy/tmp/app-6.0.5.apk", "changes"}; Main.main(args); }