Closed Conor0Callaghan closed 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).
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()
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.