go-www-geotag-sfomuseum

module
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2020 License: BSD-3-Clause

README

go-www-geotag-sfomuseum

A web application, written in Go, for geotagging images in the SFO Museum collection.

Important

This is work in progress, including the documentation. In the meantime please have a look at the Geotagging at SFO Museum series of blog posts and the Geotagging at SFO Museum, Part 7 – Custom Writers and Geotagging at SFO Museum, part 9 – Publishing Data and Geotagging at SFO Museum, part 10 – Native Applications posts in particular.

Example

$> cd go-www-geotag-sfomuseum
$> go build -mod vendor -p bin/server cmd/server/main.go

$> bin/server \
	-nextzen-apikey {NEXTZEN_API_KEY} \
	-enable-placeholder
	-placeholder-endpoint {PLACEHOLDER_API_KEY} \
	-enable-oembed \
	-oembed-endpoints 'https://millsfield.sfomuseum.org/oembed/?url={url}' \
	-enable-writer \
	-writer-uri 'whosonfirst://?writer={whosonfirst_writer}&reader={whosonfirst_reader}&update=1&source=sfomuseum' \
	-whosonfirst-writer-uri 'githubapi://sfomuseum-data/sfomuseum-data-collection?access_token={access_token}&prefix=data/' \
	-whosonfirst-reader-uri 'githubapi://sfomuseum-data/sfomuseum-data-collection?access_token={access_token}&prefix=data/' \
	-enable-oauth2 \
	-oauth2-scopes 'user,repo' \
	-oauth2-client-id "constant://?val={OAUTH2_CLIENT_ID}&decoder=string" \
	-oauth2-client-secret "constant://?val={OAUTH2_SECRET}&decoder=string" \
	-oauth2-cookie-uri "constant://?val=debug&decoder=string" \
	-server-uri 'mkcert://localhost:8080'
	
2020/05/05 11:42:37 Checking whether mkcert is installed. If it is not you may be prompted for your password (in order to install certificate files)
2020/05/05 11:42:40 Listening on https://localhost:8080

Alternately you can set the -enable-oauth2-access-token-attribute flag (and corresponding -whosonfirst-writer-uri 'featurecollection-io://?count_features=2' or equivalent flag) which will cause the application to publish data on the client side, as described in the Geotagging at SFO Museum, part 10 – Native Applications blog post.

$> bin/server \
	-nextzen-apikey {NEXTZEN_API_KEY} \
	-enable-writer \
	-enable-oembed \
	-oembed-endpoints 'https://millsfield.sfomuseum.org/oembed?url={url}' \	
	-writer-uri 'whosonfirst://?writer={whosonfirst_writer}&reader={whosonfirst_reader}&update=1&update=1&source=sfomuseum' \
	-whosonfirst-writer-uri 'featurecollection-io://?count_features=2' \
	-whosonfirst-reader-uri 'github://sfomuseum-data/sfomuseum-data-collection' \
	-enable-oauth2 \
	-oauth2-scopes repo \
	-oauth2-client-id "constant://?val={OAUTH2_CLIENT_ID}&decoder=string" \
	-oauth2-client-secret "constant://?val={OAUTH2_SECRET}&decoder=string" \
	-oauth2-cookie-uri "constant://?val=debug&decoder=string" \
	-enable-oauth2-access-token-attribute \
	-server-uri 'mkcert://localhost:8080'
2020/05/19 16:21:35 Checking whether mkcert is installed. If it is not you may be prompted for your password (in order to install certificate files
2020/05/19 16:21:37 Listening on https://localhost:8080

See also

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL