Commit c80185b6 authored by Gavin Brown's avatar Gavin Brown
Browse files

generate an "all" search result file

parent 34c86098
......@@ -66,6 +66,11 @@ my $status = {
print STDERR "Generating files\n";
my $all = {
'rdapConformance' => [ 'rdap_level_0' ],
'domainSearchResults' => [],
};
foreach my $tld (@tlds) {
my $file = sprintf('%s/%s.txt', $dir, $tld);
my @data;
......@@ -344,6 +349,18 @@ foreach my $tld (@tlds) {
printf(STDERR "Unable to write to '%s': %s\n", $jfile, $!);
exit(1);
}
push(@{$all->{'domainSearchResults'}}, $data);
}
#
# write RDAP object to disk
#
my $jfile = sprintf('%s/_all.json', $dir);
if (!write_file($jfile, $json->encode($all))) {
printf(STDERR "Unable to write to '%s': %s\n", $jfile, $!);
exit(1);
}
print STDERR "done\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment