comparison piecrust/plugins/builtin.py @ 305:9ae23409d6e9

plugins: Change how plugins are loaded. Add a `plugins` command.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 22 Mar 2015 22:20:18 -0700
parents 103abb08755e
children ee3fe63cc51d
comparison
equal deleted inserted replaced
304:34ef6a2a0c97 305:9ae23409d6e9
2 from piecrust.commands.builtin.baking import ( 2 from piecrust.commands.builtin.baking import (
3 BakeCommand, ShowRecordCommand) 3 BakeCommand, ShowRecordCommand)
4 from piecrust.commands.builtin.info import ( 4 from piecrust.commands.builtin.info import (
5 RootCommand, ShowConfigCommand, 5 RootCommand, ShowConfigCommand,
6 FindCommand, ShowSourcesCommand, ShowRoutesCommand, ShowPathsCommand) 6 FindCommand, ShowSourcesCommand, ShowRoutesCommand, ShowPathsCommand)
7 from piecrust.commands.builtin.plugins import PluginsCommand
7 from piecrust.commands.builtin.scaffolding import ( 8 from piecrust.commands.builtin.scaffolding import (
8 PrepareCommand, 9 PrepareCommand,
9 DefaultPrepareTemplatesCommandExtension, 10 DefaultPrepareTemplatesCommandExtension,
10 UserDefinedPrepareTemplatesCommandExtension, 11 UserDefinedPrepareTemplatesCommandExtension,
11 DefaultPrepareTemplatesHelpTopic) 12 DefaultPrepareTemplatesHelpTopic)
39 from piecrust.templating.jinjaengine import JinjaTemplateEngine 40 from piecrust.templating.jinjaengine import JinjaTemplateEngine
40 from piecrust.templating.pystacheengine import PystacheTemplateEngine 41 from piecrust.templating.pystacheengine import PystacheTemplateEngine
41 42
42 43
43 class BuiltInPlugin(PieCrustPlugin): 44 class BuiltInPlugin(PieCrustPlugin):
44 def __init__(self): 45 name = '__builtin__'
45 super(BuiltInPlugin, self).__init__()
46 self.name = '__builtin__'
47 46
48 def getCommands(self): 47 def getCommands(self):
49 return [ 48 return [
50 InitCommand(), 49 InitCommand(),
51 ImportCommand(), 50 ImportCommand(),
57 PrepareCommand(), 56 PrepareCommand(),
58 ShowSourcesCommand(), 57 ShowSourcesCommand(),
59 ShowRoutesCommand(), 58 ShowRoutesCommand(),
60 ShowPathsCommand(), 59 ShowPathsCommand(),
61 ThemesCommand(), 60 ThemesCommand(),
61 PluginsCommand(),
62 BakeCommand(), 62 BakeCommand(),
63 ShowRecordCommand(), 63 ShowRecordCommand(),
64 ServeCommand()] 64 ServeCommand()]
65 65
66 def getCommandExtensions(self): 66 def getCommandExtensions(self):