Skip to content

Commit

Permalink
Formatting and add Netlify link steps to readme.md (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
richfab authored Dec 21, 2023
1 parent 1987efe commit 3cfd484
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ A [General Bikeshare Feed Specification](https://github.com/MobilityData/gbfs) d
## Introduction

The Canonical GBFS Validator is a tool to check the conformity of a GBFS feed against the [official specification](https://github.com/MobilityData/gbfs/blob/master/gbfs.md).
It validates feeds up to GBFS version 2.3.
It validates feeds up to GBFS version 3.0-RC2.
This tool is built using the [JSON Schemas](https://github.com/MobilityData/gbfs-json-schema), and the site is powered by [Netlify](https://www.netlify.com/).

![interface](https://user-images.githubusercontent.com/63653518/138286224-b0b23dca-d87e-45e8-b58a-e6a4a37ad773.png)
![interface](https://github.com/MobilityData/gbfs-validator/assets/2423604/11206e7a-dd64-4133-bb32-eaa391815e60)

The schemas in `gbfs-validator/versions/schemas` is a git subtree of https://github.com/MobilityData/gbfs-json-schema. For more details, see [`gbfs-validator/versions/schemas/README.md`](https://github.com/MobilityData/gbfs-validator/tree/master/gbfs-validator/versions).

Questions? Please open an issue or reach out to MobilityData on the GBFS slack channel!
Questions? Please open an issue or reach out on the #gbfs channel on the [MobilityData Slack](https://mobilitydata-io.slack.com/).

## Run the app

The validator is developed to be used “online” (hosted with a lambda function).

1. Open gbfs-validator.mobilitydata.org/
1. Open https://gbfs-validator.mobilitydata.org
2. Enter the feed’s auto-discovery URL
3. If needed, select the version. If not specified, the validator will pick the version mentioned in the `gbfs.json` file
4. Select file requirement options (free-floating or docked)
5. Click the “Valid me” button, and see the validation results below
5. Click the “Validate me !” button, and see the validation results below

## Validation rules

Expand All @@ -35,66 +35,66 @@ Have a suggestion for a new rule? Open an issue!

### Required

To build the project locally, you need
To build the project locally, you need:

- [Node.js](https://nodejs.org/en/download/) + [Yarn](https://classic.yarnpkg.com/en/docs/install/)

- Ports 8080, 9000 and 9229 need to be free

#### Node.js
- [Node.js](https://nodejs.org/en/download/). Minimum Node.js version `v14.x.x`, or higher. Recommend Node.js version `v18.x.x`.
```shell
brew install node
```

We recommend you to use [NVM](https://github.com/nvm-sh/nvm#installing-and-updating)
- [Yarn](https://classic.yarnpkg.com/en/docs/install/)
```shell
npm install --global yarn
```

Minimum Node.js version `v14.x.x`, or higher. Recommend Node.js version `v18.x.x`.
- Ports 8080, 9000 and 9229 need to be free

### Clone the repository
### Run dev environment

- Download or clone the repository
```shell
git clone https://github.com/fluctuo/gbfs-validator.git
git clone https://github.com/MobilityData/gbfs-validator.git
cd gbfs-validator
```

### Set Environment variables

Copy `./website/.env.exemple` to `./website/.env`
And set values

### Run dev environment
- Install the requirements
```shell
yarn
```

With Node.js
- Connect your local project to the `gbfs-validator` Netlify site to access its environment variables
```shell
netlify link
```
Select `Enter the site name` and enter `gbfs-validator`

- Run dev environment locally
```shell
yarn
yarn run dev
```

Open `localhost:8080` on your browser
- Open `localhost:8080` on your browser

### Command line
The GBFS validator can be used a command line. Find below the steps for using cli feature:
The GBFS validator can be used as a Command Line Interface (CLI):

- Download or clone this repository
- Download or clone the repository
```shell
git clone https://github.com/fluctuo/gbfs-validator.git
git clone https://github.com/MobilityData/gbfs-validator.git
cd gbfs-validator
```
- Executes the cli script using one of the listed below options

```shell
./gbfs-validator/cli.js -u {http_address_of_gbfs_dataset} -s {local_path_to_output_report_file}
```
or
- Execute the CLI script
```shell
node ./gbfs-validator/cli.js -u {http_address_of_gbfs_dataset} -s {local_path_to_output_report_file}
```

## CLI help parameter
To get the list of supported paramters
- To get the list of supported paramters
```shell
./gbfs-validator/cli.js --help
node ./gbfs-validator/cli.js --help
```

## Usage description and supported parameters
- Usage description and supported parameters
```
Usage: cli [OPTIONS]...
Expand Down Expand Up @@ -128,4 +128,4 @@ This project follows the [all-contributors](https://allcontributors.org/docs/en/

## Acknowledgements

This project was originally created by Pierrick Paul at [fluctuo](https://fluctuo.com/) - MobilityData started maintaining the project in September 2021.
This project was originally created by Pierrick Paul ([@PierrickP](https://github.com/PierrickP)) at [fluctuo](https://fluctuo.com/) - MobilityData started maintaining the project in September 2021.

0 comments on commit 3cfd484

Please sign in to comment.