Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danieljdufour/git-csv
The Easiest Way to Get the Rows from a CSV on Github
https://github.com/danieljdufour/git-csv
csv git github
Last synced: 22 days ago
JSON representation
The Easiest Way to Get the Rows from a CSV on Github
- Host: GitHub
- URL: https://github.com/danieljdufour/git-csv
- Owner: DanielJDufour
- License: cc0-1.0
- Created: 2020-08-07T00:44:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-07T13:18:52.000Z (over 4 years ago)
- Last Synced: 2024-12-06T05:35:42.090Z (about 1 month ago)
- Topics: csv, git, github
- Language: JavaScript
- Homepage:
- Size: 37.1 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-csv
The Easiest Way to Get the Rows from a CSV on Github# install
```bash
npm install git-csv
```# usage
## Getting a CSV from a Public Repo
```javascript
const gitCSV = require('git-csv');const rows = await gitCSV({
url: 'https://github.com/org/repo/blob/master/folder/example.csv'
});
// rows is like [ [ 5, 389, 'HARVARD UNIV', 'Ames Hall', true ], ...]
```## Getting a CSV from a Private Repo
```javascript
const gitCSV = require('git-csv');const rows = await gitCSV({
accessToken: '12ye7taslasudfbhkyjasvfjysdce621tcu6ertc12y5r',
url: https://github.com/org/repo/blob/master/folder/example.csv
});
```## Getting a CSV with a Header
```javascript
const gitCSV = require('git-csv');const rows = await gitCSV({
header: true,
url: https://github.com/org/repo/blob/master/folder/example.csv
});
// rows is like [ { team_name: 'Celtics', location: 'Boston' }, ...]
```