{"id":17078905,"url":"https://github.com/stefanb/osmshortlink-go","last_synced_at":"2025-03-23T12:27:15.985Z","repository":{"id":64297289,"uuid":"564200124","full_name":"stefanb/osmshortlink-go","owner":"stefanb","description":"Go module and command-line tool for handling OpenStreetMap shortlinks","archived":false,"fork":false,"pushed_at":"2025-03-02T15:44:14.000Z","size":86,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T16:31:08.905Z","etag":null,"topics":["bit-interleaving","golang-library","golang-package","link-shortener","morton-code","morton-encoding-library","openstreetmap","osm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-10T07:54:26.000Z","updated_at":"2025-03-02T15:43:23.000Z","dependencies_parsed_at":"2024-06-01T05:41:12.446Z","dependency_job_id":"cafa991b-4d24-4036-97a5-8a67cc852211","html_url":"https://github.com/stefanb/osmshortlink-go","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanb%2Fosmshortlink-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanb%2Fosmshortlink-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanb%2Fosmshortlink-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanb%2Fosmshortlink-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanb","download_url":"https://codeload.github.com/stefanb/osmshortlink-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245101278,"owners_count":20560981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bit-interleaving","golang-library","golang-package","link-shortener","morton-code","morton-encoding-library","openstreetmap","osm"],"created_at":"2024-10-14T12:23:55.654Z","updated_at":"2025-03-23T12:27:15.958Z","avatar_url":"https://github.com/stefanb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# osmshortlink-go: Go module and command-line tool for creating, encoding \u0026 decoding of OpenStreetMap shortlinks\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/stefanb/osmshortlink-go.svg)](https://pkg.go.dev/github.com/stefanb/osmshortlink-go)\n[![Test](https://github.com/stefanb/osmshortlink-go/actions/workflows/test.yml/badge.svg)](https://github.com/stefanb/osmshortlink-go/actions/workflows/test.yml)\n[![golangci-lint](https://github.com/stefanb/osmshortlink-go/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/stefanb/osmshortlink-go/actions/workflows/golangci-lint.yml)\n[![CodeQL](https://github.com/stefanb/osmshortlink-go/actions/workflows/codeql.yml/badge.svg)](https://github.com/stefanb/osmshortlink-go/actions/workflows/codeql.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/stefanb/osmshortlink-go)](https://goreportcard.com/report/github.com/stefanb/osmshortlink-go)\n[![codebeat badge](https://codebeat.co/badges/0dcfa9c5-a59b-46ed-b0a6-30e1bbda9a7e)](https://codebeat.co/projects/github-com-stefanb-osmshortlink-go-main)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/stefanb/osmshortlink-go/badge)](https://securityscorecards.dev/viewer/?uri=github.com/stefanb/osmshortlink-go)\n[![GitHub Release](https://img.shields.io/github/release/stefanb/osmshortlink-go.svg?style=flat)](https://github.com/stefanb/osmshortlink-go/releases/latest)\n\nSpecification: https://wiki.openstreetmap.org/wiki/Shortlink\n\n## Usage\n\n### Creating a link in Go\n\n```go\npackage main\n\nimport \"github.com/stefanb/osmshortlink-go\"\n\nfunc main() {\n\tshortlink, err := osmshortlink.Create(46.05141, 14.50604, 17)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tprint(shortlink)\n}\n```\n\nPrints: [`https://osm.org/go/0Ik3VNr_A-?m`](https://osm.org/go/0Ik3VNr_A-?m)\n\n[Try it in Go playground](https://go.dev/play/p/mObcbRyGU9E)\n\n### Command-line tool\n\n#### Installation\n\n##### Download the pre-built binaries\n\nDownload the pre-built binaries for your platform from [latest release](https://github.com/stefanb/osmshortlink-go/releases/latest).\n\n##### Install using Go\n\n````bash\n$ go install github.com/stefanb/osmshortlink-go/cmd/osmshortlink@latest\n$ osmshortlink 46.05141 14.50604 17\nhttps://osm.org/go/0Ik3VNr_A-?m\n````\n\n#### Run using Go without installing\n\n````bash\n$ go run github.com/stefanb/osmshortlink-go/cmd/osmshortlink@latest 46.05141 14.50604 17\nhttps://osm.org/go/0Ik3VNr_A-?m\n````\n\n#### Pre-built binaries\n\nYou can download pre-built binaries for various platforms from [latest release](https://github.com/stefanb/osmshortlink-go/releases/latest).\n\n```bash\nUsage: osmshortlink [latitude] [longitude] [zoom]\n```\n\nFor example:\n\n```bash\n$ osmshortlink 46.05141 14.50604 17\nhttps://osm.org/go/0Ik3VNr_A-?m\n```\n\n## Development\n\nRun: `go run ./cmd/osmshortlink/main.go 46.05141 14.50604 17`\n\nTesting: `go test -v -race -cover ./...`\n\nFuzz testing: `go test -fuzz=. -fuzztime=1m`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanb%2Fosmshortlink-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanb%2Fosmshortlink-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanb%2Fosmshortlink-go/lists"}