File: edit_json.rb

package info (click to toggle)
libjson-ruby 0.4.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 268 kB
  • ctags: 329
  • sloc: ruby: 2,672; makefile: 13
file content (11 lines) | stat: -rwxr-xr-x 231 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env ruby
$KCODE = 'U'
require 'json/editor'

filename, encoding = ARGV
JSON::Editor.start(encoding) do |window|
  if filename and File.exist?(filename)
    window.file_open(filename)
  end
end
  # vim: set et sw=2 ts=2: