File 'net/urls.tcl' (part of 'Pool_Net')

Description (short)
URL related utilities
Written by
Andreas Kupries
Description
URL related utilities (extraction from documents, split, join, ...)
Depends on
Tcl, cgi
Keywords
URL related utilities, regular expressions (for urls), url splitting, splitting an url into its constituents, url extraction, extraction of urls from text


::pool::urls::GetHostPort (urlvar)

Parse host and port out of the url stored in variable urlvar.
Dangers: Side effect: The extracted information is removed from the given url.
Argument: urlvar Name of the variable containing the url to parse.
Returns: List containing the extracted information in a format suitable for 'array set'.

::pool::urls::GetUPHP (urlvar)

Parse user, password host and port out of the url stored in variable urlvar.
Dangers: Side effect: The extracted information is removed from the given url.
Argument: urlvar Name of the variable containing the url to parse.
Returns: List containing the extracted information in a format suitable for 'array set'.

::pool::urls::SplitFile (url)

Splits the given file-url into its constituents.
Argument: url The url to split, without! scheme specification.
Returns: List containing the constituents, suitable for 'array set'.

::pool::urls::SplitFtp (url)

Splits the given ftp-url into its constituents.
Argument: url The url to split, without! scheme specification.
Returns: List containing the constituents, suitable for 'array set'.

::pool::urls::SplitHttp (url)

Splits the given http-url into its constituents.
Argument: url The url to split, without! scheme specification.
Returns: List containing the constituents, suitable for 'array set'.

::pool::urls::SplitMailto (url)

Splits the given mailto-url into its constituents.
Argument: url The url to split, without! scheme specification.
Returns: List containing the constituents, suitable for 'array set'.

::pool::urls::extract (text)

Scans through the HTML text and extracts all URLs referenced in it (links and image references)
Argument: text The HTML string to search in.
Returns: List of urls found in the text.

::pool::urls::findUrls (text)

Scans through the given text and extracts all embedded URL's.
Argument: text The string to search in.
Returns: List of urls found in the text.

::pool::urls::hyperize (text)

Detects and transforms all urls found in text into equivalent hyperlinks. All special HTML characters found in the non-url text are protected against their special interpretation afterward.
Argument: text string to search urls in.
Returns: A string with all urls transformed into hyperlinks

::pool::urls::split (url)

Splits the given url into its constituents.
Notes: This procedure absolutely requires existence of the 'scheme'-constituent in the given url, it is unable to parse a lone scheme-specific string.
Argument: url The url to split, scheme part required.
Returns: List containing the constituents, suitable for 'array set'.


Generated by AutoDoc 2.4 at 09/14/2000, invoked by Andreas Kupries