Sha256: d3e19065b9adb7883a7160c7371a9d3e23f707cd4fd2b2549d36831458f1caf4

Contents?: true

Size: 387 Bytes

Versions: 2

Compression:

Stored size: 387 Bytes

Contents

#!/usr/bin/env ruby
#Thankfully, whitespace doesn't matter in SGF, unless you're inside a comment.
#This makes it possible to indent an SGF file and let it be somewhat human-readable.

require_relative '../lib/sgf'

if ARGV.size != 2
  puts "Usage:\n sgf_indent source.sgf destination.sgf"
  exit 1
end

parser = SGF::Parser.new
collection = parser.parse ARGV[0]
collection.save ARGV[1]

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
SgfParser-3.0.1 bin/sgf_indent.rb
SgfParser-3.0.0 bin/sgf_indent.rb