Mercurial > piecrust2
diff piecrust/sources/default.py @ 926:86b684cc0551
sources: Add `findContentFromPath` API.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 01 Oct 2017 20:37:11 -0700 |
parents | c445a3d5d950 |
children | 23052bf8a62b |
line wrap: on
line diff
--- a/piecrust/sources/default.py Sun Oct 01 20:36:38 2017 -0700 +++ b/piecrust/sources/default.py Sun Oct 01 20:37:11 2017 -0700 @@ -88,6 +88,10 @@ return ContentItem(path, metadata) return None + def findContentFromPath(self, path): + metadata = self._doCreateItemMetadata(path) + return ContentItem(path, metadata) + def setupPrepareParser(self, parser, app): parser.add_argument('uri', help='The URI for the new page.')