improve conversion

This commit is contained in:
bancika
2016-11-08 13:13:55 +01:00
parent f63b6e5c0d
commit 9c0784d59f
5 changed files with 14 additions and 0 deletions
Binary file not shown.
@@ -80,6 +80,7 @@ public class V1FileParser implements IOldFileParser {
project.setTitle(root.getAttribute("Project"));
project.setAuthor(root.getAttribute("Credits"));
project.setGridSpacing(V1_GRID_SPACING);
project.setDescription("Automatically converted from V1 format.");
String type = root.getAttribute("Type");
// Create the board.
Binary file not shown.
Binary file not shown.
@@ -2,6 +2,7 @@ package org.diylc;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import java.net.URL;
import java.util.Properties;
@@ -93,5 +94,17 @@ public class DIYLCStarter {
} catch (Exception e) {
LOG.error("Could not read config.properties file", e);
}
// batch convert old format to new
// File dir = new File("c:\\Users\\bancika\\Downloads\\layouts_v1\\MarkM");
// File[] matchingFiles = dir.listFiles(new FilenameFilter() {
// public boolean accept(File dir, String name) {
// return true;
// }
// });
// for (File file : matchingFiles) {
// mainFrame.getPresenter().loadProjectFromFile(file.getAbsolutePath());
// mainFrame.getPresenter().saveProjectToFile(file.getParentFile().getAbsolutePath() + "\\converted\\" + file.getName(), false);
// }
}
}