Mercurial > piecrust2
view piecrust/publishing/shell.py @ 857:d231a10d18f9
refactor: Make the data providers and blog archives source functional.
Also, because of a behaviour change in Jinja, the blog archives sources is
now offering monthly archives by itself.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 08 Jun 2017 08:49:33 -0700 |
parents | 42da89d8bd51 |
children | 13e8b50a2113 |
line wrap: on
line source
import shlex from piecrust.publishing.base import ShellCommandPublisherBase class ShellCommandPublisher(ShellCommandPublisherBase): PUBLISHER_NAME = 'shell' def _getCommandArgs(self, ctx): target_cmd = self.getConfigValue('command') if not target_cmd: raise Exception("No command specified for publish target: %s" % self.target) args = shlex.split(target_cmd) return args