|
|
2007-01-27
, 21:02
|
|
Posts: 101 |
Thanked: 14 times |
Joined on Jan 2007
|
#1
|
|
|
2007-01-27
, 23:05
|
|
|
Posts: 531 |
Thanked: 79 times |
Joined on Oct 2006
@ This side of insane, that side of genius
|
#2
|
|
|
2007-01-28
, 04:41
|
|
Posts: 101 |
Thanked: 14 times |
Joined on Jan 2007
|
#3
|
|
|
2007-01-28
, 06:59
|
|
|
Posts: 1,245 |
Thanked: 421 times |
Joined on Dec 2005
|
#4
|
|
|
2007-02-01
, 18:08
|
|
Posts: 3 |
Thanked: 2 times |
Joined on Dec 2006
|
#5
|
|
|
2007-02-01
, 21:30
|
|
|
Posts: 299 |
Thanked: 168 times |
Joined on Jun 2006
@ Wales UK
|
#6
|
cat "$1"| tr -d "\r" | awk -v Categ="$2" '
BEGIN { FS="," }
{
Inv="\x27"
Lat=$2
Lon=$1
Label=$3
Desc=$4
Sql="INSERT INTO poi(lat,lon,label,desc,cat_id) VALUES("
Close=");"
Label = Inv Label Inv
if ( Desc == "" ) {
Desc = Inv Inv
} else {
Desc = Inv Desc Inv
}
printf("%s%s,%s,%s,%s,%s%s \n",Sql,Lat,Lon,Label,Desc,Categ,Close)
}'
tr -d "\r"
|
|
2007-02-02
, 16:07
|
|
|
Posts: 299 |
Thanked: 168 times |
Joined on Jun 2006
@ Wales UK
|
#7
|
##########################################################################
#
# Poi csv file converter for Maemo Mapper on Nokia 770/800
# written by Rick Cull 3/2/2007
# copywright gpl2
# Take two parameters :-
# poi.csv and Category
#
# The category must allready be in the poi.db before running this script
# use context menu/Location/Add Poi - Edit Categories to add any new
# before running.
##########################################################################
cat $1|tr -d "\r"|awk -v Categ="$2" '
{
NewString=""
NextChr=""
tmpStr=""
Len=length($0)
Count=1
CountStr=1
while ( Count <= Len ) {
NextChr=substr($0,Count,1)
if ( NextChr !~ /"/ ){
NewString=NewString NextChr
} else {
Count=Count + 1
CountStr=Count
tmpStr=substr($0,CountStr,1)
while ( tmpStr !~ /"/ ) {
if ( tmpStr !~ /,/ ) {
NewString=NewString tmpStr
} else {
NewString=NewString " "
}
CountStr=CountStr + 1
Count=Count + 1
tmpStr=substr($0,CountStr,1)
}
}
Count=Count + 1
}
split(NewString,Col,",")
Inv=sprintf("\"")
Lat=Col[2]
Lon=Col[1]
Label=Col[3]
Desc=Col[4]
Sql="INSERT INTO poi(lat,lon,label,desc,cat_id) VALUES("
Close=");"
Label = Inv Label Inv
if ( Desc == "" ) {
Desc = Inv Inv
} else {
Desc = Inv Desc Inv
}
printf("%s%s,%s,%s,%s,%s%s \n",Sql,Lat,Lon,Label,Desc,Categ,Close)
}'
|
|
2007-02-03
, 20:50
|
|
Posts: 8 |
Thanked: 0 times |
Joined on Jan 2007
|
#8
|
|
|
2007-02-04
, 19:19
|
|
|
Posts: 1,245 |
Thanked: 421 times |
Joined on Dec 2005
|
#9
|
|
|
2007-02-05
, 19:34
|
|
|
Posts: 299 |
Thanked: 168 times |
Joined on Jun 2006
@ Wales UK
|
#10
|