hakyll-process-0.0.1.0: Hakyll compiler for arbitrary external processes.

Safe HaskellNone
LanguageHaskell2010

Hakyll.Process

Synopsis

Documentation

newExtension :: String -> FilePath -> FilePath Source #

Helper function to indicate that the output file name is the same as the input file name with a new extension Note: like hakyll, assumes that no "." is present in the extension

newExtOutFilePath :: String -> CompilerOut Source #

Helper function to indicate that the output file name is the same as the input file name with a new extension Note: like hakyll, assumes that no "." is present in the extension

execCompiler :: ExecutableName -> CompilerOut -> Compiler (Item ByteString) Source #

Calls the external compiler with no arguments. Returns the output contents as a ByteString. If an error occurs this raises an exception.

execCompilerWith :: ExecutableName -> ExecutableArgs -> CompilerOut -> Compiler (Item ByteString) Source #

Calls the external compiler with the provided arguments. Returns the output contents as a ByteString. If an error occurs this raises an exception.

data CompilerOut Source #

Expected output from the external compiler.

Constructors

CStdOut

Compiler uses stdout as the output type.

COutFile OutFilePath

Compiler outputs to a specific target file on the filesystem.

data ExecutableArg Source #

Arguments to provide to the process

Constructors

HakFilePath

Abstract representation of the path to the Hakyll item.

ProcArg String

Literal argument to provide to the other process.

type ExecutableArgs = [ExecutableArg] Source #

Arguments to pass to the executable. Empty if none.

data ExecutableName Source #

Name of the executable if in the PATH or path to it if not

data OutFilePath Source #

Specifies the output file path of a process.

Constructors

SpecificPath FilePath

A specific, known filepath.

RelativePath (FilePath -> FilePath)

Indicates that the output path is related to the input path.