10

Github GitHub - alash3al/re-txt: converts text-formats from one to another, it i...

 4 years ago
source link: https://github.com/alash3al/re-txt
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

re-txt

reformates a text file from a structure to another, i.e: convert from json to yaml, toml to json, ... etc

Supported Source Formats

Supported Target Formats

Examples

# json to yaml using flag
$ re-txt --src example.json json2yaml

# json to yaml using stdin pipe
$ cat example.json | re-txt json2yaml

# csv to yaml by first converting to json
$ cat example.csv | re-txt csv2json | re-txt json2yaml

# csv to yaml by first converting to json
# also merge multiple json files and convert the piped result & them into yaml
$ cat example.csv | re-txt csv2json | re-txt --dest ./result.yaml --src=another1.json --src=another2.json json2yaml

Installations

  • from source: go get github.com/alash3al/re-txt
  • binary download: go to there and download the binary which support your env

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK