Crates.io | fetch-sac |
lib.rs | fetch-sac |
version | 0.6.1 |
source | src |
created_at | 2023-04-03 20:18:09.675072 |
updated_at | 2023-04-06 07:57:19.975873 |
description | Fetch the official list of SAC codes from ASTERIX site. |
homepage | |
repository | https://github.com/keltia/fetch-sac |
max_upload_size | |
id | 829464 |
size | 86,919 |
Library to fetch the latest list of SAC codes from the official ECTL website
Licensed under the MIT license.
This is a small CLI utility to fetch the official list of SAC codes from the ECTL Asterix website.
ECTL is the official maintainer of the worldwide list of SAC codes, representing different zones in the world.
These are used in Surveillance work in the Aeronautical world to represent a given (and large) zone from which a given
surveillance record has been issued when using the Asterix specifications.
This thing is, this list of not available in any usable format, and you are supposed to just read the web page. This is for me clearly unacceptable in 2023 and getting the list in various formats like JSON or even CSV is desirable.
It is be available as a crate on Crates.io and as a repository on GitHub. Installation can be done either through a compiled binary for your platform or by cloning the repo and compiling.
UNIX/macOS:
$ cargo install fetch-sac
Windows
C:\> cargo.exe install fetch-sac
$ git clone https://github.com/keltia/fetch-sac
$ cd fetch-sac
$ cargo build
$ cargo test
$ cargo install --release
For the moment, there is only one binary called fetch-sac
(with .exe
on Windows). It scrapes the official website,
remove all the HTML and outputs the result into usable formats.
Fetch the latest SAC codes data from ECTL.
Source: https://www.eurocontrol.int/asterix/
Usage: fetch-sac [OPTIONS]
Options:
-C, --csv CSV
-J, --json JSON
-o, --output <OUTPUT> Output file
-q, --quiet Quiet mode
-v, --verbose... Verbose mode
-V, --version Display utility full version
-h, --help Print help
As this utility is scraping the web page directly, looking for what interests it, it may of course break from time
to time as the page get updated (not very often though). The format of the various tabs in the table is different
between all of them which makes it more complicated. There is also the matter of the <br>
inserted at some points
breaking the parsing, it tries to compensate for this.
This way of doing things is so '90 and broken.
The Minimum Supported Rust Version is 1.56 due to the 2021 Edition.
Please see CONTRIBUTING.md for some simple rules.
I use Git Flow for this package so please use something similar or the usual GitHub workflow.
git checkout develop
)git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)