Awesome Go

bafi

CategoryText Processing
SubcategoryMarkup Languages
Stars0

Universal JSON, BSON, YAML, XML translator to ANY format using templates

About bafi

Go CodeQL Go Report Card License Mentioned in Awesome Go GitHub tag (latest by date)

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 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)
  • Support Encode to TOON (Token Oriented Object Notation) format. As easy as ./bafi -i input.json -t "?{{ toTOON . }}"

Documentation https://mmalcek.github.io/bafi/

Releases (Windows, MAC, Linux) 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

If you like this app you can buy me a coffe ;)

Frequently Asked Questions

What is bafi?

bafi is a Text Processing library for the Go programming language. Universal JSON, BSON, YAML, XML translator to ANY format using templates

How do I install bafi?

Install bafi with the Go module system using `go get mmalcek/bafi`. Check the repository for the current installation instructions.

What category does bafi belong to?

bafi is listed under Text Processing, specifically Markup Languages.

← Back to Markup Languages