{"id":29279469,"url":"https://github.com/frapanico/flap-tracker","last_synced_at":"2026-04-18T11:04:58.524Z","repository":{"id":302087623,"uuid":"1011164761","full_name":"frapanico/flap-tracker","owner":"frapanico","description":"A lightweight Python script that interfaces with the OpenSky Network API to retrieve and display real-time information about the closest aircraft to a specified location, including its callsign, distance, altitude, and speed.","archived":false,"fork":false,"pushed_at":"2025-06-30T14:19:41.000Z","size":18,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-30T14:29:40.911Z","etag":null,"topics":["aircraft","geolocation","macos","opensky","python","swiftbar"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frapanico.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-06-30T11:59:04.000Z","updated_at":"2025-06-30T14:19:45.000Z","dependencies_parsed_at":"2025-06-30T14:32:04.492Z","dependency_job_id":"761c2839-28ea-4c7a-abb2-b92d8f2a885a","html_url":"https://github.com/frapanico/flap-tracker","commit_stats":null,"previous_names":["frapanico/flap-tracker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/frapanico/flap-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frapanico%2Fflap-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frapanico%2Fflap-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frapanico%2Fflap-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frapanico%2Fflap-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frapanico","download_url":"https://codeload.github.com/frapanico/flap-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frapanico%2Fflap-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31966218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["aircraft","geolocation","macos","opensky","python","swiftbar"],"created_at":"2025-07-05T14:00:55.290Z","updated_at":"2026-04-18T11:04:58.513Z","avatar_url":"https://github.com/frapanico.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FLAP – Flight Location And Proximity (v0.1.0-alpha)\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/09642846-f054-4c46-a0a3-b563a2289ee1\" alt=\"FLAP – Flight Location and Proximity\" /\u003e\n  \u003cbr/\u003e\n  \u003cem\u003e\u003c/em\u003e\n\u003c/p\u003e\n\nA lightweight Python script that connects to the [OpenSky Network](https://opensky-network.org/) API to retrieve and display real-time information about the closest aircraft to a specified location (Rome, Italy by default), including its callsign, distance, altitude, and speed. This script is designed to be used with [SwiftBar](https://github.com/swiftbar/SwiftBar) to display real-time information in the Mac menu bar. However, it can also be run from the terminal if needed.\n\n\n## Example output\nFor the example output below, the line with the three dashes `\"---\"` has been removed (see the **Using with SwiftBar** section,  the script is designed to work with SwiftBar, which requires this formatting). However, if you want to run it from the terminal instead, you can simply remove the `\"---\"` line, and the output will look like this:\n\n```python\n✈️ AEE123 5.6 km\n12:45:17 Alt: 11250 m | Vel: 250 m/s\n```\nThe label `Vel` refers to speed, as the interface was originally designed in Italian.\n\n## Requirements\n- Python 3.7+\n- Python packages:\n  - `requests`\n  - `geopy`\n\n## Authentication \nThis script uses client credentials (OAuth2) to authenticate with OpenSky. To obtain your own `clientId` and `clientSecret`:\n1. Create a free account at https://opensky-network.org.\n2. Once logged in, go to your user dashboard and create an API application.\n3. Download the `credentials.json` file provided.\n4. Inside that file, you'll find your personal `clientId` and `clientSecret`. Replace the placeholders `your-client-id` and `your-client-secret` on lines 9 and 10 of the script with your own credentials.\n\n## Using with SwiftBar\nSwiftBar lets you run scripts and display their output right in your Mac’s menu bar. You can integrate this Python script to show the nearest flight info live.\nThe script is already named `nearest_flight.1m.py` to follow SwiftBar’s naming convention, since it was designed for use with SwiftBar. The `1m` in the filename means SwiftBar will refresh the output every minute. Adjust as you prefer (5m, 30s, etc.). This way, you get real-time nearest flight info in your Mac menu bar, refreshing automatically.\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"591\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/cbf6a702-29ad-4ee9-8201-659803902bb3\" /\u003e\n  \u003cbr/\u003e\n  \u003cem\u003eDisplay of the script’s output in the macOS menu bar, as rendered by SwiftBar.\u003c/em\u003e\n\u003c/p\u003e\n\nMake sure your script is executable running:\n```terminal\nchmod +x nearest_flight.1m.py\n```\nSwiftBar expects the first line of output to be the menu bar text, followed by menu items separated by lines with `\"---\"`. These separators are already included by default in the script. It may print:\n```python\n✈️ AEE123 5.6 km\n---\n12:45:17 Alt: 11250 m | Vel: 250 m/s\n```\nAt this point, copy the script into your SwiftBar plugins folder, usually located at `~/Documents/SwiftBarPlugins` but this path can vary depending on your SwiftBar installation or macOS version. You can check or change the plugins directory in SwiftBar’s preferences.\n\n## Command Line Usage\nYou can also run the script from your terminal:\n```terminal\npython nearest_flight.1m.py\n```\n\n## Known Limitations\nThis script relies on the OpenSky Network API, which has some constraints:\n- **Token Expiry:** The OAuth token expires after a short period (usually 1 hour). After that, you'll need to request a new one.\n- **Rate Limits:** OpenSky enforces request limits, especially for non-commercial users. If you exceed the limit, you may receive empty data or errors.\n- **Limited Uptime:** The OpenSky API may not provide full availability or complete data throughout the day. This is normal behavior for free-tier access.\n\nIf the script works for a while and then stops, it's most likely due to one of these limitations. Feel free to share issues, suggestions, or improvements. Your feedback is highly appreciated!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrapanico%2Fflap-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrapanico%2Fflap-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrapanico%2Fflap-tracker/lists"}