con2 / emrichen

A Template engine for YAML & JSON
MIT License
107 stars 11 forks source link

JSON input and output support #5

Closed akx closed 6 years ago

akx commented 6 years ago

Feel free to shoot this down :)

I'm just surprised how trivial this was to implement.

Now fully remastered!

akx commented 6 years ago

Test fails because of a missing Py3.7. 🤷‍♂️

japsu commented 6 years ago
akx commented 6 years ago

Will get to those tomorrow probably. Just to be sure, -o stands for output?

japsu commented 6 years ago

Was actually thinking -o would stand for --output-format, but -o is already taken for --output-file.

How about

  1. Autodetect the output format from --output-file, if specified;
  2. Force the output format with --output-format; and finally
  3. Default to YAML if can't autodetect (eg. output is a TTY or pipe) and no --output-format is specified.