Skip to content

Commit 47e82d3

Browse files
committed
final v6
1 parent 43de2c6 commit 47e82d3

File tree

8 files changed

+65
-57
lines changed

8 files changed

+65
-57
lines changed

.github/workflows/debian.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
3131
- name: Build Debian/Apt bdist_deb
3232
run: |
33-
export REPO_NAME=$(echo ${github.repository} | awk -F"/" '{print $2}')
33+
export REPO_NAME=$(echo ${{ github.repository }} | awk -F"/" '{print $2}')
3434
python3 setup.py --command-packages=stdeb.command bdist_deb
3535
ls -al deb_dist/
3636
cp deb_dist/python3-${REPO_NAME}_*_all.deb deb_dist/python3-${REPO_NAME}_latest_all.deb

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.rst

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
aprscot - APRS Cursor-on-Target Gateway.
22
****************************************
33

4-
IF YOU HAVE AN URGENT OPERATIONAL NEED: Email ops@undef.net or call/sms +1-415-598-8226
5-
64
.. image:: https://raw.githubusercontent.com/ampledata/aprscot/main/docs/screenshot_1637083240_16797-50p.png
7-
:alt: Screenshot of APRS PLI in ATAK..
5+
:alt: Screenshot of APRS PLI in ATAK.
86
:target: https://raw.githubusercontent.com/ampledata/aprscot/main/docs/screenshot_1637083240_16797.png
97

10-
The ``aprscot`` "APRS to Cursor On Target (COT) Gateway" provides beyond
11-
line-of-sight blue force tracking capabilities using commercial off the shelf
12-
components. This gateway uses the Automatic Packet Reporting System (APRS)
13-
and APRS-IS network to forward APRS position reports to Cursor On Target (COT)
14-
clients such as the Android Team Awareness Kit (ATAK), WinTAK, et al. Other
8+
The APRS to Cursor On Target Gateway (APRSCOT) provides beyond line-of-sight
9+
blue force tracking capabilities using commercial off the shelf components.
10+
This gateway uses the Automatic Packet Reporting System (APRS) and APRS-IS
11+
network to forward APRS position reports to Cursor On Target (COT) clients
12+
such as the Android Team Awareness Kit (ATAK), WinTAK, et al. Other
1513
situational awareness & common operating picture platforms are supported
1614
through use of COT, such as TAKX & COPERS.
1715

@@ -37,25 +35,27 @@ Concept:
3735
:alt: APRSCOT concept diagram.
3836
:target: https://raw.githubusercontent.com/ampledata/aprscot/main/docs/aprscot-concept.png
3937

40-
Support aprscot Development
41-
============================
4238

43-
aprscot has been developed for the Disaster Response, Public Safety, and
44-
Frontline community. This software is currently provided at no-cost to
45-
our end-users. All development is self-funded and all time-spent is entirely
46-
voluntary. Any contribution you can make to further these software development
47-
efforts, and the mission of aprscot to provide ongoing SA capabilities to our
48-
end-users, is greatly appreciated:
39+
Support Development
40+
===================
41+
42+
**Tech Support**: Email support@undef.net or Signal/WhatsApp: +1-310-621-9598
43+
44+
This tool has been developed for the Disaster Response, Public Safety and
45+
Frontline Healthcare community. This software is currently provided at no-cost
46+
to users. Any contribution you can make to further this project's development
47+
efforts is greatly appreciated.
4948

5049
.. image:: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
5150
:target: https://www.buymeacoffee.com/ampledata
52-
:alt: Support aprscot development: Buy me a coffee!
51+
:alt: Support Development: Buy me a coffee!
52+
5353

5454
Installation
5555
============
5656

5757
The APRS to COT gateway is service started with a command-line tool
58-
called `aprscot`. There are three options for installing `aprscot`, in order
58+
called ``aprscot``. There are three options for installing ``aprscot``, in order
5959
preferred option they are:
6060

6161
**Option I: Install as a Debian / Ubuntu Package**::
@@ -70,20 +70,20 @@ preferred option they are:
7070

7171
Option II: Install from the Python Package Index (PyPI)::
7272

73-
$ pip install aprscot
73+
$ python3 -m pip install aprscot
7474

7575

7676
Option III: Install from this source tree::
7777

7878
$ git clone https://github.com/ampledata/aprscot.git
7979
$ cd aprscot/
80-
$ python setup.py install
80+
$ python3 setup.py install
8181

8282

8383
Usage
8484
=====
8585

86-
The `aprscot` program has one command-line argument::
86+
The ``aprscot`` program has one command-line argument::
8787

8888
$ aprscot -h
8989
usage: aprscot [-h] [-c CONFIG_FILE]
@@ -92,13 +92,13 @@ The `aprscot` program has one command-line argument::
9292
-h, --help show this help message and exit
9393
-c CONFIG_FILE, --CONFIG_FILE CONFIG_FILE
9494

95-
You must create a configuration file, see `example-config.ini` in the source
95+
You must create a configuration file, see ``example-config.ini`` in the source
9696
repository.
9797

98-
An example config, `COT_URL` is our COT destination server or client::
98+
An example config, ``COT_URL`` is our COT destination server or client::
9999

100100
[aprscot]
101-
COT_URL = tcp:takserver.example.com:8088
101+
COT_URL = tcp://takserver.example.com:8088
102102

103103

104104
`APRS-IS Server-side Filter Commands <http://www.aprs-is.net/javAPRSFilter.aspx>`_
@@ -109,7 +109,7 @@ can be used to filter incoming APRS Frames::
109109
APRSIS_FILTER = f/W6PW-10/50
110110

111111
PLI Transforms can be created using per-station sections. In this example,
112-
we're overriding `W2GMD-9`'s COT Type & Callsign, and `NB6F-2`'s Callsign::
112+
we're overriding ``W2GMD-9``'s COT Type & Callsign, and ``NB6F-2``'s Callsign::
113113

114114
[aprscot]
115115
COT_URL = tcp:takserver.example.com:8088
@@ -127,18 +127,32 @@ Source
127127
======
128128
Github: https://github.com/ampledata/aprscot
129129

130+
130131
Author
131132
======
132133
Greg Albrecht W2GMD oss@undef.net
133134

134135
https://ampledata.org/
135136

137+
136138
Copyright
137139
=========
138-
Copyright 2022 Greg Albrecht
139140

140-
`Automatic Packet Reporting System (APRS) <http://www.aprs.org/>`_ is Copyright Bob Bruninga WB4APR (SK) wb4apr@amsat.org
141+
* APRSCOT is Copyright 2022 Greg Albrecht <oss@undef.net>
142+
* `Automatic Packet Reporting System (APRS) <http://www.aprs.org/>`_ is Copyright Bob Bruninga WB4APR (SK) wb4apr@amsat.org
143+
141144

142145
License
143146
=======
144-
Apache License, Version 2.0. See LICENSE for details.
147+
148+
Copyright 2022 Greg Albrecht <oss@undef.net>
149+
150+
Licensed under the Apache License, Version 2.0 (the "License");
151+
you may not use this file except in compliance with the License.
152+
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
153+
154+
Unless required by applicable law or agreed to in writing, software
155+
distributed under the License is distributed on an "AS IS" BASIS,
156+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
157+
See the License for the specific language governing permissions and
158+
limitations under the License.

aprscot/classes.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
import asyncio
2222

23+
from configparser import ConfigParser
24+
2325
import aprslib.parsing
2426

2527
import pytak
@@ -34,6 +36,10 @@ class APRSWorker(pytak.QueueWorker):
3436

3537
"""APRS Cursor-on-Target Worker Class."""
3638

39+
def __init__(self, queue: asyncio.Queue, config: ConfigParser):
40+
super().__init__(queue, config)
41+
_ = [x.setFormatter(aprscot.LOG_FORMAT) for x in self._logger.handlers]
42+
3743
async def handle_data(self, data: bytes) -> None:
3844
"""Handles messages from APRS Worker."""
3945
self._logger.debug("APRS data='%s'", data)
@@ -47,10 +53,10 @@ async def handle_data(self, data: bytes) -> None:
4753
# Some APRS Frame types are not supported by aprslib yet:
4854
try:
4955
frame = aprslib.parsing.parse(data)
50-
except aprslib.exceptions.UnknownFormat as exc:
56+
except aprslib.exceptions.UnknownFormat:
5157
self._logger.warning("Unhandled APRS Frame: '%s'", data)
5258
return
53-
except aprslib.exceptions.ParseError as exc2:
59+
except aprslib.exceptions.ParseError:
5460
self._logger.warning("Invalid Format: '%s'", data)
5561
return
5662

aprscot/commands.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,11 @@
2525
__license__ = "Apache License, Version 2.0"
2626

2727

28-
# PyTAK CLI tool boilerplate:
29-
pytak.cli(__name__.split(".")[0])
28+
def main() -> None:
29+
"""Main func."""
30+
# PyTAK CLI tool boilerplate:
31+
pytak.cli(__name__.split(".")[0])
32+
33+
34+
if __name__ == "__main__":
35+
main()

example-config.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[aprscot]
2-
#specify protocol:server:port to receive COT
3-
COT_URL = tcp:127.0.0.1:8087
4-
#fill with your callsign
2+
# specify protocol:server:port to receive COT
3+
COT_URL = tcp://127.0.0.1:8087
4+
# fill with your callsign
55
CALLSIGN = N0CALL
6-
#fill with aprs server side filter, ie. f/call/dist
6+
# fill with aprs server side filter, ie. f/call/dist
77
APRSIS_FILTER = f/N0CALL/50
8-
#for server other than default to rotate.aprs.net:14580, ie. local xastir
8+
# for server other than default to rotate.aprs.net:14580, ie. local xastir
99
APRS_HOST = localhost
1010
APRS_PORT = 2023

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def publish():
5151
packages=[__title__],
5252
package_dir={__title__: __title__},
5353
url=f"https://github.com/ampledata/{__title__}",
54-
entry_points={"console_scripts": [f"{__title__} = {__title__}.commands"]},
54+
entry_points={"console_scripts": [f"{__title__} = {__title__}.commands:main"]},
5555
description="APRS Cursor-on-Target Gateway.",
5656
author="Greg Albrecht",
5757
author_email="oss@undef.net",

tox.ini

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)