diff options
author | Harel Ben-Attia <harelba@gmail.com> | 2014-10-23 08:13:02 -0400 |
---|---|---|
committer | Harel Ben-Attia <harelba@gmail.com> | 2014-10-23 08:13:02 -0400 |
commit | 73fdaf99790c87b3e2ddd6178a48d3c1011ec124 (patch) | |
tree | 677a5977b9964e725871d120a7549bfd5faf655e | |
parent | 1244a5c5949632daa658c8ffcdb1b931b038295d (diff) |
Added more version information
-rwxr-xr-x | bin/q | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -23,11 +23,11 @@ # # Its purpose is to bring SQL expressive power to manipulating text data using the Linux command line. # -# Full Documentation and details in https://github.com/harelba/q +# Full Documentation and details in http://harelba.github.io/q/ # # Run with --help for command line details # -q_version = "1.4.0" +q_version = "1.4.1" import os import sys @@ -115,7 +115,7 @@ parser = OptionParser(usage=""" This example will output the total size in MB per user+group in the /tmp subtree - See the help or https://github.com/harelba/q for more details. + See the help or https://github.com/harelba/q/ for more details. """) #----------------------------------------------- @@ -888,10 +888,16 @@ def determine_max_col_lengths(m): max_lengths[col_index] = new_len return max_lengths +def print_credentials(): + print >>sys.stderr,"q version %s" % q_version + print >>sys.stderr,"Copyright (C) 2012-2014 Harel Ben-Attia (harelba@gmail.com, @harelba on twitter)" + print >>sys.stderr,"http://harelba.github.io/q/" + print >>sys.stderr + (options, args) = parser.parse_args() if options.version: - print "q version %s" % q_version + print_credentials() sys.exit(0) if len(args) > 1: @@ -899,6 +905,7 @@ if len(args) > 1: sys.exit(1) if len(args) == 0 and options.query_filename is None: + print_credentials() print >>sys.stderr,"Must provide a query in the command line, or through the a file with the -f parameter" sys.exit(1) |