https://github.com/koopjs/koop-output-csv
A Koop output plugin for generating CSV file.
https://github.com/koopjs/koop-output-csv
Last synced: about 1 month ago
JSON representation
A Koop output plugin for generating CSV file.
- Host: GitHub
- URL: https://github.com/koopjs/koop-output-csv
- Owner: koopjs
- License: other
- Created: 2023-05-26T16:02:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-20T14:46:57.000Z (almost 2 years ago)
- Last Synced: 2024-04-24T23:22:19.441Z (12 months ago)
- Language: TypeScript
- Size: 470 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Koop Output CSV
This is a Koop output plugin that transforms data from Koop Provider into a CSV file.
## Use
The plugin uses highly customizable CSV template in JSON for field mapping with provider's data which can be passed via Koop instance. The options for the plugin are `csvTemplate`, `csvTemplateTransforms` and `csvFileName`. Both `csvTemplate`, `csvTemplateTransforms` can be request (`res.locals`) specific and/or application (`app.locals`) specific set in Koop server middleware. `csvFileName` is request (`res.locals`) specific used for naming CSV filename.[adlib](https://github.com/Esri/adlib) is used to interpolate template.
Visit the [KoopJS docs](https://koopjs.github.io/docs/basics/what-is-koop) for instructions on building and deploying a Koop app.
## Develop
```
# clone and install dependencies
git clone https://github.com/koopjs/koopjs-output-csv
cd koopjs-output-csv
npm i# starts the example Koop app found in ./example-app.
npm run dev
```## Test
Run the `npm t` commmand to spin up the automated tests.