Mercurial > piecrust2
annotate piecrust/plugins/builtin.py @ 148:432cd534ce08
Add `autoconfig` page source.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 29 Nov 2014 21:00:54 -0800 |
parents | f49fcf9448df |
children | 55910ab4bfea |
rev | line source |
---|---|
60
6e60e0fef2be
Add `import` command, Jekyll importer.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
1 from piecrust.commands.base import HelpCommand |
3
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
2 from piecrust.commands.builtin.baking import (BakeCommand, ShowRecordCommand) |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
3 from piecrust.commands.builtin.info import (RootCommand, ShowConfigCommand, |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
4 FindCommand, ShowRoutesCommand, ShowPathsCommand) |
100
69d5eecfa449
Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents:
76
diff
changeset
|
5 from piecrust.commands.builtin.scaffolding import (PrepareCommand, |
69d5eecfa449
Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents:
76
diff
changeset
|
6 DefaultPrepareTemplatesCommandExtension, |
69d5eecfa449
Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents:
76
diff
changeset
|
7 DefaultPrepareTemplatesHelpTopic) |
3
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
8 from piecrust.commands.builtin.serving import (ServeCommand) |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
9 from piecrust.commands.builtin.util import (InitCommand, PurgeCommand, |
100
69d5eecfa449
Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents:
76
diff
changeset
|
10 ImportCommand) |
3
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
11 from piecrust.data.provider import (IteratorDataProvider, BlogDataProvider) |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
12 from piecrust.formatting.markdownformatter import MarkdownFormatter |
124
f49fcf9448df
Add Textile formatter.
Ludovic Chabant <ludovic@chabant.com>
parents:
117
diff
changeset
|
13 from piecrust.formatting.textileformatter import TextileFormatter |
76
fdb08d986384
Add SmartyPants formatting.
Ludovic Chabant <ludovic@chabant.com>
parents:
62
diff
changeset
|
14 from piecrust.formatting.smartypantsformatter import SmartyPantsFormatter |
60
6e60e0fef2be
Add `import` command, Jekyll importer.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
15 from piecrust.importing.jekyll import JekyllImporter |
62
52e4d9a1f917
Simple importer for PieCrust 1 websites.
Ludovic Chabant <ludovic@chabant.com>
parents:
60
diff
changeset
|
16 from piecrust.importing.piecrust import PieCrust1Importer |
1
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
17 from piecrust.plugins.base import PieCrustPlugin |
3
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
18 from piecrust.processing.base import CopyFileProcessor |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
19 from piecrust.processing.less import LessProcessor |
117
6827dcc9d3fb
Changes to the asset processing pipeline:
Ludovic Chabant <ludovic@chabant.com>
parents:
100
diff
changeset
|
20 from piecrust.processing.requirejs import RequireJSProcessor |
34
bdb103c57168
Add `sitemap` processor.
Ludovic Chabant <ludovic@chabant.com>
parents:
3
diff
changeset
|
21 from piecrust.processing.sitemap import SitemapProcessor |
3
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
22 from piecrust.sources.base import DefaultPageSource |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
23 from piecrust.sources.posts import (FlatPostsSource, ShallowPostsSource, |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
24 HierarchyPostsSource) |
148
432cd534ce08
Add `autoconfig` page source.
Ludovic Chabant <ludovic@chabant.com>
parents:
124
diff
changeset
|
25 from piecrust.sources.autoconfig import AutoConfigSource |
3
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
26 from piecrust.templating.jinjaengine import JinjaTemplateEngine |
1
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
27 |
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
28 |
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
29 class BuiltInPlugin(PieCrustPlugin): |
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
30 def __init__(self): |
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
31 super(BuiltInPlugin, self).__init__() |
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
32 self.name = '__builtin__' |
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
33 |
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
34 def getCommands(self): |
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
35 return [ |
aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
36 InitCommand(), |
60
6e60e0fef2be
Add `import` command, Jekyll importer.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
37 ImportCommand(), |
6e60e0fef2be
Add `import` command, Jekyll importer.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
38 HelpCommand(), |
3
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
39 RootCommand(), |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
40 PurgeCommand(), |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
41 ShowConfigCommand(), |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
42 FindCommand(), |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
43 PrepareCommand(), |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
44 ShowRoutesCommand(), |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
45 ShowPathsCommand(), |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
46 BakeCommand(), |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
47 ShowRecordCommand(), |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
48 ServeCommand()] |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
49 |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
50 def getCommandExtensions(self): |
100
69d5eecfa449
Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents:
76
diff
changeset
|
51 return [ |
69d5eecfa449
Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents:
76
diff
changeset
|
52 DefaultPrepareTemplatesCommandExtension(), |
69d5eecfa449
Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents:
76
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): |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
56 return [ |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
57 DefaultPageSource, |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
58 FlatPostsSource, |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
59 ShallowPostsSource, |
148
432cd534ce08
Add `autoconfig` page source.
Ludovic Chabant <ludovic@chabant.com>
parents:
124
diff
changeset
|
60 HierarchyPostsSource, |
432cd534ce08
Add `autoconfig` page source.
Ludovic Chabant <ludovic@chabant.com>
parents:
124
diff
changeset
|
61 AutoConfigSource] |
3
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
62 |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
63 def getDataProviders(self): |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
64 return [ |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
65 IteratorDataProvider, |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
66 BlogDataProvider] |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
67 |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
68 def getTemplateEngines(self): |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
69 return [ |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
70 JinjaTemplateEngine()] |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
71 |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
72 def getFormatters(self): |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
73 return [ |
76
fdb08d986384
Add SmartyPants formatting.
Ludovic Chabant <ludovic@chabant.com>
parents:
62
diff
changeset
|
74 MarkdownFormatter(), |
124
f49fcf9448df
Add Textile formatter.
Ludovic Chabant <ludovic@chabant.com>
parents:
117
diff
changeset
|
75 SmartyPantsFormatter(), |
f49fcf9448df
Add Textile formatter.
Ludovic Chabant <ludovic@chabant.com>
parents:
117
diff
changeset
|
76 TextileFormatter()] |
3
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
77 |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
78 def getProcessors(self): |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
79 return [ |
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
80 CopyFileProcessor(), |
34
bdb103c57168
Add `sitemap` processor.
Ludovic Chabant <ludovic@chabant.com>
parents:
3
diff
changeset
|
81 LessProcessor(), |
117
6827dcc9d3fb
Changes to the asset processing pipeline:
Ludovic Chabant <ludovic@chabant.com>
parents:
100
diff
changeset
|
82 RequireJSProcessor(), |
34
bdb103c57168
Add `sitemap` processor.
Ludovic Chabant <ludovic@chabant.com>
parents:
3
diff
changeset
|
83 SitemapProcessor()] |
3
f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents:
1
diff
changeset
|
84 |
60
6e60e0fef2be
Add `import` command, Jekyll importer.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
85 def getImporters(self): |
6e60e0fef2be
Add `import` command, Jekyll importer.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
86 return [ |
62
52e4d9a1f917
Simple importer for PieCrust 1 websites.
Ludovic Chabant <ludovic@chabant.com>
parents:
60
diff
changeset
|
87 JekyllImporter(), |
52e4d9a1f917
Simple importer for PieCrust 1 websites.
Ludovic Chabant <ludovic@chabant.com>
parents:
60
diff
changeset
|
88 PieCrust1Importer()] |
60
6e60e0fef2be
Add `import` command, Jekyll importer.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
89 |