view piecrust/publishing/shell.py @ 635:00a5accb8aad

Added tag 2.0.0b4 for changeset 14eec6faf10b
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 09 Feb 2016 21:39:15 -0800
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