mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
improve conversion
This commit is contained in:
Binary file not shown.
@@ -80,6 +80,7 @@ public class V1FileParser implements IOldFileParser {
|
|||||||
project.setTitle(root.getAttribute("Project"));
|
project.setTitle(root.getAttribute("Project"));
|
||||||
project.setAuthor(root.getAttribute("Credits"));
|
project.setAuthor(root.getAttribute("Credits"));
|
||||||
project.setGridSpacing(V1_GRID_SPACING);
|
project.setGridSpacing(V1_GRID_SPACING);
|
||||||
|
project.setDescription("Automatically converted from V1 format.");
|
||||||
String type = root.getAttribute("Type");
|
String type = root.getAttribute("Type");
|
||||||
|
|
||||||
// Create the board.
|
// 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.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FilenameFilter;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
@@ -93,5 +94,17 @@ public class DIYLCStarter {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Could not read config.properties file", 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);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user