diff piecrust/plugins/builtin.py @ 3:f485ba500df3

Gigantic change to basically make PieCrust 2 vaguely functional. - Serving works, with debug window. - Baking works, multi-threading, with dependency handling. - Various things not implemented yet.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 10 Aug 2014 23:43:16 -0700
parents aaa8fb7c8918
children bdb103c57168
line wrap: on
line diff
--- a/piecrust/plugins/builtin.py	Wed Dec 25 22:16:46 2013 -0800
+++ b/piecrust/plugins/builtin.py	Sun Aug 10 23:43:16 2014 -0700
@@ -1,6 +1,18 @@
-from piecrust.commands.builtin.info import RootCommand
-from piecrust.commands.builtin.util import InitCommand
+from piecrust.commands.builtin.baking import (BakeCommand, ShowRecordCommand)
+from piecrust.commands.builtin.info import (RootCommand, ShowConfigCommand,
+        FindCommand, ShowRoutesCommand, ShowPathsCommand)
+from piecrust.commands.builtin.serving import (ServeCommand)
+from piecrust.commands.builtin.util import (InitCommand, PurgeCommand,
+        PrepareCommand)
+from piecrust.data.provider import (IteratorDataProvider, BlogDataProvider)
+from piecrust.formatting.markdownformatter import MarkdownFormatter
 from piecrust.plugins.base import PieCrustPlugin
+from piecrust.processing.base import CopyFileProcessor
+from piecrust.processing.less import LessProcessor
+from piecrust.sources.base import DefaultPageSource
+from piecrust.sources.posts import (FlatPostsSource, ShallowPostsSource,
+        HierarchyPostsSource)
+from piecrust.templating.jinjaengine import JinjaTemplateEngine
 
 
 class BuiltInPlugin(PieCrustPlugin):
@@ -11,5 +23,42 @@
     def getCommands(self):
         return [
                 InitCommand(),
-                RootCommand()]
+                RootCommand(),
+                PurgeCommand(),
+                ShowConfigCommand(),
+                FindCommand(),
+                PrepareCommand(),
+                ShowRoutesCommand(),
+                ShowPathsCommand(),
+                BakeCommand(),
+                ShowRecordCommand(),
+                ServeCommand()]
+
+    def getCommandExtensions(self):
+        return []
 
+    def getSources(self):
+        return [
+                DefaultPageSource,
+                FlatPostsSource,
+                ShallowPostsSource,
+                HierarchyPostsSource]
+
+    def getDataProviders(self):
+        return [
+                IteratorDataProvider,
+                BlogDataProvider]
+
+    def getTemplateEngines(self):
+        return [
+                JinjaTemplateEngine()]
+
+    def getFormatters(self):
+        return [
+                MarkdownFormatter()]
+
+    def getProcessors(self):
+        return [
+                CopyFileProcessor(),
+                LessProcessor()]
+