Mediawiki::POD::HTML - a subclass to catch X keywords and =head lines


Mediawiki-POD documentation  | view source Contained in the Mediawiki-POD distribution.

Index


NAME

Top

Mediawiki::POD::HTML - a subclass to catch X keywords and =head lines

SYNOPSIS

Top

	use Mediawiki::POD::HTML;

	my $parser = Mediawiki::POD::HTML->new();

	my $html = $parser->parse_string_document($POD);

DESCRIPTION

Top

Turns a given POD (Plain Old Documentation) into HTML code.

This subclass of Pod::Simple::HTML catches =head directives, and then allows you to assemble a TOC (table of contents) from the captured headlines.

In addition, it supports graph-common and graph subsections, these will be turned into HTML graphs.

GRAPH SUPPORT

Top

Mediawiki::POD::HTML allows you to write graphs (nodes connected with edges) in Graph::Easy or http://www.graphviz.org (Graphviz) format and turns these portions into HTML "graphics".

The following represents two graphs:

	=for graph [ Single ] --> [ Line ] --> [ Definition ]

	=begin graph

	node { fill: silver; }
	[ Mutli ] --> [ Line ]

	=end graph

In addition, a graph-common section can be used to set a common text for all following graphs. Each graph-common section resets the common text section:

	=for graph-common node { fill: red; }

	=for graph [ Red ]

	=for graph [ Red too ]

	=for graph-common node { fill: blue; }

	=for graph [ Blue ]

	=for graph [ Blue too ]

The attribute output for graphs is not yet used, eventually it should result in different output formats like SVG, or PNG rendered via dot.

METHODS

Top

get_headlines()

Return all the captured headlines as an ARRAY ref.

keyword_search_url()

	# Set external search engine to search for "Foo+Bar"
	$parser->keyword_search_url('http://search.cpan.org/perldoc?');

	# Generate URLs like "Foo_Bar", perfect for relative wiki links:
	$parser->keyword_search_url('', '_');

Get/set the URL that is used to link keywords defined with X<> to a search engine.

If the URL contains a text ##KEYWORD##, then this text will be replaced with the actual keyword. Otherwise, the keyword is simple appended to the URL.

The default search URL is:

  	http://cpan.uwinnipeg.ca/search?query=##KEYWORD##

Optionally set the character that replaces a space in generated URLs. The default space replacement character is undef, this means the character is dependend on the search URL:

* For URLS with ##KEYWORD##, it is '+'
* For URLS without a ##KEYWORD##, it is '_'

LICENSE

Top

This library is free software; you can redistribute it and/or modify it under the same terms of the GPL.

See the LICENSE file for information.

AUTHOR

Top

(c) Copyright by Tels http://bloodgate.com/wiki 2007

SEE ALSO

Top

http://bloodgate.com/wiki/POD, Graph::Easy.


Mediawiki-POD documentation  | view source Contained in the Mediawiki-POD distribution.