adsb-tui 0.11.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. adsb_tui-0.11.0/.github/scripts/exe_entry.py +8 -0
  2. adsb_tui-0.11.0/.github/scripts/release_check.py +86 -0
  3. adsb_tui-0.11.0/.github/workflows/release.yml +153 -0
  4. adsb_tui-0.11.0/.gitignore +13 -0
  5. adsb_tui-0.11.0/LICENSE +121 -0
  6. adsb_tui-0.11.0/PKG-INFO +112 -0
  7. adsb_tui-0.11.0/README.md +100 -0
  8. adsb_tui-0.11.0/contrib/adsb-tui-kiosk.service +60 -0
  9. adsb_tui-0.11.0/contrib/tmux.md +75 -0
  10. adsb_tui-0.11.0/docs/configuration.md +158 -0
  11. adsb_tui-0.11.0/pyproject.toml +25 -0
  12. adsb_tui-0.11.0/src/adsbtui/__init__.py +3 -0
  13. adsb_tui-0.11.0/src/adsbtui/__main__.py +171 -0
  14. adsb_tui-0.11.0/src/adsbtui/alerts.py +189 -0
  15. adsb_tui-0.11.0/src/adsbtui/config.py +641 -0
  16. adsb_tui-0.11.0/src/adsbtui/config_write.py +210 -0
  17. adsb_tui-0.11.0/src/adsbtui/data/icao_ranges.csv +73 -0
  18. adsb_tui-0.11.0/src/adsbtui/dispatch.py +402 -0
  19. adsb_tui-0.11.0/src/adsbtui/enrich/__init__.py +55 -0
  20. adsb_tui-0.11.0/src/adsbtui/enrich/derived.py +329 -0
  21. adsb_tui-0.11.0/src/adsbtui/enrich/providers.py +332 -0
  22. adsb_tui-0.11.0/src/adsbtui/enrich/registry_update.py +736 -0
  23. adsb_tui-0.11.0/src/adsbtui/firstrun.py +175 -0
  24. adsb_tui-0.11.0/src/adsbtui/geo.py +148 -0
  25. adsb_tui-0.11.0/src/adsbtui/history.py +262 -0
  26. adsb_tui-0.11.0/src/adsbtui/logsetup.py +71 -0
  27. adsb_tui-0.11.0/src/adsbtui/model.py +116 -0
  28. adsb_tui-0.11.0/src/adsbtui/normalize.py +190 -0
  29. adsb_tui-0.11.0/src/adsbtui/output.py +616 -0
  30. adsb_tui-0.11.0/src/adsbtui/pipeline.py +397 -0
  31. adsb_tui-0.11.0/src/adsbtui/sources/__init__.py +125 -0
  32. adsb_tui-0.11.0/src/adsbtui/sources/demo.py +125 -0
  33. adsb_tui-0.11.0/src/adsbtui/sources/http.py +96 -0
  34. adsb_tui-0.11.0/src/adsbtui/sources/jsonfile.py +33 -0
  35. adsb_tui-0.11.0/src/adsbtui/sources/receiver.py +102 -0
  36. adsb_tui-0.11.0/src/adsbtui/textwidth.py +51 -0
  37. adsb_tui-0.11.0/src/adsbtui/tracker.py +80 -0
  38. adsb_tui-0.11.0/src/adsbtui/ui/__init__.py +0 -0
  39. adsb_tui-0.11.0/src/adsbtui/ui/app.py +464 -0
  40. adsb_tui-0.11.0/src/adsbtui/ui/bars.py +116 -0
  41. adsb_tui-0.11.0/src/adsbtui/ui/columns.py +563 -0
  42. adsb_tui-0.11.0/src/adsbtui/ui/controller.py +194 -0
  43. adsb_tui-0.11.0/src/adsbtui/ui/effects.py +30 -0
  44. adsb_tui-0.11.0/src/adsbtui/ui/frame.py +22 -0
  45. adsb_tui-0.11.0/src/adsbtui/ui/keys.py +50 -0
  46. adsb_tui-0.11.0/src/adsbtui/ui/mouse.py +100 -0
  47. adsb_tui-0.11.0/src/adsbtui/ui/radar.py +268 -0
  48. adsb_tui-0.11.0/src/adsbtui/ui/render.py +459 -0
  49. adsb_tui-0.11.0/src/adsbtui/ui/screen_stack.py +162 -0
  50. adsb_tui-0.11.0/src/adsbtui/ui/screens/__init__.py +15 -0
  51. adsb_tui-0.11.0/src/adsbtui/ui/screens/columns.py +248 -0
  52. adsb_tui-0.11.0/src/adsbtui/ui/screens/data.py +486 -0
  53. adsb_tui-0.11.0/src/adsbtui/ui/screens/detail.py +199 -0
  54. adsb_tui-0.11.0/src/adsbtui/ui/screens/filters.py +158 -0
  55. adsb_tui-0.11.0/src/adsbtui/ui/screens/help.py +154 -0
  56. adsb_tui-0.11.0/src/adsbtui/ui/screens/settings.py +574 -0
  57. adsb_tui-0.11.0/src/adsbtui/ui/screens/setup.py +606 -0
  58. adsb_tui-0.11.0/src/adsbtui/ui/screens/sort.py +174 -0
  59. adsb_tui-0.11.0/src/adsbtui/ui/screens/watchlist.py +290 -0
  60. adsb_tui-0.11.0/src/adsbtui/ui/sorting.py +137 -0
  61. adsb_tui-0.11.0/src/adsbtui/ui/theme.py +174 -0
  62. adsb_tui-0.11.0/src/adsbtui/ui/view.py +187 -0
  63. adsb_tui-0.11.0/src/adsbtui/ui/widgets.py +971 -0
  64. adsb_tui-0.11.0/src/adsbtui/units.py +88 -0
  65. adsb_tui-0.11.0/src/adsbtui/watchlist.py +166 -0
@@ -0,0 +1,8 @@
1
+ """PyInstaller entry point for the Windows release exe: runs the same main() as `adsbtui`."""
2
+
3
+ import sys
4
+
5
+ from adsbtui.__main__ import main
6
+
7
+ if __name__ == "__main__":
8
+ sys.exit(main())
@@ -0,0 +1,86 @@
1
+ """Release gate: is the version in the source a valid next ZeroVer release?
2
+
3
+ Used by .github/workflows/release.yml.
4
+ Checks that `__version__` and pyproject.toml agree, that the version is ZeroVer
5
+ (0.MINOR.PATCH, optionally rcN), and that it sorts above every existing v* tag. Whether the
6
+ tag or release already exists on GitHub is checked by the workflow itself.
7
+
8
+ Prints `version=...`, `tag=...` and `prerelease=true|false` for $GITHUB_OUTPUT.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import argparse
14
+ import re
15
+ import sys
16
+ import tomllib
17
+ from pathlib import Path
18
+
19
+ ZEROVER = re.compile(r"^0\.(0|[1-9]\d*)\.(0|[1-9]\d*)(rc([1-9]\d*))?$")
20
+
21
+
22
+ class ReleaseError(Exception):
23
+ pass
24
+
25
+
26
+ def sort_key(version: str) -> tuple[int, int, int, int, int]:
27
+ """Order versions as PEP 440 does: 0.10.0rc1 < 0.10.0rc2 < 0.10.0."""
28
+ match = ZEROVER.match(version)
29
+ if match is None:
30
+ raise ReleaseError(
31
+ f"{version!r} is not a ZeroVer version (0.MINOR.PATCH or 0.MINOR.PATCHrcN)"
32
+ )
33
+ minor, patch = int(match.group(1)), int(match.group(2))
34
+ if match.group(4) is None:
35
+ return (0, minor, patch, 1, 0)
36
+ return (0, minor, patch, 0, int(match.group(4)))
37
+
38
+
39
+ def source_version(init_path: Path) -> str:
40
+ found = re.search(r'^__version__ = "([^"]+)"', init_path.read_text("utf-8"), re.MULTILINE)
41
+ if found is None:
42
+ raise ReleaseError(f"no __version__ in {init_path}")
43
+ return found.group(1)
44
+
45
+
46
+ def check(init_version: str, pyproject_version: str, existing_tags: list[str]) -> str:
47
+ """Return the tag to create, or raise ReleaseError."""
48
+ if init_version != pyproject_version:
49
+ raise ReleaseError(
50
+ f"__version__ {init_version!r} and pyproject.toml {pyproject_version!r} differ"
51
+ )
52
+ new = sort_key(init_version)
53
+ tag = f"v{init_version}"
54
+ for existing in existing_tags:
55
+ name = existing.strip()
56
+ if not name:
57
+ continue
58
+ if name == tag:
59
+ raise ReleaseError(f"tag {tag} already exists; a published release is never replaced")
60
+ if name.startswith("v") and ZEROVER.match(name[1:]) and sort_key(name[1:]) >= new:
61
+ raise ReleaseError(f"{tag} does not sort above the existing tag {name}")
62
+ return tag
63
+
64
+
65
+ def main(argv: list[str] | None = None) -> int:
66
+ parser = argparse.ArgumentParser()
67
+ parser.add_argument("--init", type=Path, default=Path("src/adsbtui/__init__.py"))
68
+ parser.add_argument("--pyproject", type=Path, default=Path("pyproject.toml"))
69
+ parser.add_argument("--tags", default="", help="existing tags, one per line")
70
+ args = parser.parse_args(argv)
71
+ try:
72
+ with open(args.pyproject, "rb") as handle:
73
+ declared = tomllib.load(handle)["project"]["version"]
74
+ version = source_version(args.init)
75
+ tag = check(version, declared, args.tags.splitlines())
76
+ except ReleaseError as exc:
77
+ print(f"release check failed: {exc}", file=sys.stderr)
78
+ return 1
79
+ print(f"version={version}")
80
+ print(f"tag={tag}")
81
+ print(f"prerelease={'true' if 'rc' in version else 'false'}")
82
+ return 0
83
+
84
+
85
+ if __name__ == "__main__":
86
+ sys.exit(main())
@@ -0,0 +1,153 @@
1
+ name: Release
2
+
3
+ # Manual, from main only. Reads the version from the source (ZeroVer: 0.MINOR.PATCH, or
4
+ # 0.MINOR.PATCHrcN for a pre-release), checks it, builds, and publishes a GitHub Release
5
+ # tagged v<version>. It fails rather than replace: an existing tag or release stops it, and
6
+ # nothing here deletes or overwrites a published release.
7
+ on:
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: write
12
+
13
+ concurrency:
14
+ group: release
15
+ cancel-in-progress: false
16
+
17
+ jobs:
18
+ check:
19
+ # Fails fast, before anything is built: bad version, existing tag, existing release.
20
+ if: github.ref == 'refs/heads/main'
21
+ runs-on: ubuntu-latest
22
+ env:
23
+ GH_TOKEN: ${{ github.token }}
24
+ outputs:
25
+ version: ${{ steps.version.outputs.version }}
26
+ tag: ${{ steps.version.outputs.tag }}
27
+ prerelease: ${{ steps.version.outputs.prerelease }}
28
+ steps:
29
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+ with:
31
+ fetch-depth: 0
32
+
33
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
34
+ with:
35
+ python-version: "3.12"
36
+
37
+ - name: Check the version
38
+ id: version
39
+ run: |
40
+ python .github/scripts/release_check.py --tags "$(git tag --list 'v*')" | tee -a "$GITHUB_OUTPUT"
41
+
42
+ - name: Refuse an existing release
43
+ env:
44
+ TAG: ${{ steps.version.outputs.tag }}
45
+ run: |
46
+ if gh release view "$TAG" >/dev/null 2>&1; then
47
+ echo "release $TAG already exists; refusing to replace it" >&2
48
+ exit 1
49
+ fi
50
+
51
+ build-windows:
52
+ # A PyInstaller one-file exe (unsigned). If this fails, release never runs and nothing is published.
53
+ needs: check
54
+ runs-on: windows-latest
55
+ env:
56
+ VERSION: ${{ needs.check.outputs.version }}
57
+ steps:
58
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
59
+
60
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
61
+ with:
62
+ python-version: "3.12"
63
+
64
+ - name: Build the exe
65
+ shell: pwsh
66
+ run: |
67
+ python -m pip install ".[windows]" pyinstaller
68
+ pyinstaller --onefile --console --name adsb-tui --collect-submodules adsbtui --collect-data adsbtui .github/scripts/exe_entry.py
69
+
70
+ - name: The exe runs
71
+ shell: pwsh
72
+ run: |
73
+ $feed = Join-Path $env:RUNNER_TEMP "feed.json"
74
+ Set-Content -Path $feed -Value '{"now": 1, "aircraft": []}'
75
+ .\dist\adsb-tui.exe --check --url $feed --lat 37.7749 --lon -122.4194
76
+ if ($LASTEXITCODE -ne 0) { throw "--check exited $LASTEXITCODE" }
77
+ $got = (.\dist\adsb-tui.exe --version) -join ""
78
+ if ($got -ne "adsbtui $env:VERSION") { throw "version mismatch: '$got'" }
79
+
80
+ - name: Name the exe and write its checksum
81
+ shell: pwsh
82
+ run: |
83
+ $name = "adsb-tui-$env:VERSION-windows-x64.exe"
84
+ New-Item -ItemType Directory -Path out | Out-Null
85
+ Copy-Item dist\adsb-tui.exe "out\$name"
86
+ $hash = (Get-FileHash "out\$name" -Algorithm SHA256).Hash.ToLower()
87
+ [System.IO.File]::WriteAllText("$PWD\out\$name.sha256", "$hash $name`n")
88
+
89
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
90
+ with:
91
+ name: windows-exe
92
+ path: out/*
93
+ if-no-files-found: error
94
+
95
+ release:
96
+ needs: [check, build-windows]
97
+ if: github.ref == 'refs/heads/main'
98
+ runs-on: ubuntu-latest
99
+ env:
100
+ GH_TOKEN: ${{ github.token }}
101
+ steps:
102
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
103
+
104
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
105
+ with:
106
+ python-version: "3.12"
107
+
108
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
109
+ with:
110
+ name: windows-exe
111
+ path: windows
112
+
113
+ - name: Build
114
+ run: |
115
+ python -m pip install build
116
+ python -m build
117
+
118
+ - name: The built wheel runs from a clean environment
119
+ # Installs only the wheel into a fresh venv, away from the checkout, and runs the
120
+ # health check on an empty feed: catches a package that tests only because of the source tree.
121
+ run: |
122
+ python -m venv "$RUNNER_TEMP/smoke"
123
+ "$RUNNER_TEMP/smoke/bin/python" -m pip install dist/*.whl
124
+ cd "$RUNNER_TEMP"
125
+ echo '{"now": 1, "aircraft": []}' > feed.json
126
+ "$RUNNER_TEMP/smoke/bin/adsbtui" --check --url "$RUNNER_TEMP/feed.json" --lat 37.7749 --lon -122.4194
127
+ test "$("$RUNNER_TEMP/smoke/bin/adsbtui" --version)" = "adsbtui ${{ needs.check.outputs.version }}"
128
+
129
+ - name: The built version matches the tag
130
+ env:
131
+ VERSION: ${{ needs.check.outputs.version }}
132
+ run: |
133
+ python - <<'PY'
134
+ import glob, os, zipfile
135
+ (wheel,) = glob.glob("dist/*.whl")
136
+ with zipfile.ZipFile(wheel) as z:
137
+ name = next(n for n in z.namelist() if n.endswith(".dist-info/METADATA"))
138
+ meta = z.read(name).decode()
139
+ built = next(l.split(": ", 1)[1] for l in meta.splitlines() if l.startswith("Version: "))
140
+ assert built == os.environ["VERSION"], (built, os.environ["VERSION"])
141
+ print("wheel version", built)
142
+ PY
143
+
144
+ - name: Publish
145
+ # No --clobber, and the tag was checked above: gh creates the tag at this commit
146
+ # and fails if anything raced us.
147
+ env:
148
+ TAG: ${{ needs.check.outputs.tag }}
149
+ PRERELEASE: ${{ needs.check.outputs.prerelease }}
150
+ run: |
151
+ flags=""
152
+ if [ "$PRERELEASE" = "true" ]; then flags="--prerelease"; fi
153
+ gh release create "$TAG" dist/* windows/* --target "$GITHUB_SHA" --title "$TAG" --generate-notes $flags
@@ -0,0 +1,13 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ .venv/
5
+ venv/
6
+ build/
7
+ dist/
8
+ .env
9
+ *.log
10
+ *.sqlite
11
+ *.sqlite-journal
12
+ config.toml
13
+ MASTER.csv
@@ -0,0 +1,121 @@
1
+ Creative Commons Legal Code
2
+
3
+ CC0 1.0 Universal
4
+
5
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
+ HEREUNDER.
13
+
14
+ Statement of Purpose
15
+
16
+ The laws of most jurisdictions throughout the world automatically confer
17
+ exclusive Copyright and Related Rights (defined below) upon the creator
18
+ and subsequent owner(s) (each and all, an "owner") of an original work of
19
+ authorship and/or a database (each, a "Work").
20
+
21
+ Certain owners wish to permanently relinquish those rights to a Work for
22
+ the purpose of contributing to a commons of creative, cultural and
23
+ scientific works ("Commons") that the public can reliably and without fear
24
+ of later claims of infringement build upon, modify, incorporate in other
25
+ works, reuse and redistribute as freely as possible in any form whatsoever
26
+ and for any purposes, including without limitation commercial purposes.
27
+ These owners may contribute to the Commons to promote the ideal of a free
28
+ culture and the further production of creative, cultural and scientific
29
+ works, or to gain reputation or greater distribution for their Work in
30
+ part through the use and efforts of others.
31
+
32
+ For these and/or other purposes and motivations, and without any
33
+ expectation of additional consideration or compensation, the person
34
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
+ is an owner of Copyright and Related Rights in the Work, voluntarily
36
+ elects to apply CC0 to the Work and publicly distribute the Work under its
37
+ terms, with knowledge of his or her Copyright and Related Rights in the
38
+ Work and the meaning and intended legal effect of CC0 on those rights.
39
+
40
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
41
+ protected by copyright and related or neighboring rights ("Copyright and
42
+ Related Rights"). Copyright and Related Rights include, but are not
43
+ limited to, the following:
44
+
45
+ i. the right to reproduce, adapt, distribute, perform, display,
46
+ communicate, and translate a Work;
47
+ ii. moral rights retained by the original author(s) and/or performer(s);
48
+ iii. publicity and privacy rights pertaining to a person's image or
49
+ likeness depicted in a Work;
50
+ iv. rights protecting against unfair competition in regards to a Work,
51
+ subject to the limitations in paragraph 4(a), below;
52
+ v. rights protecting the extraction, dissemination, use and reuse of data
53
+ in a Work;
54
+ vi. database rights (such as those arising under Directive 96/9/EC of the
55
+ European Parliament and of the Council of 11 March 1996 on the legal
56
+ protection of databases, and under any national implementation
57
+ thereof, including any amended or successor version of such
58
+ directive); and
59
+ vii. other similar, equivalent or corresponding rights throughout the
60
+ world based on applicable law or treaty, and any national
61
+ implementations thereof.
62
+
63
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
64
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
65
+ irrevocably and unconditionally waives, abandons, and surrenders all of
66
+ Affirmer's Copyright and Related Rights and associated claims and causes
67
+ of action, whether now known or unknown (including existing as well as
68
+ future claims and causes of action), in the Work (i) in all territories
69
+ worldwide, (ii) for the maximum duration provided by applicable law or
70
+ treaty (including future time extensions), (iii) in any current or future
71
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
72
+ including without limitation commercial, advertising or promotional
73
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
+ member of the public at large and to the detriment of Affirmer's heirs and
75
+ successors, fully intending that such Waiver shall not be subject to
76
+ revocation, rescission, cancellation, termination, or any other legal or
77
+ equitable action to disrupt the quiet enjoyment of the Work by the public
78
+ as contemplated by Affirmer's express Statement of Purpose.
79
+
80
+ 3. Public License Fallback. Should any part of the Waiver for any reason
81
+ be judged legally invalid or ineffective under applicable law, then the
82
+ Waiver shall be preserved to the maximum extent permitted taking into
83
+ account Affirmer's express Statement of Purpose. In addition, to the
84
+ extent the Waiver is so judged Affirmer hereby grants to each affected
85
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
86
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
87
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
+ maximum duration provided by applicable law or treaty (including future
89
+ time extensions), (iii) in any current or future medium and for any number
90
+ of copies, and (iv) for any purpose whatsoever, including without
91
+ limitation commercial, advertising or promotional purposes (the
92
+ "License"). The License shall be deemed effective as of the date CC0 was
93
+ applied by Affirmer to the Work. Should any part of the License for any
94
+ reason be judged legally invalid or ineffective under applicable law, such
95
+ partial invalidity or ineffectiveness shall not invalidate the remainder
96
+ of the License, and in such case Affirmer hereby affirms that he or she
97
+ will not (i) exercise any of his or her remaining Copyright and Related
98
+ Rights in the Work or (ii) assert any associated claims and causes of
99
+ action with respect to the Work, in either case contrary to Affirmer's
100
+ express Statement of Purpose.
101
+
102
+ 4. Limitations and Disclaimers.
103
+
104
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
+ surrendered, licensed or otherwise affected by this document.
106
+ b. Affirmer offers the Work as-is and makes no representations or
107
+ warranties of any kind concerning the Work, express, implied,
108
+ statutory or otherwise, including without limitation warranties of
109
+ title, merchantability, fitness for a particular purpose, non
110
+ infringement, or the absence of latent or other defects, accuracy, or
111
+ the present or absence of errors, whether or not discoverable, all to
112
+ the greatest extent permissible under applicable law.
113
+ c. Affirmer disclaims responsibility for clearing rights of other persons
114
+ that may apply to the Work or any use thereof, including without
115
+ limitation any person's Copyright and Related Rights in the Work.
116
+ Further, Affirmer disclaims responsibility for obtaining any necessary
117
+ consents, permissions or other rights required for any use of the
118
+ Work.
119
+ d. Affirmer understands and acknowledges that Creative Commons is not a
120
+ party to this document and has no duty or obligation with respect to
121
+ this CC0 or use of the Work.
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.5
2
+ Name: adsb-tui
3
+ Version: 0.11.0
4
+ Summary: A curses TUI for tracking nearby aircraft from a dump1090/readsb ADS-B feed
5
+ Author: WPTK
6
+ License-Expression: CC0-1.0
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.11
9
+ Provides-Extra: windows
10
+ Requires-Dist: windows-curses>=2.3; extra == 'windows'
11
+ Description-Content-Type: text/markdown
12
+
13
+ # ADSB-TUI
14
+
15
+ A terminal UI that lists aircraft near you from the `aircraft.json` feed of your own `readsb` or `dump1090-fa` receiver. It renders a sortable table and a radar scope with curses.
16
+
17
+ ## Prerequisites
18
+
19
+ - Python 3.11+
20
+ - A `readsb` or `dump1090-fa` receiver whose `aircraft.json` you can reach by URL or file path (or use `--demo`, below)
21
+ - Windows only: `windows-curses`, installed by the `windows` extra
22
+
23
+ ![adsbtui showing live traffic around SFO: the aircraft table with altitude-coloured rows and the radar scope](docs/screenshots/main.png)
24
+
25
+ ## Quickstart
26
+
27
+ 1. Install:
28
+
29
+ ```bash
30
+ git clone https://github.com/WPTK/ADSB-TUI.git
31
+ cd ADSB-TUI
32
+ pip install -e . # Windows: pip install -e ".[windows]"
33
+ ```
34
+
35
+ **Raspberry Pi OS** blocks plain `pip install`. Use pipx:
36
+
37
+ ```bash
38
+ sudo apt install pipx && pipx ensurepath # then open a new shell
39
+ pipx install --editable .
40
+ ```
41
+
42
+ To update, `git pull` and restart adsbtui. A pipx install made without `--editable` won't pick
43
+ up the pull; fix it once with `pipx install --force --editable .`.
44
+
45
+ **Windows without Python:** each [GitHub Release](https://github.com/WPTK/ADSB-TUI/releases)
46
+ includes `adsb-tui-<version>-windows-x64.exe`. Download it and run it from Windows Terminal
47
+ (it is a terminal program; double-clicking opens a window that closes on exit). The exe is
48
+ unsigned, so SmartScreen may warn "Windows protected your PC": choose More info, then Run anyway.
49
+ To verify the download against the `.sha256` file from the same release:
50
+
51
+ ```powershell
52
+ (Get-FileHash .dsb-tui-<version>-windows-x64.exe -Algorithm SHA256).Hash.ToLower()
53
+ Get-Content .dsb-tui-<version>-windows-x64.exe.sha256
54
+ ```
55
+
56
+ The two hashes must match. Then run `.dsb-tui-<version>-windows-x64.exe` in place of `adsbtui` below.
57
+
58
+ 2. Start the app:
59
+
60
+ ```bash
61
+ adsbtui
62
+ ```
63
+
64
+ The first run starts a setup wizard that finds your receiver and home location and writes
65
+ `~/.config/adsbtui/config.toml`. To skip it:
66
+
67
+ ```bash
68
+ adsbtui --url 192.0.2.10 --lat 37.7749 --lon -122.4194
69
+ ```
70
+
71
+ `--url` takes a receiver address (the usual `aircraft.json` paths are probed), an exact URL, or
72
+ a local file such as `/run/readsb/aircraft.json`.
73
+
74
+ No receiver yet? `adsbtui --demo` shows scripted traffic around your home position (or San
75
+ Francisco if none is set). It needs no config and no network, never sends an alert, and writes
76
+ nothing to disk. The status line says DEMO.
77
+
78
+ ## Keys
79
+
80
+ | Key | Action |
81
+ |---|---|
82
+ | `F1` / `?` | Help |
83
+ | `F2` / `,` | Settings (every option, saved to `config.toml`) |
84
+ | `F8` / `D` | Aircraft registry: status and manual update |
85
+ | `Enter` | Details for the selected aircraft |
86
+ | `Up` `Down` / `k` `j`, `PgUp` `PgDn`, `Home` `End` | Move the selection |
87
+ | `d` | Details (same as `Enter`) |
88
+ | `s` / `S` | Sort screen / reverse the sort |
89
+ | `f` or `/` / `c` / `w` | Filter and search / columns / watchlist |
90
+ | `r` / `u` / `p` | Toggle radar / cycle units / pause |
91
+ | `+` / `-` | Grow / shrink the radius |
92
+ | `q` / `F10` | Quit |
93
+
94
+ `F3`–`F7` open filters, sort, columns and watchlist as in the key bar. Help (`F1`) lists every key and scrolls.
95
+
96
+
97
+ The mouse works too: click a column header to sort by it (click again to reverse), click a row or a scope arrow to select it, and scroll the wheel to move the cursor. Hovering an arrow on the scope highlights its row and shows a tooltip; hover needs a terminal that reports mouse motion (most xterm-compatible ones) and is not available on every Windows console.
98
+
99
+ ![The detail pane for one aircraft, with closest approach and squawk](docs/screenshots/detail.png)
100
+
101
+ ## Configuration
102
+
103
+ Press `F2` in the app to edit every option. The config file is `$ADSBTUI_CONFIG`, else
104
+ `$XDG_CONFIG_HOME/adsbtui/config.toml` (`~/.config/adsbtui/config.toml` by default); the current
105
+ directory is never searched. Flags override `ADSBTUI_<SECTION>_<KEY>` environment
106
+ variables, which override `config.toml`. The full key list, column meanings and the watchlist
107
+ format are in [docs/configuration.md](docs/configuration.md).
108
+
109
+ ## License
110
+
111
+ [CC0 1.0](LICENSE): public domain, no warranty. Downloaded registry data has its own terms,
112
+ shown in the app: the FAA extract is public domain, tar1090-db is non-commercial use only.
@@ -0,0 +1,100 @@
1
+ # ADSB-TUI
2
+
3
+ A terminal UI that lists aircraft near you from the `aircraft.json` feed of your own `readsb` or `dump1090-fa` receiver. It renders a sortable table and a radar scope with curses.
4
+
5
+ ## Prerequisites
6
+
7
+ - Python 3.11+
8
+ - A `readsb` or `dump1090-fa` receiver whose `aircraft.json` you can reach by URL or file path (or use `--demo`, below)
9
+ - Windows only: `windows-curses`, installed by the `windows` extra
10
+
11
+ ![adsbtui showing live traffic around SFO: the aircraft table with altitude-coloured rows and the radar scope](docs/screenshots/main.png)
12
+
13
+ ## Quickstart
14
+
15
+ 1. Install:
16
+
17
+ ```bash
18
+ git clone https://github.com/WPTK/ADSB-TUI.git
19
+ cd ADSB-TUI
20
+ pip install -e . # Windows: pip install -e ".[windows]"
21
+ ```
22
+
23
+ **Raspberry Pi OS** blocks plain `pip install`. Use pipx:
24
+
25
+ ```bash
26
+ sudo apt install pipx && pipx ensurepath # then open a new shell
27
+ pipx install --editable .
28
+ ```
29
+
30
+ To update, `git pull` and restart adsbtui. A pipx install made without `--editable` won't pick
31
+ up the pull; fix it once with `pipx install --force --editable .`.
32
+
33
+ **Windows without Python:** each [GitHub Release](https://github.com/WPTK/ADSB-TUI/releases)
34
+ includes `adsb-tui-<version>-windows-x64.exe`. Download it and run it from Windows Terminal
35
+ (it is a terminal program; double-clicking opens a window that closes on exit). The exe is
36
+ unsigned, so SmartScreen may warn "Windows protected your PC": choose More info, then Run anyway.
37
+ To verify the download against the `.sha256` file from the same release:
38
+
39
+ ```powershell
40
+ (Get-FileHash .dsb-tui-<version>-windows-x64.exe -Algorithm SHA256).Hash.ToLower()
41
+ Get-Content .dsb-tui-<version>-windows-x64.exe.sha256
42
+ ```
43
+
44
+ The two hashes must match. Then run `.dsb-tui-<version>-windows-x64.exe` in place of `adsbtui` below.
45
+
46
+ 2. Start the app:
47
+
48
+ ```bash
49
+ adsbtui
50
+ ```
51
+
52
+ The first run starts a setup wizard that finds your receiver and home location and writes
53
+ `~/.config/adsbtui/config.toml`. To skip it:
54
+
55
+ ```bash
56
+ adsbtui --url 192.0.2.10 --lat 37.7749 --lon -122.4194
57
+ ```
58
+
59
+ `--url` takes a receiver address (the usual `aircraft.json` paths are probed), an exact URL, or
60
+ a local file such as `/run/readsb/aircraft.json`.
61
+
62
+ No receiver yet? `adsbtui --demo` shows scripted traffic around your home position (or San
63
+ Francisco if none is set). It needs no config and no network, never sends an alert, and writes
64
+ nothing to disk. The status line says DEMO.
65
+
66
+ ## Keys
67
+
68
+ | Key | Action |
69
+ |---|---|
70
+ | `F1` / `?` | Help |
71
+ | `F2` / `,` | Settings (every option, saved to `config.toml`) |
72
+ | `F8` / `D` | Aircraft registry: status and manual update |
73
+ | `Enter` | Details for the selected aircraft |
74
+ | `Up` `Down` / `k` `j`, `PgUp` `PgDn`, `Home` `End` | Move the selection |
75
+ | `d` | Details (same as `Enter`) |
76
+ | `s` / `S` | Sort screen / reverse the sort |
77
+ | `f` or `/` / `c` / `w` | Filter and search / columns / watchlist |
78
+ | `r` / `u` / `p` | Toggle radar / cycle units / pause |
79
+ | `+` / `-` | Grow / shrink the radius |
80
+ | `q` / `F10` | Quit |
81
+
82
+ `F3`–`F7` open filters, sort, columns and watchlist as in the key bar. Help (`F1`) lists every key and scrolls.
83
+
84
+
85
+ The mouse works too: click a column header to sort by it (click again to reverse), click a row or a scope arrow to select it, and scroll the wheel to move the cursor. Hovering an arrow on the scope highlights its row and shows a tooltip; hover needs a terminal that reports mouse motion (most xterm-compatible ones) and is not available on every Windows console.
86
+
87
+ ![The detail pane for one aircraft, with closest approach and squawk](docs/screenshots/detail.png)
88
+
89
+ ## Configuration
90
+
91
+ Press `F2` in the app to edit every option. The config file is `$ADSBTUI_CONFIG`, else
92
+ `$XDG_CONFIG_HOME/adsbtui/config.toml` (`~/.config/adsbtui/config.toml` by default); the current
93
+ directory is never searched. Flags override `ADSBTUI_<SECTION>_<KEY>` environment
94
+ variables, which override `config.toml`. The full key list, column meanings and the watchlist
95
+ format are in [docs/configuration.md](docs/configuration.md).
96
+
97
+ ## License
98
+
99
+ [CC0 1.0](LICENSE): public domain, no warranty. Downloaded registry data has its own terms,
100
+ shown in the app: the FAA extract is public domain, tar1090-db is non-commercial use only.
@@ -0,0 +1,60 @@
1
+ # adsb-tui-kiosk.service
2
+ #
3
+ # Runs adsbtui full-screen on a physical console (tty1), so a dedicated Raspberry Pi /
4
+ # small-form-factor box boots straight into the aircraft table with no login prompt, no
5
+ # desktop environment, and no SSH session required.
6
+ #
7
+ # Install adsbtui for the service user first, so ExecStart below exists:
8
+ # sudo -u adsbtui pipx install /path/to/ADSB-TUI # puts it in /home/adsbtui/.local/bin
9
+ #
10
+ # Install:
11
+ # sudo useradd --system --create-home --shell /usr/sbin/nologin adsbtui # if it doesn't exist
12
+ # sudo mkdir -p /home/adsbtui/.config/adsbtui
13
+ # sudo cp /path/to/your/config.toml /home/adsbtui/.config/adsbtui/config.toml
14
+ # sudo chown -R adsbtui:adsbtui /home/adsbtui/.config
15
+ # sudo cp contrib/adsb-tui-kiosk.service /etc/systemd/system/
16
+ # sudo systemctl disable --now getty@tty1.service # free up tty1 first
17
+ # sudo systemctl daemon-reload
18
+ # sudo systemctl enable --now adsb-tui-kiosk.service
19
+ #
20
+ # Watch it: sudo journalctl -u adsb-tui-kiosk.service -f
21
+ # Get tty1 back later: sudo systemctl disable --now adsb-tui-kiosk.service && \
22
+ # sudo systemctl enable --now getty@tty1.service
23
+
24
+ [Unit]
25
+ Description=ADSB-TUI kiosk (full-screen aircraft tracker on tty1)
26
+ After=network-online.target getty@tty1.service
27
+ Wants=network-online.target
28
+ Conflicts=getty@tty1.service
29
+
30
+ [Service]
31
+ Type=simple
32
+ User=adsbtui
33
+ Group=adsbtui
34
+ WorkingDirectory=/home/adsbtui
35
+
36
+ # adsbtui looks for ~/.config/adsbtui/config.toml by default (see find_config_path() in
37
+ # src/adsbtui/config.py); ADSBTUI_CONFIG overrides that, and any ADSBTUI_<SECTION>_<KEY>
38
+ # variable overrides an individual TOML key without editing the file. Uncomment/adjust as
39
+ # needed rather than baking secrets or hosts into this unit file directly.
40
+ # Environment=ADSBTUI_CONFIG=/home/adsbtui/.config/adsbtui/config.toml
41
+ # Environment=ADSBTUI_SOURCE_URL=http://192.0.2.10/skyaware/data/aircraft.json
42
+ Environment=TERM=linux
43
+
44
+ ExecStart=/home/adsbtui/.local/bin/adsbtui
45
+
46
+ # Bind stdio directly to the physical console instead of the service manager's own
47
+ # pty/journal plumbing, and take ownership of the console so no getty can race it.
48
+ StandardInput=tty
49
+ StandardOutput=tty
50
+ StandardError=journal
51
+ TTYPath=/dev/tty1
52
+ TTYReset=yes
53
+ TTYVHangup=yes
54
+ TTYVTDisallocate=yes
55
+
56
+ Restart=on-failure
57
+ RestartSec=5
58
+
59
+ [Install]
60
+ WantedBy=multi-user.target