Difference between revisions of "API:EPrints/Test/Pod2Wiki"
Line 95: | Line 95: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_new --> | <!-- Pod2Wiki=item_new --> | ||
− | === | + | ===new=== |
+ | EPrints::Test::Pod2Wiki->new( ... ) | ||
Create a new Pod2Wiki parser. Required options: | Create a new Pod2Wiki parser. Required options: | ||
Line 111: | Line 112: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_update_page --> | <!-- Pod2Wiki=item_update_page --> | ||
− | === | + | ===update_page=== |
+ | $ok = $pod->update_page( $package_name ) | ||
Update the MediaWiki page for $package_name. | Update the MediaWiki page for $package_name. | ||
Line 123: | Line 125: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_command --> | <!-- Pod2Wiki=item_command --> | ||
− | === | + | ===command=== |
+ | $parser->command( ... ) | ||
{{API:PodLink|file=Pod/Parser|package_name=Pod::Parser|section=|text=Pod::Parser}} callback. | {{API:PodLink|file=Pod/Parser|package_name=Pod::Parser|section=|text=Pod::Parser}} callback. | ||
Line 135: | Line 138: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_verbatim --> | <!-- Pod2Wiki=item_verbatim --> | ||
− | === | + | ===verbatim=== |
+ | $parser->verbatim( ... ) | ||
{{API:PodLink|file=Pod/Parser|package_name=Pod::Parser|section=|text=Pod::Parser}} callback. | {{API:PodLink|file=Pod/Parser|package_name=Pod::Parser|section=|text=Pod::Parser}} callback. | ||
Line 147: | Line 151: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_textblock --> | <!-- Pod2Wiki=item_textblock --> | ||
− | === | + | ===textblock=== |
+ | $parser->textblock( ... ) | ||
{{API:PodLink|file=Pod/Parser|package_name=Pod::Parser|section=|text=Pod::Parser}} callback. | {{API:PodLink|file=Pod/Parser|package_name=Pod::Parser|section=|text=Pod::Parser}} callback. | ||
Line 159: | Line 164: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_interpolate --> | <!-- Pod2Wiki=item_interpolate --> | ||
− | === | + | ===interpolate=== |
+ | $parser->interpolate( ... ) | ||
{{API:PodLink|file=Pod/Parser|package_name=Pod::Parser|section=|text=Pod::Parser}} callback. Overloaded to also escape HTML entities. | {{API:PodLink|file=Pod/Parser|package_name=Pod::Parser|section=|text=Pod::Parser}} callback. Overloaded to also escape HTML entities. | ||
Line 171: | Line 177: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_interior_sequence --> | <!-- Pod2Wiki=item_interior_sequence --> | ||
− | === | + | ===interior_sequence=== |
+ | $parser->interior_sequence( ... ) | ||
{{API:PodLink|file=Pod/Parser|package_name=Pod::Parser|section=|text=Pod::Parser}} callback. | {{API:PodLink|file=Pod/Parser|package_name=Pod::Parser|section=|text=Pod::Parser}} callback. | ||
Revision as of 13:21, 25 February 2010
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::Test::Pod2Wiki - convert EPrints pod to MediaWiki
Editing Pod2Wiki Pages
Pages generated by this module have Pod2Wiki markers inserted. These markers are HTML comments that start and end every Plain Old Documentation (POD) section. For example a POD synopsis section will look like this:
<!-- Pod2Wiki=head_synopsis --> ==SYNOPSIS== use EPrints::Test::Pod2Wiki; my $p = EPrints::Test::Pod2Wiki->new( wiki_index => "http://wiki.foo.org/index.php", username => "johnd", password => "xiPi00", ); $p->update_page( "EPrints::Utils" ); <!-- Edit below this comment --> <!-- Pod2Wiki= -->
When the Wiki page is updated each Pod2Wiki section is replaced with the equivalent section content from the POD.
Comments can be made by adding them to the comment sections:
... <!-- Pod2Wiki=head_methods --> ==METHODS== Any changes here will be lost <!-- Edit below this comment --> This Wiki comment will be kept. <!-- Pod2Wiki= --> ...
Note: if a POD section is removed any Wiki content associated with that section will also be removed.
The rest of this page concerns the EPrints::Test::Pod2Wiki module.
SYNOPSIS
use EPrints::Test::Pod2Wiki; my $p = EPrints::Test::Pod2Wiki->new( wiki_index => "http://wiki.foo.org/index.php", username => "johnd", password => "xiPi00", ); $p->update_page( "EPrints::Utils" );
DESCRIPTION
This module enables the integration of EPrints POD (documentation) and MediaWiki pages.
METHODS
new
EPrints::Test::Pod2Wiki->new( ... )
Create a new Pod2Wiki parser. Required options:
wiki_index - URL of the MediaWiki "index.php" page username - MediaWiki username password - MediaWiki password
update_page
$ok = $pod->update_page( $package_name )
Update the MediaWiki page for $package_name.
command
$parser->command( ... )
Pod::Parser callback.
verbatim
$parser->verbatim( ... )
Pod::Parser callback.
textblock
$parser->textblock( ... )
Pod::Parser callback.
interpolate
$parser->interpolate( ... )
Pod::Parser callback. Overloaded to also escape HTML entities.
interior_sequence
$parser->interior_sequence( ... )
Pod::Parser callback.