.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "HTML::WikiConverter::WebApp 3pm" .TH HTML::WikiConverter::WebApp 3pm "2020-12-29" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" HTML::WikiConverter::WebApp \- Web interface to HTML::WikiConverter .SH "SYNOPSIS" .IX Header "SYNOPSIS" Inside the index.cgi instance script (which is included with this distribution): .PP .Vb 2 \& #!/usr/bin/perl \& use HTML::WikiConverter::WebApp; \& \& my %config = ( \& template_path => \*(Aq/path/to/web/templates\*(Aq, \& ); \& \& HTML::WikiConverter::WebApp\->new( PARAMS => \e%config )\->run; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides a CGI::Application interface to HTML::WikiConverter and all installed dialect modules. .PP Refer to the \s-1INSTALL\s0 file for installation instructions. .SH "QUERY PARAMETERS" .IX Header "QUERY PARAMETERS" This application accepts a number of query parameters to control its behavior. The most basic is the run mode parameter, \f(CW\*(C`m\*(C'\fR. This application can be in one of two run modes: \f(CW"new"\fR or \f(CW"convert"\fR. (These correspond to the \f(CW\*(C`new_page()\*(C'\fR and \f(CW\*(C`output_page()\*(C'\fR methods, respectively.) \f(CW"new"\fR causes a new page to be displayed, while \&\f(CW"convert"\fR displays the results of html-to-wiki conversion. .PP Additional query parameters can be passed independent of run mode: .IP "\(bu" 4 source_type .Sp One of \f(CW"raw_html"\fR, \f(CW"from_uri"\fR, or \f(CW"sample_html"\fR. .IP "\(bu" 4 dialect .Sp Any installed dialect, eg \f(CW"MediaWiki"\fR. .IP "\(bu" 4 base_uri .Sp Base \s-1URL\s0 to be used for converting relative links to absolute ones. .IP "\(bu" 4 wiki_uri .Sp Template for wiki URLs. When scanning the \s-1HTML\s0 source, if a \s-1URL\s0 (as in an \f(CW\*(C`a href\*(C'\fR or \f(CW\*(C`img src\*(C'\fR attribute value) is found matching this template, it will be treated to a link to a wiki article/image. Consult \*(L"\s-1ATTRIBUTES\*(R"\s0 in HTML::WikiConverter for more information. .Sp Note that this is a bit less flexible than using the \f(CW\*(C`wiki_uri\*(C'\fR attribute directly in HTML::WikiConverter. That attribute allows multiple templates, allows coderefs, and regexps, etc. This option only accepts a single scalar representing a very simple wiki \s-1URL\s0 template. .IP "\(bu" 4 show_parsed_html .Sp If enabled, an additional textarea containing the parsed \s-1HTML\s0 will be displayed. .IP "\(bu" 4 escape_entities .Sp If enabled, unsafe \s-1HTML\s0 entities (\*(L"<\*(R", \*(L">\*(R", and \*(L"&\*(R") will be encoded using HTML::Entities. .IP "\(bu" 4 format .Sp One of \f(CW"html"\fR or \f(CW"xml"\fR. Determines the type of output displayed by this application. .SH "METHODS" .IX Header "METHODS" .SS "setup" .IX Subsection "setup" Sets up the app for CGI::Application. .SS "new_page" .IX Subsection "new_page" Corresponds to the \f(CW\*(C`new\*(C'\fR run mode. Returns a blank form. If arguments are available on the \s-1CGI\s0 query string, these are used as default values for the form fields. .SS "output_page" .IX Subsection "output_page" Corresponds to the \f(CW\*(C`convert\*(C'\fR run mode. Same as \f(CW\*(C`new_page()\*(C'\fR but returns the wiki markup for the provided html as well. .SS "load_template" .IX Subsection "load_template" Loads the specified HTML::Template template. .SS "display_error" .IX Subsection "display_error" Error-catching method called by CGI::Application if a run mode fails for any reason. Displays a basic form with a styled error message up top. .SH "AUTHOR" .IX Header "AUTHOR" David J. Iberri, \f(CW\*(C`\*(C'\fR .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to \f(CW\*(C`bug\-html\-wikiconverter at rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH "SUPPORT" .IX Header "SUPPORT" You can find documentation for this module with the perldoc command. .PP .Vb 1 \& perldoc HTML::WikiConverter::WebApp .Ve .PP You can also look for information at: .IP "\(bu" 4 AnnoCPAN: Annotated \s-1CPAN\s0 documentation .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp .IP "\(bu" 4 \&\s-1RT: CPAN\s0's request tracker .Sp .IP "\(bu" 4 Search \s-1CPAN\s0 .Sp .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright (c) David J. Iberri, all rights reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.