Exemplo n.º 1
0
def readIni():
    global parms, verbose, talky, pleaseCheckCompilation, pleaseRewriteTex, pleaseProduceTrimmedX10, quietCheck
    ini = '../bard-pguide.ini'
    if '-i' in sys.argv:  # use the next argument as the ini file path?
        ini = sys.argv[1 + sys.argv.index('-i')]
    parms = osutils.commandparms(KEYS, ini, ENV, CMDFLAGS)
    if '-t' in sys.argv or '-talky' in sys.argv:
        talky = True
    if '-v' in sys.argv or '-verbose' in sys.argv:
        verbose = True
        for key in parms:
            print(key + " => " + parms[key])
    else:
        verbose = False
    pleaseRewriteTex = not ("-noTex" in sys.argv)
    pleaseProduceTrimmedX10 = not ("-noX10" in sys.argv)
    pleaseCheckCompilation = not ("-noCheck" in sys.argv)
    silent = "-silent" in sys.argv
    quietCheck = "-qc" in sys.argv
    if verbose:
        print("pleaseRewriteTex = " + str(pleaseRewriteTex))
        print("pleaseProduceTrimmedX10 = " + str(pleaseProduceTrimmedX10))
        print("pleaseCheckCompilation = " + str(pleaseCheckCompilation))
Exemplo n.º 2
0
def readIni():
    global parms, verbose, talky, pleaseCheckCompilation, pleaseRewriteTex, pleaseProduceTrimmedX10, quietCheck
    ini = '../bard-pguide.ini'
    if '-i' in sys.argv: # use the next argument as the ini file path?
        ini = sys.argv[1 + sys.argv.index('-i')]
    parms = osutils.commandparms(KEYS, ini, ENV, CMDFLAGS)   
    if '-t' in sys.argv or '-talky' in sys.argv:
        talky = True
    if '-v' in sys.argv or '-verbose' in sys.argv:
        verbose = True
        for key in parms:
            print(key + " => " + parms[key])
    else:
        verbose = False
    pleaseRewriteTex = not ("-noTex" in sys.argv)
    pleaseProduceTrimmedX10 = not ("-noX10" in sys.argv)
    pleaseCheckCompilation = not ("-noCheck" in sys.argv)
    silent = "-silent" in sys.argv
    quietCheck = "-qc" in sys.argv
    if verbose:
        print("pleaseRewriteTex = " + str(pleaseRewriteTex))
        print("pleaseProduceTrimmedX10 = " + str(pleaseProduceTrimmedX10))
        print("pleaseCheckCompilation = " + str(pleaseCheckCompilation))
Exemplo n.º 3
0
        'X10PUBLIC': 'dirs.x10public'}
# command line flags and the corresponding key names, plus one for the .ini itself
CMDFLAGS = {'-l': 'dirs.latex', 
            '-o': 'dirs.oldlatex',
            '-c': 'dirs.x10common',
            '-p': 'dirs.x10public',
            '-i': 'ini',
            '-v': 'verbose'}

if __name__ == '__main__':
    print("Please use bimport!");
    raise Error("This is the old version")
    ini = './pguide.ini'
    if '-i' in sys.argv: # use the next argument as the ini file path?
        ini = sys.argv[1 + sys.argv.index('-i')]
    parms = commandparms(KEYS, ini, ENV, CMDFLAGS)   
    if '-v' in sys.argv:
        verbose = True
        for key in parms:
            print(key + " => " + parms[key])
    else:
        verbose = False
        
    latexdir = parms["dirs.latex"]
    oldlatexdir = parms["dirs.oldlatex"]
    x10publicdir = parms["dirs.x10public"]
    x10commondir = parms["dirs.x10common"]

    print("Filter tex in " + latexdir +
          ", backup in "+ oldlatexdir +
          ", x10 from "+ x10commondir +".")