From 0d6adfe752875aa1e4a985dbd92509af7f1fbdf8 Mon Sep 17 00:00:00 2001 From: typebrook Date: Wed, 13 Nov 2019 20:59:33 +0800 Subject: update --- utils/osm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'utils/osm') diff --git a/utils/osm b/utils/osm index 9dcd7c1..532d133 100644 --- a/utils/osm +++ b/utils/osm @@ -43,8 +43,8 @@ osm.goto() { xdg-open https://www.openstreetmap.org/$1/$2 } -SERVER=https://master.apis.dev.openstreetmap.org -#SERVER=https://api.openstreetmap.org +#SERVER=https://master.apis.dev.openstreetmap.org +SERVER=https://api.openstreetmap.org OSM_API=$SERVER/api/0.6 OSM_USER_PASSWD=$(cat $SETTING_DIR/tokens/osm) @@ -57,17 +57,19 @@ osm.api.fetch() { osm.api.fetch.full() { curl -X GET $OSM_API/$1/$2/full |\ tee /tmp/osm &&\ - echo content of $1 $2 and its members are copied into /tmp/osm > /dev/tty + echo "\n" content of $1 $2 and its members are copied into /tmp/osm > /dev/tty } osm.api.fetch.history() { curl -X GET $OSM_API/$1/$2/history |\ tee /tmp/osm &&\ - echo history of $1 $2 are copied into /tmp/osm > /dev/tty + echo &&\ + echo "\n" history of $1 $2 are copied into /tmp/osm > /dev/tty } osm.api.referenced.relation() { curl -X GET $OSM_API/$1/$2/relations |\ tee /tmp/osm &&\ - echo relations contain $1 $2 are copied into /tmp/osm > /dev/tty + echo &&\ + echo "\n" relations contain $1 $2 are copied into /tmp/osm > /dev/tty } osm.member.relation() { sed -nr "/ /dev/tty + echo "\ntag list is also copied into /tmp/osm" > /dev/tty } # extract an element from .osm format STDIN # $1 as [node|way|relation], $2 as id @@ -197,6 +199,7 @@ osm.api.changeset.create() { echo " copied into clipboard" echo "changeset created, check $SERVER/changeset/$changeset_id" + echo $changeset_id | xsel -ib } # add a new element into changeset osm.api.changeset.add() { -- cgit v1.2.3-70-g09d2