annotate piecrust/plugins/builtin.py @ 854:08e02c2a2a1a

core: Keep refactoring, this time to prepare for generator sources. - Make a few APIs simpler. - Content pipelines create their own jobs, so that generator sources can keep aborting in `getContents`, but rely on their pipeline to generate pages for baking.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 04 Jun 2017 23:34:28 -0700
parents 4850f8c21b6e
children 58ae026b4c31
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
aaa8fb7c8918 Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1 from piecrust.plugins.base import PieCrustPlugin
aaa8fb7c8918 Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2
aaa8fb7c8918 Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3
aaa8fb7c8918 Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
4 class BuiltInPlugin(PieCrustPlugin):
305
9ae23409d6e9 plugins: Change how plugins are loaded. Add a `plugins` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 302
diff changeset
5 name = '__builtin__'
1
aaa8fb7c8918 Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6
aaa8fb7c8918 Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7 def getCommands(self):
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
8 from piecrust.commands.base import HelpCommand
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
9 from piecrust.commands.builtin.admin import AdministrationPanelCommand
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
10 from piecrust.commands.builtin.baking import (
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
11 BakeCommand, ShowRecordCommand)
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
12 from piecrust.commands.builtin.info import (
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
13 RootCommand, ShowConfigCommand,
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
14 FindCommand, ShowSourcesCommand, ShowRoutesCommand,
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
15 ShowPathsCommand)
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
16 from piecrust.commands.builtin.plugins import PluginsCommand
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
17 from piecrust.commands.builtin.publishing import PublishCommand
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
18 from piecrust.commands.builtin.scaffolding import PrepareCommand
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
19 from piecrust.commands.builtin.serving import (ServeCommand)
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
20 from piecrust.commands.builtin.themes import (ThemesCommand)
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
21 from piecrust.commands.builtin.util import (
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
22 InitCommand, PurgeCommand, ImportCommand)
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
23
1
aaa8fb7c8918 Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
24 return [
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
25 InitCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
26 ImportCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
27 HelpCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
28 RootCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
29 PurgeCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
30 ShowConfigCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
31 FindCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
32 PrepareCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
33 ShowSourcesCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
34 ShowRoutesCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
35 ShowPathsCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
36 ThemesCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
37 PluginsCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
38 BakeCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
39 ShowRecordCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
40 ServeCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
41 AdministrationPanelCommand(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
42 PublishCommand()]
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
43
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
44 def getCommandExtensions(self):
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
45 from piecrust.commands.builtin.scaffolding import (
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
46 DefaultPrepareTemplatesCommandExtension,
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
47 UserDefinedPrepareTemplatesCommandExtension,
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
48 DefaultPrepareTemplatesHelpTopic)
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
49
100
69d5eecfa449 Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents: 76
diff changeset
50 return [
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
51 DefaultPrepareTemplatesCommandExtension(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
52 UserDefinedPrepareTemplatesCommandExtension(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
53 DefaultPrepareTemplatesHelpTopic()]
1
aaa8fb7c8918 Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
54
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
55 def getSources(self):
852
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
56 from piecrust.sources.autoconfig import (
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
57 AutoConfigContentSource, OrderedContentSource)
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
58 from piecrust.sources.blogarchives import BlogArchivesSource
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
59 from piecrust.sources.default import DefaultContentSource
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
60 from piecrust.sources.fs import FSContentSource
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
61 from piecrust.sources.posts import (
852
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
62 FlatPostsSource, ShallowPostsSource, HierarchyPostsSource)
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
63 from piecrust.sources.prose import ProseSource
852
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
64 from piecrust.sources.taxonomy import TaxonomySource
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
65
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
66 return [
852
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
67 AutoConfigContentSource,
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
68 BlogArchivesSource,
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
69 DefaultContentSource,
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
70 FSContentSource,
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
71 FlatPostsSource,
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
72 HierarchyPostsSource,
852
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
73 OrderedContentSource,
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
74 ProseSource,
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
75 ShallowPostsSource,
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
76 TaxonomySource]
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
77
852
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
78 def getPipelines(self):
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
79 from piecrust.pipelines.page import PagePipeline
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
80 from piecrust.pipelines.asset import AssetPipeline
854
08e02c2a2a1a core: Keep refactoring, this time to prepare for generator sources.
Ludovic Chabant <ludovic@chabant.com>
parents: 852
diff changeset
81 from piecrust.sources.taxonomy import TaxonomyPipeline
08e02c2a2a1a core: Keep refactoring, this time to prepare for generator sources.
Ludovic Chabant <ludovic@chabant.com>
parents: 852
diff changeset
82 from piecrust.sources.blogarchives import BlogArchivesPipeline
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
83
711
ab5c6a8ae90a bake: Replace hard-coded taxonomy support with "generator" system.
Ludovic Chabant <ludovic@chabant.com>
parents: 694
diff changeset
84 return [
852
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
85 PagePipeline,
854
08e02c2a2a1a core: Keep refactoring, this time to prepare for generator sources.
Ludovic Chabant <ludovic@chabant.com>
parents: 852
diff changeset
86 AssetPipeline,
08e02c2a2a1a core: Keep refactoring, this time to prepare for generator sources.
Ludovic Chabant <ludovic@chabant.com>
parents: 852
diff changeset
87 TaxonomyPipeline,
08e02c2a2a1a core: Keep refactoring, this time to prepare for generator sources.
Ludovic Chabant <ludovic@chabant.com>
parents: 852
diff changeset
88 BlogArchivesPipeline]
711
ab5c6a8ae90a bake: Replace hard-coded taxonomy support with "generator" system.
Ludovic Chabant <ludovic@chabant.com>
parents: 694
diff changeset
89
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
90 def getDataProviders(self):
854
08e02c2a2a1a core: Keep refactoring, this time to prepare for generator sources.
Ludovic Chabant <ludovic@chabant.com>
parents: 852
diff changeset
91 from piecrust.dataproviders.pageiterator import \
08e02c2a2a1a core: Keep refactoring, this time to prepare for generator sources.
Ludovic Chabant <ludovic@chabant.com>
parents: 852
diff changeset
92 PageIteratorDataProvider
08e02c2a2a1a core: Keep refactoring, this time to prepare for generator sources.
Ludovic Chabant <ludovic@chabant.com>
parents: 852
diff changeset
93 from piecrust.dataproviders.blog import BlogDataProvider
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
94
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
95 return [
854
08e02c2a2a1a core: Keep refactoring, this time to prepare for generator sources.
Ludovic Chabant <ludovic@chabant.com>
parents: 852
diff changeset
96 PageIteratorDataProvider,
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
97 BlogDataProvider]
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
98
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
99 def getTemplateEngines(self):
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
100 from piecrust.templating.jinjaengine import JinjaTemplateEngine
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
101 from piecrust.templating.pystacheengine import PystacheTemplateEngine
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
102
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
103 return [
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
104 JinjaTemplateEngine(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
105 PystacheTemplateEngine()]
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
106
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
107 def getFormatters(self):
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
108 from piecrust.formatting.hoedownformatter import HoedownFormatter
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
109 from piecrust.formatting.markdownformatter import MarkdownFormatter
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
110 from piecrust.formatting.textileformatter import TextileFormatter
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
111 from piecrust.formatting.smartypantsformatter import (
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
112 SmartyPantsFormatter)
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
113
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
114 return [
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
115 HoedownFormatter(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
116 MarkdownFormatter(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
117 SmartyPantsFormatter(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
118 TextileFormatter()]
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
119
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
120 def getProcessors(self):
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
121 from piecrust.processing.compass import CompassProcessor
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
122 from piecrust.processing.compressors import (
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
123 CleanCssProcessor, UglifyJSProcessor)
852
4850f8c21b6e core: Start of the big refactor for PieCrust 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents: 823
diff changeset
124 from piecrust.processing.copy import CopyFileProcessor
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
125 from piecrust.processing.less import LessProcessor
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
126 from piecrust.processing.pygments_style import PygmentsStyleProcessor
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
127 from piecrust.processing.requirejs import RequireJSProcessor
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
128 from piecrust.processing.sass import SassProcessor
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
129 from piecrust.processing.sitemap import SitemapProcessor
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
130 from piecrust.processing.util import ConcatProcessor
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
131
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
132 return [
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
133 CopyFileProcessor(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
134 ConcatProcessor(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
135 PygmentsStyleProcessor(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
136 CompassProcessor(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
137 LessProcessor(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
138 SassProcessor(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
139 RequireJSProcessor(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
140 SitemapProcessor(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
141 CleanCssProcessor(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
142 UglifyJSProcessor()]
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 1
diff changeset
143
60
6e60e0fef2be Add `import` command, Jekyll importer.
Ludovic Chabant <ludovic@chabant.com>
parents: 34
diff changeset
144 def getImporters(self):
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
145 from piecrust.importing.jekyll import JekyllImporter
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
146 from piecrust.importing.piecrust import PieCrust1Importer
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
147 from piecrust.importing.wordpress import WordpressXmlImporter
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
148
60
6e60e0fef2be Add `import` command, Jekyll importer.
Ludovic Chabant <ludovic@chabant.com>
parents: 34
diff changeset
149 return [
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
150 PieCrust1Importer(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
151 JekyllImporter(),
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
152 WordpressXmlImporter()]
60
6e60e0fef2be Add `import` command, Jekyll importer.
Ludovic Chabant <ludovic@chabant.com>
parents: 34
diff changeset
153
613
e2e955a3bb25 publish: Add publish command.
Ludovic Chabant <ludovic@chabant.com>
parents: 588
diff changeset
154 def getPublishers(self):
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
155 from piecrust.publishing.sftp import SftpPublisher
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
156 from piecrust.publishing.shell import ShellCommandPublisher
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
157 from piecrust.publishing.rsync import RsyncPublisher
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
158
613
e2e955a3bb25 publish: Add publish command.
Ludovic Chabant <ludovic@chabant.com>
parents: 588
diff changeset
159 return [
823
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
160 ShellCommandPublisher,
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
161 SftpPublisher,
ad12a942cadd internal: Import things in the builtin plugin only when needed.
Ludovic Chabant <ludovic@chabant.com>
parents: 758
diff changeset
162 RsyncPublisher]
613
e2e955a3bb25 publish: Add publish command.
Ludovic Chabant <ludovic@chabant.com>
parents: 588
diff changeset
163