Skip to content

Instantly share code, notes, and snippets.

View robertwatts's full-sized avatar

Robert Watts robertwatts

View GitHub Profile
@robertwatts
robertwatts / gist:7809403
Created December 5, 2013 17:14
Read a CSV file containing un-ordered relationships, create a Node tree and pretty print
/**
* Parses an un-ordered CSV file with the following structure:
* parent_node name, parent_node id, node name, node id
*
* .. and populates a Node tree which is then walked over to pretty print.
*/
@Grab(group='net.sf.opencsv', module='opencsv', version='2.3')
import au.com.bytecode.opencsv.CSVReader;
require 'rubygems'
require 'rubygems/package'
require 'zlib'
require 'fileutils'
module Util
module Tar
# Creates a tar file in memory recursively
# from the given path.
#