RETURN TO THE ENTRANCE HOME PAGE

The Entrance Command Line Utility

The Entrance jar now includes a command line utility for generating charts.  To invoke it you run the main class in the entrance.jar from the command line, passing it the command line option -o and the name of the PNG or JPG file you would like written.

This utiility uses the same code to parse SQL scripts and draw charts that the Entrance window uses, so anything that works there will work here as well.

Usage:

  java -jar entrance.jar (options) -c (connection_name) -o (output file) (script file)

             or

  java -jar entrance.jar (options)
jdbc:mysql://(host):(port)/(db)       \
       
-u (user) -p (password) -o (output file) (script file)

Options:

  -c     (Entrance connection name)
  -url   jdbc:mysql://(host):(port)/(db)
  -u     (user name)
  -p     (password)
  -w     (integer width of the resulting image)
  -h     (integer height of the resulting image)
  -o     (PNG or JPG output file)
  -d     (JDBC driver class)

Examples:

java -jar entrance.jar      
     -url jdbc:mysql://localhost/test -u joe -p bagadonuts -o out.png  ~/area.sql

java -jar entrance.jar -c test -o out.png  ~/area.sql

java -jar entrance.jar -c test -o out.png  ~/area.sql -w 800 -h 400

PHP exec() can be used to invoke the Entrance command line utility:

<?php
print "Here we go...\n";
exec("java -jar /Applications/Entrance.app/Contents/Resources/Java/entrance.jar -c test -o out.png  ~/area.sql");
print "Success!\n";
?>