Browse Source

Cleanup.

master
Petter Reinholdtsen 5 years ago
parent
commit
473fb4add9
  1. 8
      har2kml

8
har2kml

@ -23,6 +23,11 @@ har2hosts() {
cut -d/ -f3 | sort -u
}
kmljoin() {
cat $* | perl -e '$line = ""; while (<>) { $line .= $_; }; $line =~ s%</Document>\s</kml>\s<\?xml version="1.0" encoding="UTF-8"\?>\s<kml xmlns="http://www.opengis.net/kml/2.2">\s<Document>\s<Info>Generated by https://geotraceroute.com</Info>%%gs; $line =~ s%<name>.+</name>%%g; print $line;'
}
if [ ! -d cache ] ; then mkdir cache ; fi
for h in $(har2hosts) ; do
@ -32,5 +37,4 @@ for h in $(har2hosts) ; do
fi
kmls="$kmls $kml"
done
cat $kmls | perl -e '$line = ""; while (<>) { $line .= $_; }; $line =~ s%</Document>\s</kml>\s<\?xml version="1.0" encoding="UTF-8"\?>\s<kml xmlns="http://www.opengis.net/kml/2.2">\s<Document>\s<Info>Generated by https://geotraceroute.com</Info>%%gs; $line =~ s%<name>.+</name>%%g; print $line;'
kmljoin $kmls

Loading…
Cancel
Save