[#7] Update documentation

Documentation updated to match current database build process.
Unnecessary prerequisites removed, Go language
dependency added. Usage examples updated.

Signed-off-by: George Bartolomey <george@bh4.ru>
This commit is contained in:
George Bartolomey 2024-07-08 11:33:25 +03:00
parent 840b20538b
commit 2cb22574b9
Signed by: george.bartolomey
GPG key ID: 35BC54839D73BFAD
2 changed files with 15 additions and 15 deletions

View file

@ -3,8 +3,8 @@
First, thank you for contributing! We love and encourage pull requests from First, thank you for contributing! We love and encourage pull requests from
everyone. Please follow the guidelines: everyone. Please follow the guidelines:
- Check the open [issues](https://git.frostfs.info/TrueCloudLab/frostfs-node/issues) and - Check the open [issues](https://git.frostfs.info/TrueCloudLab/frostfs-locode-db/issues) and
[pull requests](https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls) for existing [pull requests](https://git.frostfs.info/TrueCloudLab/frostfs-locode-db/pulls) for existing
discussions. discussions.
- Open an issue first, to discuss a new feature or enhancement. - Open an issue first, to discuss a new feature or enhancement.
@ -23,23 +23,23 @@ everyone. Please follow the guidelines:
## Development Workflow ## Development Workflow
Start by forking the `frostfs-node` repository, make changes in a branch and then Start by forking the `frostfs-locode-db` repository, make changes in a branch and then
send a pull request. We encourage pull requests to discuss code changes. Here send a pull request. We encourage pull requests to discuss code changes. Here
are the steps in details: are the steps in details:
### Set up your Forgejo repository ### Set up your Forgejo repository
Fork [FrostFS node upstream](https://git.frostfs.info/TrueCloudLab/frostfs-node) source Fork [FrostFS node upstream](https://git.frostfs.info/TrueCloudLab/frostfs-locode-db) source
repository to your own personal repository. Copy the URL of your fork (you will repository to your own personal repository. Copy the URL of your fork (you will
need it for the `git clone` command below). need it for the `git clone` command below).
```sh ```sh
$ git clone https://git.frostfs.info/TrueCloudLab/frostfs-node $ git clone https://git.frostfs.info/TrueCloudLab/frostfs-locode-db
``` ```
### Set up git remote as ``upstream`` ### Set up git remote as ``upstream``
```sh ```sh
$ cd frostfs-node $ cd frostfs-locode-db
$ git remote add upstream https://git.frostfs.info/TrueCloudLab/frostfs-node $ git remote add upstream https://git.frostfs.info/TrueCloudLab/frostfs-locode-db
$ git fetch upstream $ git fetch upstream
$ git merge upstream/master $ git merge upstream/master
... ...

View file

@ -27,7 +27,7 @@ following sources:
## Prerequisites ## Prerequisites
- Latest [frostfs-cli](https://git.frostfs.info/TrueCloudLab/frostfs-node) tool - Go 1.21
## Quick start ## Quick start
@ -41,13 +41,13 @@ $ make
## Building ## Building
Then run frost-cli command to generate boltDB file. Then run frost-cli command to generate UN/LOCODE database.
``` ```
$ frostfs-cli util locode generate --help $ ./frostfs-locode-db generate
generate UN/LOCODE database for FrostFS Generate UN/LOCODE database for FrostFS
Usage: Usage:
frostfs-cli util locode generate [flags] frostfs-locode-db generate [flags]
Flags: Flags:
--airports string Path to OpenFlights airport database (csv) --airports string Path to OpenFlights airport database (csv)
@ -58,7 +58,7 @@ Flags:
--out string Target path for generated database --out string Target path for generated database
--subdiv string Path to UN/LOCODE subdivision database (csv) --subdiv string Path to UN/LOCODE subdivision database (csv)
$ ./frostfs-cli util locode generate \ $ ./frostfs-locode-db generate \
--airports airports.dat \ --airports airports.dat \
--continents continents.geojson \ --continents continents.geojson \
--countries countries.dat \ --countries countries.dat \
@ -69,9 +69,9 @@ $ ./frostfs-cli util locode generate \
**Database generation might take some time!** **Database generation might take some time!**
You can test generated database with `frostfs-cli`. You can test generated database with `frostfs-locode-db`.
``` ```
$ frostfs-cli util locode info --db locode_db --locode 'RU LED' $ frostfs-locode-db info --db locode_db --locode 'RU LED'
Country: Russia Country: Russia
Location: Saint Petersburg (ex Leningrad) Location: Saint Petersburg (ex Leningrad)
Continent: Europe Continent: Europe