From 67fec995af25bc0fbf6e61255d9e83da016ce9f2 Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Wed, 5 Oct 2022 22:20:14 -0700 Subject: [PATCH] added xml declaration to output xml cot --- aprscot/functions.py | 4 +++- setup.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aprscot/functions.py b/aprscot/functions.py index 49c964f..6eb8b1f 100644 --- a/aprscot/functions.py +++ b/aprscot/functions.py @@ -139,4 +139,6 @@ def aprs_to_cot_xml( def aprs_to_cot(frame: dict, config: Union[dict, None] = None) -> Union[bytes, None]: """Wrapper that returns COT as an XML string.""" cot: Union[ET.Element, None] = aprs_to_cot_xml(frame, config) - return ET.tostring(cot) if cot else None + return ( + b"\n".join([pytak.DEFAULT_XML_DECLARATION, ET.tostring(cot)]) if cot else None + ) diff --git a/setup.py b/setup.py index 1ac9b32..e76a220 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ import setuptools __title__ = "aprscot" -__version__ = "6.0.0" +__version__ = "6.1.0" __author__ = "Greg Albrecht W2GMD " __copyright__ = "Copyright 2022 Greg Albrecht" __license__ = "Apache License, Version 2.0" @@ -61,7 +61,7 @@ def publish(): long_description_content_type="text/x-rst", zip_safe=False, include_package_data=True, - install_requires=["aprslib", "pytak >= 5.0.0"], + install_requires=["aprslib", "pytak >= 5.4.0"], classifiers=[ "Topic :: Communications :: Ham Radio", "Programming Language :: Python",