Skip to content

Instantly share code, notes, and snippets.

@DDuarte
Created June 7, 2022 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DDuarte/48770b0083644eef4c2f5560e539cc96 to your computer and use it in GitHub Desktop.
Save DDuarte/48770b0083644eef4c2f5560e539cc96 to your computer and use it in GitHub Desktop.
import yaml
import json
import sys
with open(sys.argv[1]) as f:
y = yaml.safe_load(f)
with open(sys.argv[1].replace("yml", "json").replace("yaml", "json"), "w") as ff:
json.dump(y, ff)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment