{"id":16820586,"url":"https://github.com/op/hyde-geotag","last_synced_at":"2026-06-09T16:04:21.080Z","repository":{"id":1068823,"uuid":"908221","full_name":"op/hyde-geotag","owner":"op","description":"Geotag resources in hyde","archived":false,"fork":false,"pushed_at":"2010-10-08T19:37:29.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T15:26:22.379Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/op.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2010-09-13T20:21:57.000Z","updated_at":"2013-12-03T21:43:03.000Z","dependencies_parsed_at":"2022-07-18T05:21:10.705Z","dependency_job_id":null,"html_url":"https://github.com/op/hyde-geotag","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/op/hyde-geotag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op%2Fhyde-geotag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op%2Fhyde-geotag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op%2Fhyde-geotag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op%2Fhyde-geotag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/op","download_url":"https://codeload.github.com/op/hyde-geotag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op%2Fhyde-geotag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34114462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-13T10:57:23.506Z","updated_at":"2026-06-09T16:04:21.057Z","avatar_url":"https://github.com/op.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"geotagger for hyde\n==================\n\nAutomatically retrieves geodata for photos with required geodata in the EXIF\nmetadata. It depends on geolocation_ and the hyde's pre-processor\nImageMetadata or ImageMetadataPyExiv2.\n\n.. _geolocation: http://github.com/op/geolocation/\n\nThe geodata retrieved will be cached in a DBM. Positions can be set to be\nrounded down to a precision to make fewer requests to the provider of geodata.\nThere's also a simple rate-limiter in place to make sure we don't flood the\nprovider with too many queries.\n\nInstallation\n------------\n\nFirst you will need to make sure that you either use `image-metadata` or\n`image-metadata2` to parse EXIF tags. For similicity, I'll show two blocks\nwhich maps both the PIL and the PyExiv2 processors to a common base::\n\n  # Python image library\n  'hydeengine.site_pre_processors.ImageMetadata': {\n      'mapping': {\n          'exif.GPSInfo.GPSLatitude': 'gps.lat.value',\n          'exif.GPSInfo.GPSLatitudeRef': 'gps.lat.ref',\n          'exif.GPSInfo.GPSLongitude': 'gps.long.value',\n          'exif.GPSInfo.GPSLongitudeRef': 'gps.long.ref'\n      }\n  },\n\n  # PyExiv2\n  'hydeengine.site_pre_processors.ImageMetadataPyExiv2': {\n      'mapping': {\n          'Ipct.Application2.Caption': 'caption',\n          'Exif.GPSInfo.GPSLatitude': 'gps.lat.value',\n          'Exif.GPSInfo.GPSLatitudeRef': 'gps.lat.ref',\n          'Exif.GPSInfo.GPSLongitude': 'gps.long.value',\n          'Exif.GPSInfo.GPSLongitudeRef': 'gps.long.ref',\n      }\n  },\n\nNext, add the `GeoTagger` to your hyde `settings.py`-file, something like this::\n\n  SITE_PRE_PROCESSORS = {\n      'media': {\n          'hydeengine.site_pre_processors.ResourcePairer': {},\n          'hydeengine.site_pre_processors.ImageMetadata': {},\n          'hydeengine.site_pre_processors.ImageMetadataPyExiv2': {},\n          'hyde_geotag.GeoTagger': {}\n      }\n  }\n\nThe GeoTagger can be customized to use different DBMs. By default, the default\nPython dbm module will be used. Options to this include anydbm, dbhash.\n\nBy setting the `source` to `bsd`, BDB will be used. First bsddb3 will be tried\nto be used, if that module is not available it will fallback to bsddb.\n\nFor more information on how to customize it, please see the source code.\n\nUsage\n-----\n\nOnce the photo has been processed, you can retrieve the value by using\n`resource.geotag.city` or `resource.geotag.city`.\n\nHere's a simple example::\n\n  \u003cdl\u003e\n  {% for resource in page.node.media %}\n      {% ifequal resource.file.kind \"jpg\" %}\n          \u003cdt\u003e{{resource.url}} ({{resource.meta.gps.lat.value}},{{resource.meta.gps.long.value}})\u003c/dt\u003e\n          \u003cdd\u003e{{resource.geotag.city}}, {{resource.geotag.country}}\u003c/dd\u003e\n     {% endifequal %}\n  {% endfor %}\n  \u003c/dl\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fop%2Fhyde-geotag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fop%2Fhyde-geotag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fop%2Fhyde-geotag/lists"}