Skip to content

Commit

Permalink
update README, add CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
digizeph committed Feb 21, 2025
1 parent ae71f33 commit 06b92fd
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 18 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
53 changes: 35 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,48 @@
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:
[PATH] Export data path [default: ./asninfo.jsonl]

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
```
Expand All @@ -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

<a href="https://bgpkit.com"><img src="https://bgpkit.com/Original%20Logo%20Cropped.png" alt="https://bgpkit.com/favicon.ico" width="200"/></a>

0 comments on commit 06b92fd

Please sign in to comment.