Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Script to extract endpoint locations from eduGAIN metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Apr 21, 2014
1 parent a6d17c6 commit 8d543b6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build/extract_locs_edugain.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/perl -w

use Xalan;

open(XML, xalanCall . " -IN ../mdx/int_edugain/imported.xml -XSL extract_locs.xsl|") || die "could not open input file";
while (<XML>) {
chop;
if (/^https:\/\/([^\/:]+(:\d+)?)(\/|$)/) {
my $location = $1;
$location .= ":443" unless defined $2;
$locations{$location} = 1;
}
}
close XML;

foreach $loc (sort keys %locations) {
if ($loc =~ /([^:]+):(\d+)/) {
print "$1 $2\n";
}
}

0 comments on commit 8d543b6

Please sign in to comment.