Lottery upload

This commit is contained in:
gexce
2017-11-09 15:57:55 +01:00
parent af6aa17ed6
commit db3c35b4c0
4 changed files with 230 additions and 3 deletions
@@ -71,6 +71,10 @@ public class MamMigrationSelective implements CommandLineRunner {
static final String categoryJson = "resources/2017-10-19_categories.json";
static final String categoryMapping = "resources/Media_Assistant_Categories_131017_EDITED_without_archive.csv";
// XXX
// static final String entryListPath = "resources/entrylist_2017-10-25.txt";
static final String entryListPath = "resources/lottery.txt";
@Value("${mam.auth}")
private String mamAuth;
@@ -99,7 +103,7 @@ public class MamMigrationSelective implements CommandLineRunner {
public void run(String... strings) throws Exception {
// XXX
// readEntryIDsFromFile();
readEntryIDsFromFile();
log.info("Read categories");
mamCategoryTree = new CategoryTree(categoryJson, categoryMapping);
@@ -683,7 +687,7 @@ public class MamMigrationSelective implements CommandLineRunner {
}
private void readEntryIDsFromFile() throws IOException {
File entryIdListFile = new File("resources/entrylist_2017-10-25.txt");
File entryIdListFile = new File(entryListPath);
log.debug("Reading entry IDs from " + entryIdListFile.getAbsolutePath());
List<String> entryIdList = FileUtils.readLines(entryIdListFile, Charset.forName("utf-8"));