From f960a018c1ca0e69c2e4b175f4b5d5d37930c945 Mon Sep 17 00:00:00 2001 From: gojomo Date: Wed, 7 Oct 2009 05:04:39 +0000 Subject: [PATCH] [HER-1641] migration tool to convert Heritrix 1.14.x order.xml to H3 crawler-beans.cxml * MigrateH1to3Tool.java add count of successfully migrated settings --- .../java/org/archive/crawler/migrate/MigrateH1to3Tool.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/src/main/java/org/archive/crawler/migrate/MigrateH1to3Tool.java b/engine/src/main/java/org/archive/crawler/migrate/MigrateH1to3Tool.java index 91999799..53ffd5b4 100644 --- a/engine/src/main/java/org/archive/crawler/migrate/MigrateH1to3Tool.java +++ b/engine/src/main/java/org/archive/crawler/migrate/MigrateH1to3Tool.java @@ -100,6 +100,7 @@ public class MigrateH1to3Tool { List notApplicable = new ArrayList(); List needsAttention = new ArrayList(); + int migrated = 0; StringBuilder sb = new StringBuilder(); for(String key : h1simpleSettings.keySet()) { String beanPath = migrateH1toH3Map.get(key); @@ -112,6 +113,7 @@ public class MigrateH1to3Tool { // TODO: needs special handling if(beanPath.equals("*metadata.userAgentTemplate")) { splitH1userAgent(value,sb); + migrated += 2; } else { needsAttention.add(key+" "+value); } @@ -121,6 +123,8 @@ public class MigrateH1to3Tool { .append("=") .append(value) .append("\n"); + migrated++; + } System.out.print("."); } @@ -148,6 +152,8 @@ public class MigrateH1to3Tool { System.out.println("of the following and update manually to reflect your intent "); listProblems(needsAttention); System.out.println(); + System.out.println(migrated +" H1 settings successfully migrated to H3 configuration"); + System.out.println(); System.out.println("Review your converted crawler-beans.cxml at:"); System.out.println(targetBeansXmlFile.getAbsolutePath()); }