Advertisement
Guest User

Untitled

a guest
Nov 27th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2.  
  3. if ARGV.length < 2
  4. puts "Usage: #{$PROGRAM_NAME} <plist_file> <json_file>"
  5. exit 1
  6. end
  7.  
  8. plist_file = ARGV[0]
  9. json_file = ARGV[1]
  10.  
  11. require 'plist'
  12. require 'json'
  13.  
  14. data = Plist::parse_xml(plist_file)
  15. IO.write(json_file, JSON.pretty_generate(data))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement