Class HtmlSource<TOutput>

Reads one HTML resource, converts it to Markdown, and emits one Microsoft.Extensions.DataIngestion.IngestionDocument.

Inherited Members
Namespace: ETLBox.AI
Assembly: ETLBox.AI.Html.dll
Syntax
    public class HtmlSource<TOutput> : DataFlowStreamSource<TOutput>, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TOutput

Type of outgoing data.

Examples
var source = new HtmlSource("page.html");
var chunk = new ChunkTransformation {
    DocumentPropertyName = "Document"
};
source.LinkTo(chunk);

Constructors

HtmlSource()

Declaration
    public HtmlSource()

HtmlSource(string)

Declaration
    public HtmlSource(string uri)
Parameters
TypeNameDescription
stringuri

The source of the file. This can be a filename or a web url.Uri

HtmlSource(string, ResourceType)

Declaration
    public HtmlSource(string uri, ResourceType resourceType)
Parameters
TypeNameDescription
stringuri

The source of the file. This can be a filename or a web url.Uri

ResourceTyperesourceType

Specifies if data is loaded from a file, a web endpoint or other storage types (e.g. Azure Blob Storage)

Properties

ConverterConfig

Configuration used by ReverseMarkdown to convert the HTML resource to Markdown.

Declaration
    public Config ConverterConfig { get; set; }
Property Value
TypeDescription
Config

ResultSelector

Creates the outgoing element from the parsed document and the metadata of the current resource. When set, this function is used instead of the ExpandoObject default or the Microsoft.Extensions.DataIngestion.IngestionDocument default.

Declaration
    public Func<IngestionDocument, StreamMetaData, TOutput> ResultSelector { get; set; }
Property Value
TypeDescription
Func<IngestionDocument, StreamMetaData, TOutput>

Methods

CloseReader()

Declaration
    protected override void CloseReader()
Overrides

InitReader()

Declaration
    protected override void InitReader()
Overrides

ReadAllRecords()

Declaration
    protected override void ReadAllRecords()
Overrides

Implements