Make 'decode' an entry point in setup.cfg

This commit is contained in:
Jeff Epler 2021-12-16 16:23:39 -06:00
parent 6eba16a376
commit be0dff0807
No known key found for this signature in database
GPG key ID: D5BF15AB975AB4DE
3 changed files with 8 additions and 1 deletions

View file

@ -27,6 +27,7 @@ work with historical data, the epoch is arbitrarily assumed to run from 1970 to
Programs include:
* `wwvbgen`, the main commandline generator program
* `wwvbdecode`, the main commandline decoder program
* `wwvbtk`, visualize the simulated WWVB signal in real-time using Tkinter
* `dut1table`, print the full history of dut1 values, including estimated future values
* `updateiers`, download the latest dut1 data including prospective data from IERS and NIST

View file

@ -38,6 +38,7 @@ install_requires =
[options.entry_points]
console_scripts =
wwvbgen = wwvb.gen:main
wwvbdecode = wwvb.decode:main
dut1table = wwvb.dut1table:main
updateiers = wwvb.updateiers:main
gui_scripts =

View file

@ -76,7 +76,8 @@ def wwvbreceive() -> Generator[
value = yield None
if __name__ == "__main__": # pragma no cover
def main() -> None: # pragma no cover
"""Read symbols on stdin and print any successfully-decoded minutes"""
decoder = wwvbreceive()
next(decoder)
decoder.send(wwvb.AmplitudeModulation.MARK)
@ -88,3 +89,7 @@ if __name__ == "__main__": # pragma no cover
w = wwvb.WWVBMinute.from_timecode_am(decoded)
if w:
print(w)
if __name__ == "__main__": # pragma no cover
main()