splice.py 423 Bytes
Newer Older
1
#!/usr/bin/env python
Sam Ruby's avatar
Sam Ruby committed
2 3 4 5 6 7
"""
Main program to run just the splice portion of planet
"""

import os.path
import sys
Sam Ruby's avatar
Sam Ruby committed
8
from planet import splice, config
Sam Ruby's avatar
Sam Ruby committed
9 10 11 12

if __name__ == '__main__':

    if len(sys.argv) == 2 and os.path.isfile(sys.argv[1]):
Sam Ruby's avatar
Sam Ruby committed
13 14
        config.load(sys.argv[1])
        doc = splice.splice()
Sam Ruby's avatar
Sam Ruby committed
15
        splice.apply(doc.toxml('utf-8'))
Sam Ruby's avatar
Sam Ruby committed
16 17 18
    else:
        print "Usage:"
        print "  python %s config.ini" % sys.argv[0]