#! /usr/bin/env python
# pymakexml

__doc__ = \
"""Generate vcdimager/dvdauthor XML for an (S)VCD/DVD disc (to replace the
'makexml' shell script).
"""

import sys

from libtovid.disc import Disc

if __name__ == '__main__':
    """Create a Disc with the given options and generate the XML for it."""
    # If no arguments were provided, print usage notes
    # TODO: Proper argument verification
    if len(sys.argv) < 2:
        print "Usage: pymakexml [options] vid1.mpg vid2.mpg ... -out NAME"
        print "Where [options] may be any of the following:"
        print Disc().options.usage()
        print "Please provide an output name with -out."
        sys.exit()

    args = sys.argv[1:]
    disc = Disc(args)
    disc.generate()
