From 06b92fdf1a1254a541eb86e1147c731a875bfdf9 Mon Sep 17 00:00:00 2001 From: Mingwei Zhang Date: Fri, 21 Feb 2025 12:06:08 -0800 Subject: [PATCH] update README, add CHANGELOG --- CHANGELOG.md | 12 ++++++++++++ README.md | 53 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 47 insertions(+), 18 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a6e7ae1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## v0.1.0 - 2025-02-21 + +Initial release: + +* release `asninfo` binary tool that can generate ASN information + * support export to local JSON/JSONL files + * support upload to S3-compatible object storage systems + * support simplified format \ No newline at end of file diff --git a/README.md b/README.md index a94b14c..8ab4fbb 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,40 @@ This script fetches the most up-to-date ASN information and saves as JSON or JSONL file and may upload to S3/R2 bucket if environment variables are set. +## Install + +### Using `cargo` + +```bash +cargo install asninfo +``` + +### Using `homebrew` on macOS + +```bash +brew install bgpkit/tap/asninfo +``` + +### Using [`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall) + +Install `cargo-binstall` first: + +```bash +cargo install cargo-binstall +``` + +Then install `asninfo` using `cargo binstall` + +```bash +cargo binstall asninfo +``` + ## Usage ```shell -➜ asninfo git:(main) ✗ cargo run --release -- --help - Finished `release` profile [optimized] target(s) in 0.08s - Running `target/release/asninfo --help` +A utility tool to export ASN information to JSON files. + + Usage: asninfo [OPTIONS] [PATH] Arguments: @@ -16,21 +44,7 @@ Arguments: Options: -u, --upload Flag to enable upload to S3-compatible object storage - Required environment variables: - - `AWS_REGION` - - `AWS_ENDPOINT` - - `AWS_ACCESS_KEY_ID` - - `AWS_SECRET_ACCESS_KEY` - - `ASNINFO_UPLOAD_PATH`: full path with `s3` or `r2` prefix, such as `r2://spaces/broker/asninfo.jsonl` - -s, --simplified Simplified format, including the following fields: - - asn - - as_name - - org_id - - org_name - - country_code - - country_name - - data_source - --debug Print debug information + -s, --simplified Simplified format -h, --help Print help -V, --version Print version ``` @@ -43,3 +57,6 @@ Options: - `AWS_SECRET_ACCESS_KEY` - `ASNINFO_UPLOAD_PATH`: full path with `s3` or `r2` prefix, such as `r2://spaces/broker/asninfo.jsonl` +## Built with ❤️ by BGPKIT Team + +https://bgpkit.com/favicon.ico