Reference Source
import WARCNaming from 'squidwarc/lib/utils/warcNaming.js'
public class | source

WARCNaming

Class that initializes the warc naming function used when generating the warcs

Static Method Summary

Static Public Methods
public static

Returns a function that creates a WARC filename based on the first URL supplied to returned function

public static

Configures the function that produces the WARC(s) name

public static

suppliedWarcName(outPath: string, warcName: string): function(): string

Returns a function that provides the full path to WARC file being written to

public static

warcNamePerURL(outPath: string): function(seedURL: string): string

Returns a function that will concatenate the output path with the filenamified seedURL producing the full path to WARC of the page being preserved

Static Public Methods

public static apndWarcNamePerURL(outPath: string): function(seedURL: string): string source

Returns a function that creates a WARC filename based on the first URL supplied to returned function

Params:

NameTypeAttributeDescription
outPath string

Return:

function(seedURL: string): string

public static getWarcNamingFunction(options: CrawlConfig): * source

Configures the function that produces the WARC(s) name

Params:

NameTypeAttributeDescription
options CrawlConfig

Return:

*

public static suppliedWarcName(outPath: string, warcName: string): function(): string source

Returns a function that provides the full path to WARC file being written to

Params:

NameTypeAttributeDescription
outPath string

the full path to the WARC file output directory

warcName string

the name of the WARC file to create

Return:

function(): string

public static warcNamePerURL(outPath: string): function(seedURL: string): string source

Returns a function that will concatenate the output path with the filenamified seedURL producing the full path to WARC of the page being preserved

Params:

NameTypeAttributeDescription
outPath string

the full path to the WARC file output directory

Return:

function(seedURL: string): string