Video::TeletextDB::Page - Postprocessing Video::TeletextDB pages


Video-TeletextDB documentation  | view source Contained in the Video-TeletextDB distribution.

Index


NAME

Top

Video::TeletextDB::Page - Postprocessing Video::TeletextDB pages

SYNOPSIS

Top

  use Video::TeletextDB;
  $tele_db	= Video::TeletextDB->new(...);
  $access	= $tele_db->access(...);
  $page		= $access->fetch_page($page_nr, $subpage_nr);
  @pages	= $access->fetch_page_versions($page_nr, $subpage_nr);

  $text		= $page->text;
  @text		= $page->text;
  $html		= $page->html(%parameters);
  $style	= Video::TeletextDB::Page->html_style;

  $time		= $page->time;
  $page_nr	= $page->page_nr;
  $subpage_nr	= $page->subpage_nr;

DESCRIPTION

Top

A Video::TeletextDB::Page object represents one presentable page. Each character on the page has attributes like foreground color, size etc. Here you'll find methods to extract this information.

METHODS

Top

All presentation methods by default present mosaic (the name used for a set of very primitive 3x2 grapics blocks occupying one character position) as # except for the empty mosaic which is shown as .

Currently only does level 1 Teletext. More may get added later.

text$text = $page->text
@text = $page->text

Returns the page as pure text with all attributes removed. In list context it returns one element per line (each line will have a newline at the end). In scalar context it returns the concatenation of all lines.

html$html = $page->html(%parameters)

Returns a block of html text representing the page. Currently the only attributes used to build the html are colors and links. Ranges with a certain attribute are wrapped in <span> tags. You still have to apply a style sheet to make them do something. A default style sheet is available as the html_style method|"html_style".

Parameters are name/value pairs, which can be:

Extra arguments passed to the formats described below. Typically used to propagate a query string.

Defaults to "" if not given.

Whenever a link to a teletext page (without a subpage number) is recognized, it's run through sprintf (sprintf in perlfunc) with $page_format as format and the decimal page number (followed by any linkargs|"linkargs") as argument. The result is then html escaped and used in a quoted href.

Defaults to ../%03x/%s if not given.

Whenever a link to a teletext page with a subpage number is recognized, it's run through sprintf (sprintf in perlfunc) with $subpage_format as format and the decimal page and subpage number (followed by any linkargs|"linkargs") as arguments. The result is then html escaped and used in a quoted href.

Defaults to ../%03x/%02x%s if not given.

uriuri => $uri_format

Whenever an URI is recognized in the teletext page, it's run through sprintf (sprintf in perlfunc) with $uri_format as format and the URI (followed by any linkargs|"linkargs") as arguments. The result is then html escaped and used in a quoted href.

Defaults to %s if not given.

$style = Video::TeletextDB::Page->html_style

Returns a default stylesheet (without headers) intended to be used with the html|"html" method. It's basically the style sheet from alevtd (alevtd(1)).

time$time = $page->time

Returns the time associated with this page (meant to be the time the page was extracted from the teletext stream).

page_nr$page_nr = $page->page_nr

Returns the decimal page number of this page.

subpage_nr$subpage_nr = $page->subpage_nr

Returns the decimal subpage number of this page

EXPORT

Top

None by default.

SEE ALSO

Top

Video::TeletextDB, Video::TeletextDB::Access, alevtd(1), http://zapping.sourceforge.net/cgi-bin/view/ZVBI/WebHome

AUTHOR

Top

Ton Hospel, <Video-TeletextDB@ton.iguana.be>

COPYRIGHT AND LICENSE

Top


Video-TeletextDB documentation  | view source Contained in the Video-TeletextDB distribution.