LOCAL=$(ifconfig | grep -A 1 "en" | grep broadcast | cut -d " " -f 2 | tr "\\n" " ")
EXTERNAL=$(curl --silent http://whatismyip.akamai.com)
EXTERNAL6=$(curl --silent http://ipv6.whatismyip.akamai.com)

cat<<EOB
<?xml version="1.0"?>
<items>
<item uid="externalip" arg="$EXTERNAL">
<title>External IPv4: $EXTERNAL</title>
<subtitle>Press Enter to paste, or Cmd+C to copy</subtitle>
<icon>icon.png</icon>
</item>
<item uid="externalip6" arg="$EXTERNAL6">
<title>External IPv6: $EXTERNAL</title>
<subtitle>Press Enter to paste, or Cmd+C to copy</subtitle>
<icon>icon.png</icon>
</item>
<item uid="localip" arg="$LOCAL">
<title>Local IP: $LOCAL</title>
<subtitle>Press Enter to paste, or Cmd+C to copy</subtitle>
<icon>icon.png</icon>
</item>
</items>
EOB