Mercurial > piecrust2
diff piecrust/sources/interfaces.py @ 852:4850f8c21b6e
core: Start of the big refactor for PieCrust 3.0.
* Everything is a `ContentSource`, including assets directories.
* Most content sources are subclasses of the base file-system source.
* A source is processed by a "pipeline", and there are 2 built-in pipelines,
one for assets and one for pages. The asset pipeline is vaguely functional,
but the page pipeline is completely broken right now.
* Rewrite the baking process as just running appropriate pipelines on each
content item. This should allow for better parallelization.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 17 May 2017 00:11:48 -0700 |
parents | 0c74a6c4533d |
children | f070a4fc033c |
line wrap: on
line diff
--- a/piecrust/sources/interfaces.py Sat Apr 29 21:42:22 2017 -0700 +++ b/piecrust/sources/interfaces.py Wed May 17 00:11:48 2017 -0700 @@ -16,27 +16,10 @@ def getTailIterator(self, it): raise NotImplementedError() - def getPaginationFilter(self, page): - raise NotImplementedError() - def getSettingAccessor(self): raise NotImplementedError() -class IListableSource(object): - """ Defines the interface for a source that can be iterated on in a - hierarchical manner, for use with the `family` data endpoint. - """ - def listPath(self, rel_path): - raise NotImplementedError() - - def getDirpath(self, rel_path): - raise NotImplementedError() - - def getBasename(self, rel_path): - raise NotImplementedError() - - class IPreparingSource(object): """ Defines the interface for a source whose pages can be created by the `chef prepare` command. @@ -44,11 +27,13 @@ def setupPrepareParser(self, parser, app): raise NotImplementedError() - def buildMetadata(self, args): + def createContent(self, args): raise NotImplementedError() class InteractiveField(object): + """ A field to display in the administration web UI. + """ TYPE_STRING = 0 TYPE_INT = 1 @@ -59,6 +44,9 @@ class IInteractiveSource(object): + """ A content source that a user can interact with in the administration + web UI. + """ def getInteractiveFields(self): raise NotImplementedError()