miaowware / ctyparser

A CTY.DAT parser for modern amateur radio programs
https://ctyparser.miaow.io/
MIT License
4 stars 2 forks source link

Pushing fix for #10 parameterise feed URLs #11

Closed Conor0Callaghan closed 4 years ago

Conor0Callaghan commented 4 years ago

I have run the script, but I'm not sure if the format of the feed URLs has changed and broken things as it can't extract a cty.dat properly.

classabbyamp commented 4 years ago

Hello ivernus,

Thank you for your suggestions!

The code in this repository is in the middle of a rewrite, and you've made some changes to the old code. You can preview the new code (in progress) in the branch 5c-excepts.

The old code is not very tolerant to modifications, and loading a custom CTY.DAT file only works in the new version. In the new version, the feed is customizable, but the download link is not (yet).

0x5c commented 4 years ago

The new code is not yet documented enough, and currently lacks a command-line interface (also in the works).

I should be fairly trivial to use from within a python script, or the Python REPL.
Just instantiate the class BigCty from the package, and .import_dat() the cty.dat file, and .dump() to a json file.

You probably do not want to run setup.py though, as the new code is currently going through more changes.

EDIT: .load() --> .import_dat()