1HTML::WikiConverter::WeUbsAeprp(C3o)ntributed Perl DocumHeTnMtLa:t:iWoinkiConverter::WebApp(3)
2
3
4

NAME

6       HTML::WikiConverter::WebApp - Web interface to HTML::WikiConverter
7

SYNOPSIS

9       Inside the index.cgi instance script (which is included with this
10       distribution):
11
12         #!/usr/bin/perl
13         use HTML::WikiConverter::WebApp;
14
15         my %config = (
16           template_path => '/path/to/web/templates',
17         );
18
19         HTML::WikiConverter::WebApp->new( PARAMS => \%config )->run;
20

DESCRIPTION

22       This module provides a CGI::Application interface to
23       HTML::WikiConverter and all installed dialect modules.
24
25       Refer to the INSTALL file for installation instructions.
26

QUERY PARAMETERS

28       This application accepts a number of query parameters to control its
29       behavior. The most basic is the run mode parameter, "m". This
30       application can be in one of two run modes: "new" or "convert".  (These
31       correspond to the "new_page()" and "output_page()" methods,
32       respectively.) "new" causes a new page to be displayed, while "convert"
33       displays the results of html-to-wiki conversion.
34
35       Additional query parameters can be passed independent of run mode:
36
37       •   source_type
38
39           One of "raw_html", "from_uri", or "sample_html".
40
41       •   dialect
42
43           Any installed dialect, eg "MediaWiki".
44
45       •   base_uri
46
47           Base URL to be used for converting relative links to absolute ones.
48
49       •   wiki_uri
50
51           Template for wiki URLs. When scanning the HTML source, if a URL (as
52           in an "a href" or "img src" attribute value) is found matching this
53           template, it will be treated to a link to a wiki article/image.
54           Consult "ATTRIBUTES" in HTML::WikiConverter for more information.
55
56           Note that this is a bit less flexible than using the "wiki_uri"
57           attribute directly in HTML::WikiConverter. That attribute allows
58           multiple templates, allows coderefs, and regexps, etc. This option
59           only accepts a single scalar representing a very simple wiki URL
60           template.
61
62       •   show_parsed_html
63
64           If enabled, an additional textarea containing the parsed HTML will
65           be displayed.
66
67       •   escape_entities
68
69           If enabled, unsafe HTML entities ("<", ">", and "&") will be
70           encoded using HTML::Entities.
71
72       •   format
73
74           One of "html" or "xml". Determines the type of output displayed by
75           this application.
76

METHODS

78   setup
79       Sets up the app for CGI::Application.
80
81   new_page
82       Corresponds to the "new" run mode. Returns a blank form. If arguments
83       are available on the CGI query string, these are used as default values
84       for the form fields.
85
86   output_page
87       Corresponds to the "convert" run mode. Same as "new_page()" but returns
88       the wiki markup for the provided html as well.
89
90   load_template
91       Loads the specified HTML::Template template.
92
93   display_error
94       Error-catching method called by CGI::Application if a run mode fails
95       for any reason. Displays a basic form with a styled error message up
96       top.
97

AUTHOR

99       David J. Iberri, "<diberri at cpan.org>"
100

BUGS

102       Please report any bugs or feature requests to "bug-html-wikiconverter
103       at rt.cpan.org", or through the web interface at
104       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-WikiConverter>.  I
105       will be notified, and then you'll automatically be notified of progress
106       on your bug as I make changes.
107

SUPPORT

109       You can find documentation for this module with the perldoc command.
110
111         perldoc HTML::WikiConverter::WebApp
112
113       You can also look for information at:
114
115       •   AnnoCPAN: Annotated CPAN documentation
116
117           <http://annocpan.org/dist/HTML-WikiConverter-WebApp>
118
119       •   CPAN Ratings
120
121           <http://cpanratings.perl.org/d/HTML-WikiConverter-WebApp>
122
123       •   RT: CPAN's request tracker
124
125           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-WikiConverter-WebApp>
126
127       •   Search CPAN
128
129           <http://search.cpan.org/dist/HTML-WikiConverter-WebApp>
130
132       Copyright (c) David J. Iberri, all rights reserved.
133
134       This program is free software; you can redistribute it and/or modify it
135       under the same terms as Perl itself.
136
137
138
139perl v5.34.0                      2021-07-22    HTML::WikiConverter::WebApp(3)
Impressum