print " --help                    - Show this message\n";
                exit;
        }
    }
}
if ($inputfile == "" || $outputfile == "") {
    print "You must specify an input and output file. See --help.\n";
    exit;
}
$map = new WeatherMap();
$map->context = 'cacti';
$map->rrdtool = read_config_option("path_rrdtool");
print "Reading config from {$inputfile}\n";
$map->ReadConfig($inputfile);
$map->initialiseAllPlugins();
$map->preProcessTargets();
$allitems = array(&$map->links, &$map->nodes);
reset($allitems);
while (list($kk, ) = each($allitems)) {
    unset($objects);
    $objects =& $allitems[$kk];
    reset($objects);
    while (list($k, ) = each($objects)) {
        unset($myobj);
        $myobj =& $objects[$k];
        $type = $myobj->my_type();
        $name = $myobj->name;
        wm_debug("ReadData for {$type} {$name}: \n");
        if ($type == 'LINK' && isset($myobj->a) || $type == 'NODE' && !is_null($myobj->x)) {
            if (count($myobj->targets) > 0) {
                $totaltargets++;