Skip to content

Commit

Permalink
Accept --djan to flotojson.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
jmettraux committed Oct 19, 2023
1 parent bd85075 commit d831fc5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## flor 1.6.1 not yet released

* accept --djan to flotojson.rb


## flor 1.6.0 released 2023-01-13

Expand Down
11 changes: 10 additions & 1 deletion lib/flor/tools/flotojson.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
puts " --jp pretty prints the JSON output"
puts
puts " -y"
puts " -yaml dumps as YAML"
puts " --yaml dumps as YAML"
puts
puts " -d"
puts " --djan dumps as djan"
puts
puts " --json dumps as JSON (it's the default)"
puts
puts " -h"
puts " --help prints this help message"
Expand Down Expand Up @@ -84,6 +89,10 @@
)
elsif flags['-y'] || flags['--yaml']
puts YAML.dump(tree)
elsif flags['-d'] || flags['--djan']
puts(Flor.to_djan(tree, indent: 2, width: true))
elsif flags['--json']
puts JSON.dump(tree)
else
puts JSON.dump(tree)
end
Expand Down

0 comments on commit d831fc5

Please sign in to comment.