#!/usr/bin/env python import sys #Version 4/ 7/94 # Set up dbinst parameter file #Synopsis: dbinst.csh feakey from to remdup allowp alshift """ ensure that there are enough command line arguments to parse """ if len(sys.argv) < 7: print("Usage: dbinst.py FEAKEY FROM TO REMDUP ALLOWP ALSHIFT") exit(); #------ Convert arguments to variables ------- FEAKEY = sys.argv[1] FROM = sys.argv[2] TO = sys.argv[3] REMDUP = sys.argv[4] ALLOWP = sys.argv[5] ALSHIFT = sys.argv[6] # --------- Set parameters --------------- #the name of the feature to use. print FEAKEY # "from" and "to" to write the instructions. print FROM + " " + TO #"beos" means begin, end, object, space instructions written print "beos" #"os" means object and space length file written print "os" #"r" means remove obviously duplicated instructions. print REMDUP #"f" = find-anyway. 's'= select AGAINST feature if either end missing print ALLOWP #alignment shift: amount to shift the zero base. print ALSHIFT