diff options
-rwxr-xr-x | har2kml | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |