Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmalcek/bafi
Universal JSON, BSON, YAML, CSV, XML converter with templates
https://github.com/mmalcek/bafi
bson convert converter csv csv-to-json csv-to-xml formatter json json-to-xml parser xml xml-to-json yaml
Last synced: 20 days ago
JSON representation
Universal JSON, BSON, YAML, CSV, XML converter with templates
- Host: GitHub
- URL: https://github.com/mmalcek/bafi
- Owner: mmalcek
- License: mit
- Created: 2021-07-13T10:48:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T11:48:50.000Z (12 months ago)
- Last Synced: 2023-12-16T00:34:48.926Z (12 months ago)
- Topics: bson, convert, converter, csv, csv-to-json, csv-to-xml, formatter, json, json-to-xml, parser, xml, xml-to-json, yaml
- Language: Go
- Homepage: https://mmalcek.github.io/bafi/
- Size: 3.31 MB
- Stars: 89
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - bafi - Universal JSON, BSON, YAML, XML translator to ANY format using templates. (Text Processing / Markup Languages)
- awesome-ccamel - mmalcek/bafi - Universal JSON, BSON, YAML, CSV, XML, mt940 converter with templates (Go)
- awesome-go-extra - bafi - 07-13T10:48:40Z|2022-05-23T07:24:31Z| (Bot Building / Markup Languages)
README
[![Go](https://github.com/mmalcek/bafi/actions/workflows/go.yml/badge.svg)](https://github.com/mmalcek/bafi/actions/workflows/go.yml)
[![CodeQL](https://github.com/mmalcek/bafi/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/mmalcek/bafi/actions/workflows/codeql-analysis.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/mmalcek/bafi)](https://goreportcard.com/report/github.com/mmalcek/bafi)
[![License](https://img.shields.io/github/license/mmalcek/bafi)](https://github.com/mmalcek/bafi/blob/main/LICENSE)
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go#text-processing)
[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/mmalcek/bafi?label=latest%20release)](https://github.com/mmalcek/bafi/releases/latest)# Universal JSON, BSON, YAML, CSV, XML, mt940 translator to ANY format using templates
## Key features
- Various input formats **(json, bson, yaml, csv, xml, mt940)**
- Flexible output formatting using text templates
- Support for [Lua](https://www.lua.org/pil/contents.html) custom functions which allows very flexible data manipulation
- stdin/stdout support which allows get data from source -> translate -> delivery to destination. This allows easily translate data between different web services like **REST to SOAP, SOAP to REST, REST to CSV, ...**
- Merge multiple input files in various formats into single output file formated using template
- Support chatGPT queries to analyze or format data (experimental)## Documentation [https://mmalcek.github.io/bafi/](https://mmalcek.github.io/bafi/)
## Releases (Windows, MAC, Linux) [https://github.com/mmalcek/bafi/releases](https://github.com/mmalcek/bafi/releases)
usage:
```
bafi.exe -i testdata.xml -t template.tmpl -o output.txt
```or
```
curl.exe -s https://api.predic8.de/shop/customers/ | bafi.exe -f json -t "?{{toXML .}}"
```or
```
curl -s https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml | ./bafi -f xml -gk myChatGPTToken -gq "What's the current CZK rate?"
```More examples and description in [documentation](https://mmalcek.github.io/bafi/)
**If you like this app you can buy me a coffe ;)**