Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gelleson/gcsv
CSV generator based on YAML
https://github.com/gelleson/gcsv
csv generator golang
Last synced: about 2 months ago
JSON representation
CSV generator based on YAML
- Host: GitHub
- URL: https://github.com/gelleson/gcsv
- Owner: gelleson
- License: mit
- Created: 2019-04-18T12:49:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-29T20:56:30.000Z (over 3 years ago)
- Last Synced: 2024-06-20T22:37:03.195Z (7 months ago)
- Topics: csv, generator, golang
- Language: Go
- Homepage:
- Size: 121 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GCSV
[![Go Report Card](https://goreportcard.com/badge/github.com/gelleson/gcsv)](https://goreportcard.com/report/github.com/gelleson/gcsv)**GCSV** is a yaml based csv file generator.
## Example
```bash
gcsv generate example.yaml
``````yaml
# example.yaml
documents:
- name: example_data
rows: 1000
with_header: true
columns:
- name: id
type: seq
kwargs:
initial_sequence: 100
- name: last_name
type: personal
kwargs:
mode: last_name
- name: random_date
type: date
kwargs:
format: 2006-01-02 03:04:05
from: '2006-01-02 03:04:05'
to: '2012-01-02 03:04:05'
- name: random_int
type: int
``````bash
out:
CSV is generated
```|id |last_name|random_date |random_int|
|---|---------|-------------------|----------|
|101|Allen |2021-01-01 01:36:50|50 |
|102|Burton |2020-05-11 09:32:31|44 |
|103|Meyer |2020-11-23 09:10:21|56058 |
|104|Wells |2020-12-16 10:34:11|2 |
|105|Ray |2020-02-18 03:52:17|9397 |
|106|Jones |2020-04-24 04:55:20|9189 |
|107|Thompson |2020-04-24 05:09:18|823 |
|108|Cox |2020-04-01 03:49:08|1 |
|109|Duncan |2020-12-20 04:46:56|918 |
|110|Howell |2020-07-23 07:37:29|47685 |