.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Debian::Package::HTML 3pm" .TH Debian::Package::HTML 3pm "2016-12-17" "perl v5.24.1" "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" Debian::Package::HTML \- Generates a webpage information (and Linda/Lintian checks) about a Debian binary or source package using HTML::Template .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& use strict; \& use Debian::Package::HTML; \& my $package = Debian::Package::HTML\->new(%packageHash); \& $package\->output(%contextHash); .Ve .SH "REQUIRES" .IX Header "REQUIRES" HTML::Template .SH "EXPORTS" .IX Header "EXPORTS" Nothing .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module outputs a webpage using HTML::Template templates which resumes the information of a normal build environment for a package in Debian (source files, binary packages and changelogs) using Linda/Lintian for sanity checks. It is useful for making unified presentation webpages for those packages which are being sponsorized by someone in Debian. .SH "METHODS" .IX Header "METHODS" .SS "Constructor" .IX Subsection "Constructor" .IP "\(bu" 4 \&\f(CW$object\fR\->new(%packageHash) .Sp Constructs an \f(CW$object\fR with all information concerning the package, including location for binary/source files, changelogs, diffs, pristine sources, as well as templates, charsets and other settings. .Sp Possible elements for the hash are: .Sp \&\*(L"binary\*(R", \*(L"control\*(R", \*(L"source\*(R", \*(L"diff\*(R", \*(L"changes\*(R", each one of them specifying one of the five possible files generated by a package building process in Debian. .Sp \&\*(L"control\*(R" is mandatory. .SS "Output" .IX Subsection "Output" .IP "\(bu" 4 \&\f(CW$object\fR\->output(%contextHash) .Sp Does the actual \s-1XHTML\s0 output. Possible elements for the hash are: .Sp \&\*(L"briefing\*(R" (boolean): if \s-1TRUE,\s0 WebInfo will look for a briefing.html in the current directory, and will include the content in the resulting output. Useful for introducing commentaries without touching the final \&\s-1HTML.\s0 Defaults to \s-1FALSE.\s0 .Sp \&\*(L"charset\*(R": determines the output charset. Defaults to \*(L"\s-1ISO\-8859\-1\*(R".\s0 .Sp \&\*(L"resultTemplate\*(R": specifies the location of an HTML::Template style template for output. This is mandatory, and defaults to \*(L"result.tmpl\*(R" .Sp \&\*(L"pageStyle\*(R": specifies the location of a \s-1CSS\s0 file which might be included. .Sp \&\*(L"doChecks\*(R" (boolean): if \s-1TRUE,\s0 WebInfo will run linda and lintian over the control file and will generate a ${packageName}\-checks.txt file which will be included in the final output. Defaults to \s-1FALSE.\s0 .Sp \&\*(L"dump\*(R": determines where to put the resulting \s-1HTML\s0 output. Defaults to index.html .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" .SS "No \s-1DSC\s0 could be found/open" .IX Subsection "No DSC could be found/open" You need to specify a \s-1DSC\s0 control file using the \*(L"control\*(R" parameter for the \&\fInew()\fR method. If you don't, WebInfo can't do much. The package will inform if the file could not be \s-1FOUND\s0 or could not be \s-1OPEN.\s0 .PP Please report the bugs, I'd love to work on them. .SH "CUSTOMIZATION" .IX Header "CUSTOMIZATION" .SS "Template customization" .IX Subsection "Template customization" You can customize the final output using your own HTML::Template template file and specifying it as a parameter for the \fIoutput()\fR method. The following template variable names are honored by WebInfo: .PP packageName: the name of the package .PP packageVersion: the version of the package .PP maintainerName: the name of the maintainer .PP maintainerMail: the e\-mail address of the maintainer .PP maintainerPlus: a \*(L"+\*(R" separated name/surname for the maintainer (useful for \&\s-1URL\s0 searching) .PP pageCharset: the page charset (customizable in the \fIoutput()\fR method) .PP pageStyle: the \s-1CSS\s0 file (customizable in the \fIoutput()\fR method) .PP packagef: the available package files as an array reference, so HTML::Template should iterate over the \*(L"packagefile\*(R" variable. .PP date: the date specified by the current locale .PP doChecks: a boolean variable specifying if Linda/Lintian checks were made .PP briefing: a boolean variable specifying if a briefing.html file should be included .SS "Example template" .IX Subsection "Example template" An example template is in: http://debian.bureado.com.ve/package\-info/result.tmpl .PP \&\s-1HTML\s0 outputs with that template and no \s-1CSS\s0 look like: http://debian.bureado.com.ve/falselogin/ .SH "EXAMPLES" .IX Header "EXAMPLES" .SS "Only a control file" .IX Subsection "Only a control file" .Vb 1 \& #!/usr/bin/perl \& \& use strict; \& use warnings; \& \& use Debian::Package::HTML; \& \& my $package = Debian::Package::HTML\->new( "control" => "falselogin.dsc" ); \& $package\->output ( "resultTemplate" => "result.tmpl", "dump" => "index.html" ); .Ve .SS "A complete building environment" .IX Subsection "A complete building environment" .Vb 1 \& #!/usr/bin/perl \& \& use strict; \& use warnings; \& \& use Debian::Package::HTML; \& \& my $package = Debian::Package::HTML\->new("control" => "falselogin.dsc", \& "binary" => "falselogin.deb", \& "diff" => "falselogin.diff.gz", \& "source" => "falselogin.orig.tar.gz", \& "changes" => "falselogin.changes" \& ; \& \& $package \-> output ( "resultTemplate" => "anotherTemplate.tmpl", \& "style" => "groovy\-style.css", \& "charset" => "UTF\-8", \& "doChecks" => "1", \& "dump" => "firstPackage.html" \& ); .Ve .SS "Some ideas" .IX Subsection "Some ideas" Well, throw the files generated by your compilations (dpkg-buildpackage, i.e.) in a /var/www/ served by your webserver of choice and run a small program using Debian::Package::HTML and a nice CSS/Template. You will have a great webpage for all your Debian packages, really useful if you're not yet a Developer and need to handle several packages with your sponsors. .SH "AUTHOR" .IX Header "AUTHOR" Jose Parrella (joseparrella@cantv.net) wrote the original code, then modularized and OOed the code. .PP Thanks go to Christian Sanchez (csanchez@unplug.org.ve) who helped with the original HTML::Template'ing .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2006 Jose Parrella. All rights reserved. .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1), HTML::Template. .SH "POD ERRORS" .IX Header "POD ERRORS" Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 227:" 4 .IX Item "Around line 227:" You forgot a '=back' before '=head1'