#!/bin/bash
# usage:
#   kmz2poi poi.kmz poi.asc
#
# convert Google Placemarks to ASCII POI File

if [ $# -ne 2 ]; then
  echo "usage: kmz2poi poi.kmz poi.asc"
  exit
fi

unzip -q -p "$1" | gpsbabel -w -i kml -f - -o xcsv,style=/etc/gpsbabel/style/csv_poi.style -c latin1 -F "$2"

