Skip to content

Instantly share code, notes, and snippets.

@gbirke
Created July 7, 2014 15:54
Show Gist options
  • Save gbirke/41da6d6a49e6d9731338 to your computer and use it in GitHub Desktop.
Save gbirke/41da6d6a49e6d9731338 to your computer and use it in GitHub Desktop.
Convert n3 file to PNG
#!/bin/bash
# Use the rdf2dot Python command (from the rdflib) to create a PNG from a graph
function usage {
echo "Usage: $0 input.n3 output.pn3"
exit
}
if [ -z "$1" -o -z "$2" ]; then usage; fi
iconv -f utf-8 -t ascii -c $1 | rdf2dot -f n3 | neato -Tpng -Goverlap=false -o$2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment