minor fiddling with usage.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@191 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
parent
4f3205830a
commit
93d048bf2f
12
ttCompile.py
12
ttCompile.py
@ -23,7 +23,14 @@ usage: %s [-hvbf] [-d output-dir] [-i TTF-input-file] [TTX-file...]
|
||||
import sys, os, getopt
|
||||
from fontTools import ttLib
|
||||
|
||||
options, args = getopt.getopt(sys.argv[1:], "hvbfd:i:")
|
||||
def usage():
|
||||
print __doc__ % sys.argv[0]
|
||||
sys.exit(2)
|
||||
|
||||
try:
|
||||
options, args = getopt.getopt(sys.argv[1:], "hvbfd:i:")
|
||||
except getopt.GetoptError:
|
||||
usage()
|
||||
|
||||
# default values
|
||||
verbose = 0
|
||||
@ -48,8 +55,7 @@ for option, value in options:
|
||||
forceOverwrite = 1
|
||||
|
||||
if not args:
|
||||
print __doc__ % sys.argv[0]
|
||||
sys.exit(2)
|
||||
usage()
|
||||
|
||||
if ttInFile and len(args) > 1:
|
||||
print "Must specify exactly one TTX file (or directory) when using -i"
|
||||
|
12
ttDump.py
12
ttDump.py
@ -31,7 +31,14 @@ usage: %s [-hvisf] [-t <table>] [-x <table>] [-d <output-dir>] TrueType-file(s)
|
||||
import sys, os, getopt
|
||||
from fontTools import ttLib
|
||||
|
||||
options, args = getopt.getopt(sys.argv[1:], "hvisft:x:d:")
|
||||
def usage():
|
||||
print __doc__ % sys.argv[0]
|
||||
sys.exit(2)
|
||||
|
||||
try:
|
||||
options, args = getopt.getopt(sys.argv[1:], "hvisft:x:d:")
|
||||
except getopt.GetoptError:
|
||||
usage()
|
||||
|
||||
# default values
|
||||
verbose = 0
|
||||
@ -76,8 +83,7 @@ if tables and skipTables:
|
||||
sys.exit(2)
|
||||
|
||||
if not args:
|
||||
print __doc__ % sys.argv[0]
|
||||
sys.exit(2)
|
||||
usage()
|
||||
|
||||
for ttPath in args:
|
||||
path, ext = os.path.splitext(ttPath)
|
||||
|
Loading…
x
Reference in New Issue
Block a user