summaryrefslogtreecommitdiff
path: root/dslog/Main.java
blob: 0d35e8b136dcc047cbf68aa55e34d647f8ddba87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package dslog;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.SortedMap;
import java.util.Map;
import java.util.TreeMap;

class Main {
	public static void dslog2csv(String filename) throws IOException {
		try (DslogReader file = new DslogReader(Files.newInputStream(Paths.get(filename)))) {
			System.out.println("Format Version: "+file.version());
			System.out.println("Start Time: "+file.startTime());
			CsvWriter.Dslog2CSV(file, System.out);
		}
	}

	public static void ls(String dirname) throws IOException {
		Logdir.opendir(dirname).forEach((k,v)->{
			System.out.println(v);
		});
	}

	public static void main(String[] args) throws IOException {
		for (String dirname : args) {
			ls(dirname);
		}
	}
}