--- /dev/null
+from wizard import deploy, command
+
+def main(argv, baton):
+ options, args = parse_args(argv, baton)
+ dir = args[0]
+ deployment = deploy.ProductionCopy(dir)
+ print deployment.dsn.database
+
+def parse_args(argv, baton):
+ usage = """usage: %prog database DIR
+
+Prints the name of the database an application is using.
+Maybe in the future this will print more information."""
+ parser = command.WizardOptionParser(usage)
+ options, args = parser.parse_all(argv)
+ if len(args) > 1:
+ parser.error("too many arguments")
+ if len(args) == 0:
+ parser.error("must specify directory")
+ return options, args