Mercurial > piecrust2
comparison 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 |
comparison
equal
deleted
inserted
replaced
2:40fa08b261b9 | 3:f485ba500df3 |
---|---|
1 from piecrust.commands.builtin.info import RootCommand | 1 from piecrust.commands.builtin.baking import (BakeCommand, ShowRecordCommand) |
2 from piecrust.commands.builtin.util import InitCommand | 2 from piecrust.commands.builtin.info import (RootCommand, ShowConfigCommand, |
3 FindCommand, ShowRoutesCommand, ShowPathsCommand) | |
4 from piecrust.commands.builtin.serving import (ServeCommand) | |
5 from piecrust.commands.builtin.util import (InitCommand, PurgeCommand, | |
6 PrepareCommand) | |
7 from piecrust.data.provider import (IteratorDataProvider, BlogDataProvider) | |
8 from piecrust.formatting.markdownformatter import MarkdownFormatter | |
3 from piecrust.plugins.base import PieCrustPlugin | 9 from piecrust.plugins.base import PieCrustPlugin |
10 from piecrust.processing.base import CopyFileProcessor | |
11 from piecrust.processing.less import LessProcessor | |
12 from piecrust.sources.base import DefaultPageSource | |
13 from piecrust.sources.posts import (FlatPostsSource, ShallowPostsSource, | |
14 HierarchyPostsSource) | |
15 from piecrust.templating.jinjaengine import JinjaTemplateEngine | |
4 | 16 |
5 | 17 |
6 class BuiltInPlugin(PieCrustPlugin): | 18 class BuiltInPlugin(PieCrustPlugin): |
7 def __init__(self): | 19 def __init__(self): |
8 super(BuiltInPlugin, self).__init__() | 20 super(BuiltInPlugin, self).__init__() |
9 self.name = '__builtin__' | 21 self.name = '__builtin__' |
10 | 22 |
11 def getCommands(self): | 23 def getCommands(self): |
12 return [ | 24 return [ |
13 InitCommand(), | 25 InitCommand(), |
14 RootCommand()] | 26 RootCommand(), |
27 PurgeCommand(), | |
28 ShowConfigCommand(), | |
29 FindCommand(), | |
30 PrepareCommand(), | |
31 ShowRoutesCommand(), | |
32 ShowPathsCommand(), | |
33 BakeCommand(), | |
34 ShowRecordCommand(), | |
35 ServeCommand()] | |
15 | 36 |
37 def getCommandExtensions(self): | |
38 return [] | |
39 | |
40 def getSources(self): | |
41 return [ | |
42 DefaultPageSource, | |
43 FlatPostsSource, | |
44 ShallowPostsSource, | |
45 HierarchyPostsSource] | |
46 | |
47 def getDataProviders(self): | |
48 return [ | |
49 IteratorDataProvider, | |
50 BlogDataProvider] | |
51 | |
52 def getTemplateEngines(self): | |
53 return [ | |
54 JinjaTemplateEngine()] | |
55 | |
56 def getFormatters(self): | |
57 return [ | |
58 MarkdownFormatter()] | |
59 | |
60 def getProcessors(self): | |
61 return [ | |
62 CopyFileProcessor(), | |
63 LessProcessor()] | |
64 |