{"id":48559725,"url":"https://github.com/gvellut/flickr2kml","last_synced_at":"2026-04-08T12:08:07.324Z","repository":{"id":57431367,"uuid":"329975912","full_name":"gvellut/flickr2kml","owner":"gvellut","description":"Simple command-line tool to generate a KML from the georeferenced photos in a Flickr album","archived":false,"fork":false,"pushed_at":"2021-07-12T15:51:55.000Z","size":62,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-25T06:32:15.770Z","etag":null,"topics":["flickr","geo","kml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gvellut.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}},"created_at":"2021-01-15T17:15:37.000Z","updated_at":"2021-07-12T15:51:22.000Z","dependencies_parsed_at":"2022-09-02T10:52:33.077Z","dependency_job_id":null,"html_url":"https://github.com/gvellut/flickr2kml","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/gvellut/flickr2kml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvellut%2Fflickr2kml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvellut%2Fflickr2kml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvellut%2Fflickr2kml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvellut%2Fflickr2kml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gvellut","download_url":"https://codeload.github.com/gvellut/flickr2kml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvellut%2Fflickr2kml/sbom","scorecard":{"id":450590,"data":{"date":"2025-08-11","repo":{"name":"github.com/gvellut/flickr2kml","commit":"483f90c1097771ec2994388cd86af3f488ad1f55"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/gvellut/flickr2kml/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/gvellut/flickr2kml/publish.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:26","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-gmj6-6f8f-6699","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T08:06:58.274Z","repository_id":57431367,"created_at":"2025-08-19T08:06:58.274Z","updated_at":"2025-08-19T08:06:58.274Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31554249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["flickr","geo","kml"],"created_at":"2026-04-08T12:08:06.588Z","updated_at":"2026-04-08T12:08:07.281Z","avatar_url":"https://github.com/gvellut.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flickr2kml\n\nSimple command-line tool to generate a KML from the georeferenced photos in a Flickr album\n\n# Install\n\nThe tool requires Python 3.6+.\n\nTo install, launch :\n\n```console\npip install flickr2kml\n```\n\nThe command above will install the `flickr2kml` Python library and its dependencies. The library includes a command-line script, also named `flickr2kml`, whose functionality is described below.\n\n# Usage\n\nUse the `--help` flag to get an overview of the arguments:\n\n```\n~$ flickr2kml --help\nUsage: flickr2kml [OPTIONS] OUTPUT_KML\n\n  Generate a KML file for the georeferenced photos in a Flickr album\n\nOptions:\n  -f, --flickr_album TEXT   URL of Flickr album  [required]\n  -t, --template TEXT       Choice of format for the placemark description,\n                            either predefined (gearth [default], mymaps) or as\n                            a path to a custom template\n\n  -n, --name_template TEXT  Choice of format for the placemark name, as a path\n                            to a custom template [default: empty]\n\n  -a, --template_arg TEXT   Variable to pass to the template (multiple\n                            possible)\n\n  -p, --pushpin             Flag to make each placemark a simple pushpin\n                            instead of a small image\n\n  --config FILE             Path to optional config file for the Flickr API\n                            credentials [default :\n                            /Users/guilhem/Library/Application\n                            Support/flickr2kml/flickr_api_credentials.txt]\n\n  --api_key TEXT            Flickr API key  [required]\n  --api_secret TEXT         Flickr API secret  [required]\n  -d, --debug               Flag to activate debug mode\n  --help                    Show this message and exit.\n  ```\n\nThe URL of the Flickr album must be something like `https://www.flickr.com/photos/o_0/albums/72157716704507802`\n\n## Name and description\n\nThere are 2 different formats for the description fields in the KML placemarks. I personnally generate KML for use either in Google Earth (`gearth` format) or Google My Maps (`mymaps` format). They don't present the content of the fields the same way (nor support the same features). The default is the Google Earth format.\n\nBy default, the KML names are left empty.\n\n### Template\n\nIt is also possible to configure custom name and description formats by passing a path to a [Jinja2 template file](https://jinja.palletsprojects.com/en/3.0.x/templates/) with the `-t / --template` option (for the description) and the `-n / --name_template` option (for the name).\n\n#### Description\n\nThe description template must return a HTML fragment (a simple text wthout any markup will do though). \n\nThe 2 predefined templates can be used as a starting point. I have also added a sample that uses the photo description field from the Flickr API:\n\n- [`gearth`](https://github.com/gvellut/flickr2kml/blob/master/flickr2kml/template_gearth.html)\n- [`mymaps`](https://github.com/gvellut/flickr2kml/blob/master/flickr2kml/template_mymaps.html)\n- [Sample](https://github.com/gvellut/flickr2kml/blob/master/flickr2kml/sample/description_alternate.html)\n\n#### Name\n\nThe name template must return a text (HTML is not supported).\n\nA sample for the name is available here:\n\n- [Sample](https://github.com/gvellut/flickr2kml/blob/master/sample/name_datetaken.txt)\n\nIt simply outputs a formatted `date taken`. The date format specification is the one used by Python [from the datetime package](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes).\n\n#### Template arguments\n\nBesides fields obtained from the Flickr API (which change for each photo; See section below), it is also possible to pass arguments to the template, which will stay the same for every photo. The `-a / --template_arg` option can be used multiple times for multiple arguments.\n\nExample: \n\n```\n-a MYARG=value -a SIZE=350\n```\n\nThe `SIZE` argument, if not redefined on the command-line, is set to `500` by default i.e. equivalent to `-a SIZE=500`. The reason is that it is used by the predefined templates: There would be an error if not present. Custom templates are free not to use it though.\n\n#### Fields\n\nHere are the main fields obtained from the Flickr API and available to the templates:\n\n- `id`\n- `server`\n- `secret`\n- `originalsecret`\n- `originalformat`\n- `title`\n- `description`\n- `datetaken`: Date taken in ISO format (string) as returned by the API\n- `ownername`\n- `pathalias`\n- `views`: Number of views\n- `tags`\n- `latitude`\n- `longitude`\n- `url_sq`\n- `height_sq`\n- `width_sq`\n- `url_t`\n- `height_t`\n- `width_t`\n- `url_s`\n- `height_s`\n- `width_s`\n- `url_m`\n- `height_m`\n- `width_m`\n- `url_o`: URL of the original photo\n- `height_o`\n- `width_o`\n- `url_l`\n- `height_l`\n- `width_l`\n- `url_h`: URL of 1600px photo size. It is possibly not present depending on the \"Largest shared image size\" setting in the account (same for the image sizes below).\n- `height_h`\n- `width_h`\n- `url_k`\n- `height_k`\n- `width_k`\n- `url_3k`\n- `height_3k`\n- `width_3k`\n\nAdditional fields (computed by `flickr2kml`) are:\n- `page_url`: link to the photo page on the Flickr website\n- `lonlat`: Python tuple\n- `img_url`: same as `url_m`\n- `icon_url`: same as `url_sq`\n- `orientation`: either `landscape` or `portrait`\n- `datetaken_p`: Python datetime object obtained by parsing the `datetaken` field from the Flickr API. There is no timezone.\n\n## API permission\n\n- The API keys and secrets can be obtained by registering a non-commercial application with Flickr at https://www.flickr.com/services/api/misc.api_keys.html Since the API has limits on how many calls can be made per hour, I cannot share my own key.\n- A config file is optional and, if present, can contain values for the `api_key` and `api_secret` arguments. It should be a text file with the content like this:\n```\napi_key=\"\u003cFlickr API Key\u003e\"\napi_secret=\"\u003cFlickr API Secret\u003e\"\n```\n(the quotes should be present)\n- The default location depends on the OS (the one shown above is for my macOS machine) but can be shown with the `--help` switch. That location can be overriden with the `--config` option.\n- If there is no config file, the key and secret can be passed as options on the command line or as environment variables (`FLICKR_API_KEY` and `FLICKR_API_SECRET`).\n\n### Log in to Flickr and authorize the application\n\nThe first time the tool is run on the command-line, a token for accessing the API must be generated. It is pretty straightforward:\n- A web page in the default browser will open. \n- If not logged in to Flickr, a Flickr login screen will be presented in order to log in to Flickr. \n- Then a request to grant permission to the application is made: The permission is only given for the specific API key obtained when registering yourself.\n- Once pernission has been granted by the logged in user, a 9-digit code will be displayed: It needs to be copied and pasted on the command line after the prompt \"Verifier code:\".\n\nAfter that process, an access token will be cached inside an `oauth-tokens.sqlite` file stored on the same directory as the default location of the API key config file (which can vary depending on the OS ; See above).\n\nAs long as the token is cached, there will be no need no login again for subsequent runs (that is until the token expires).\n\nThe tool will run with the permission of the user that logged in. In order to switch user, the `oauth-tokens.sqlite` will need to be deleted.\n\n# Examples\n\n## Simple\n\n```\nflickr2kml -f https://www.flickr.com/photos/o_0/albums/72157716046011583 thiou2020.kml\n```\n\nIf the API key and secret come from a config file, there is no need to pass them as argument.\n\n## With templates\n\n```\nflickr2kml thiou2020.kml -f https://www.flickr.com/photos/o_0/albums/72157716046011583 -n mynametemplate.txt -t mydesctemplate.html -a SIZE=350 \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvellut%2Fflickr2kml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgvellut%2Fflickr2kml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvellut%2Fflickr2kml/lists"}