ReadApplicationInput Class

Summary

Reads text provided to the application on startup.
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Modules.IO
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IModule"] click Interface0 "/api/Wyam.Common.Modules/IModule" Type["ReadApplicationInput"] class Type type-node

Syntax

public class ReadApplicationInput : IModule

Examples

An example of piping the output of a prior executable to Wyam.
AnotherProgram.exe | Wyam.exe
An example of redirecting the contents of a file to Wyam.
Wyam.exe < my_initial_document.txt
This would read the application input, and write it to a file called "stdin.html"
Pipelines.Add("StandardInputDoc",
   ReadApplicationInput(),
   Meta("WritePath", "stdin.html"),
   WriteFiles()
);

Remarks

This modules creates a single document from text provided to Wyam on startup. In most cases, this will be text or file contents "piped" to the Wyam.exe via the command line from a file or prior chained executable. Also known as "Standard Input" or "STDIN".

Methods

Name Value Summary
Execute(IReadOnlyList<IDocument>, IExecutionContext) IEnumerable<IDocument>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
GitHub