Exemple #1
0
def main():
    parser = create_parser(); 
    (options, args) = parser.parse_args()

    record = RecordSpec(xml = sys.stdin.read())

    if args:
        editDict(args, record.dict["record"], options)
    if options.DEBUG:
        print "New Record:\n%s" % record.dict
        record.pprint()

    record.parseDict(record.dict)
    s = record.toxml()
    sys.stdout.write(s)
Exemple #2
0
def main():
    parser = create_parser(); 
    (options, args) = parser.parse_args()

    stdin = sys.stdin.read()
    
    record = RecordSpec(xml = stdin)
    
    if not record.dict.has_key("record"):
        raise "RecordError", "Input record does not have 'record' tag."

    if options.DEBUG: 
        record.pprint()
        print "#####################################################"

    printRec(record, args, options)