This is a simple utility package, originally to parse .adi files from LoTW, but now from anywhere.
Project description
adi_parser
This is a simple utility package, originally to parse .adi files from LoTW, but now from anywhere.
By default, adi_parser parses LoTW .adi arguments. You can optionally parse all arguments as a python dictionary.
Examples
Parsing in LoTW .adi format
from adi_parser import parse_adi
adi_header, qso_reports = parse_adi("path/to/your_data.adi")
Where adi_header: Header
and qso_reports: list[QSOReport]
.
These are dataclasses, which are defined in adi_parser.dataclasses
.
All dataclass values are assumed to be missing by default.
Both GRIDSQUARE
and MY_GRIDSQUARE
are converted to lat/lat with
maidenhead.
Parsing all arguments from a .adi
from adi_parser import parse_adi
result = parse_adi("path/to/your_data.adi", return_type=dict)
Where the result dictionary follows this format:
result = {
"header": {
"full_text": str,
"argument_1": str,
"argument_2": str,
...
},
"qso_reports": [
{
"full_text": str,
"argument_1": {
"value": str,
"length": int,
"type": str | None,
"comment": str | None,
},
"argument_2": {
...
},
...
},
...
]
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
adi_parser-0.1.0.tar.gz
(8.1 kB
view hashes)
Built Distribution
Close
Hashes for adi_parser-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 404535b45fc21b2691205abd52162771ad30c5feaa24d6e41431fdac9bec1738 |
|
MD5 | b879b2be6890bac298033e79452dfc21 |
|
BLAKE2b-256 | 788d8d939e7f1d7d776e71270ca5676baedeaa82c0c0feecc0a20f1cd1b46112 |