diff piecrust/commands/builtin/info.py @ 1:aaa8fb7c8918

Re-arranged modules to reduce dependencies to builtin stuff. Added `init` command.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 22 Dec 2013 08:00:24 -0800
parents
children f485ba500df3
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/piecrust/commands/builtin/info.py	Sun Dec 22 08:00:24 2013 -0800
@@ -0,0 +1,19 @@
+import logging
+from piecrust.commands.base import ChefCommand
+
+
+logger = logging.getLogger(__name__)
+
+
+class RootCommand(ChefCommand):
+    def __init__(self):
+        super(RootCommand, self).__init__()
+        self.name = 'root'
+        self.description = "Gets the root directory of the current website."
+
+    def setupParser(self, parser):
+        pass
+
+    def run(self, ctx):
+        logger.info(ctx.app.root)
+