Created
January 25, 2020 06:08
-
-
Save FrankHassanabad/eefe3fc8faa295a48b13adfa5cef5390 to your computer and use it in GitHub Desktop.
json to toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Download yj from: | |
# https://github.com/sclevine/yj/releases | |
# such as wget https://github.com/sclevine/yj/releases/download/v4.0.0/yj-macos | |
# | |
# Then chmod 755 ./yj-macos and chmod 755 toml_to_json.sh | |
# Go to your toml and run this | |
# toml_to_json.sh | |
rm -rf ./toml | |
mkdir -p toml | |
for f in *.json ; do | |
name=$(basename -- "$f" .json).toml | |
cat $f | ./yj-macos -jt > toml/"${name}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment