{"id":16150781,"url":"https://github.com/denysvitali/zefix-tools","last_synced_at":"2025-07-04T09:01:55.820Z","repository":{"id":216599770,"uuid":"741686307","full_name":"denysvitali/zefix-tools","owner":"denysvitali","description":"A collection of tools to interact with the data exported by Zefix, the Swiss Central Business Name Index","archived":false,"fork":false,"pushed_at":"2024-10-20T09:58:05.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-28T20:58:38.795Z","etag":null,"topics":["zefix"],"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/denysvitali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-01-10T22:42:17.000Z","updated_at":"2025-02-13T11:32:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6507bb7-e083-4d0f-a319-9c9d123f4e62","html_url":"https://github.com/denysvitali/zefix-tools","commit_stats":null,"previous_names":["denysvitali/zefix-tools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/denysvitali/zefix-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denysvitali%2Fzefix-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denysvitali%2Fzefix-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denysvitali%2Fzefix-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denysvitali%2Fzefix-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denysvitali","download_url":"https://codeload.github.com/denysvitali/zefix-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denysvitali%2Fzefix-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263480755,"owners_count":23473157,"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":["zefix"],"created_at":"2024-10-10T00:51:58.989Z","updated_at":"2025-07-04T09:01:55.746Z","avatar_url":"https://github.com/denysvitali.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zefix-tools\n\nA collection of tools to interact with the data exported by Zefix, the Swiss Central Business Name Index.\n\n## Get the data\n\nUse [sparql-client](https://github.com/denysvitali/sparql-client) to query the data from \nthe [Zefix SPARQL endpoint](https://register.ld.admin.ch/sparql) and generate a JSON file.\n\n```bash\ngo install github.com/denysvitali/sparql-client/cmd/sparql-client@master\nsparql-client --endpoint https://register.ld.admin.ch/query \\\n    --query query.txt \\\n    -a -D \\\n    --limit 500 \\\n    -o zefix.json\n```\n\n## Import the data\n\n### Start PostgreSQL\n\n```bash\ndocker-compose up -d\n```\n\n#### Get the container IP\n\n```bash\ndocker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker-compose ps -q | head -n1)\n```\n\nOnce you have the IP, you can add it to `ZEFIX_DSN` in `.env`\n\n### Import the data to postgres\n\n```bash\nsource .env\nexport ZEFIX_DSN\n# This will take a while:\ngo run ./cmd/zefix-import --input ./zefix.json\n```\n\n## Query the data\n\n```bash\nsource .env\nexport ZEFIX_DSN\ngo run ./cmd/zefix-find \"Rega AG\"                                                                                           [23:39:51]\n```\n\nwill result in:\n\n```plain\nName: Rega AG\nURI: https://register.ld.admin.ch/zefix/company/144424\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenysvitali%2Fzefix-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenysvitali%2Fzefix-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenysvitali%2Fzefix-tools/lists"}