Debian...e::HTML(3pm)
π Debian::Package::HTML β the manual, but make it cute π
okay bestie, so this is Debian::Package::HTML(3pm), from the User Contributed Perl Documentation, and honestly? she's giving "sponsor my package, I'll make it a website" energy and I'm obsessed. πΈ
β¨ NAME β¨
Debian::Package::HTML β she generates a webpage with all the info (plus Linda/Lintian checks, no cap) about a Debian binary or source package, using HTML::Template. π
π¦ SYNOPSIS π¦
use strict;
use Debian::Package::HTML;
my $package = Debian::Package::HTML->new(%packageHash);
$package->output(%contextHash);
look at her go β¨
π REQUIRES π
HTML::Template
that's the whole list. she's low maintenance. π
π«Ά EXPORTS π«Ά
Nothing. literally nothing. she keeps her stuff to herself and honestly? respect. π
π DESCRIPTION π
So here's the vibe: this module outputs a webpage using HTML::Template templates, and that webpage resumes the information of a normal build environment for a package in Debian β think source files, binary packages and changelogs β and it runs Linda/Lintian for sanity checks. π
It's useful for making unified presentation webpages for those packages which are being sponsorized by someone in Debian. (Sponsor era. We love to see it. π«Ά)
π METHODS π
π Constructor π
$object->new(%packageHash)β constructs an$objectwith all information concerning the package, including location for binary/source files, changelogs, diffs, pristine sources, as well as templates, charsets and other settings. π§
Possible elements for the hash are:
"binary", "control", "source", "diff", "changes" β each one of them specifying one of the five possible files generated by a package building process in Debian. π¦
β οΈ "control" is mandatory. like, you cannot skip it. she will not be okay.
β¨ Output β¨
$object->output(%contextHash)β does the actual XHTML output. π Possible elements for the hash are:"briefing"(boolean) β if TRUE, WebInfo will look for abriefing.htmlin the current directory, and will include the content in the resulting output. Useful for introducing commentaries without touching the final HTML. Defaults toFALSE. ποΈ"charset"β determines the output charset. Defaults to"ISO-8859-1"."resultTemplate"β specifies the location of anHTML::Templatestyle template for output. This is mandatory, and defaults to"result.tmpl"."pageStyle"β specifies the location of a CSS file which might be included. π"doChecks"(boolean) β if TRUE, WebInfo will runlindaandlintianover the control file and will generate a${packageName}-checks.txtfile which will be included in the final output. Defaults toFALSE."dump"β determines where to put the resulting HTML output. Defaults toindex.html.
π DIAGNOSTICS π
π¨ No DSC could be found/open π¨
You need to specify a DSC control file using the "control" parameter for the new() method. If you don't, WebInfo can't do much. π The package will inform if the file could not be FOUND or could not be OPEN.
Please report the bugs, I'd love to work on them. π₯Ί (they literally said that. precious.)
π¨ CUSTOMIZATION π¨
π§΅ Template customization π§΅
You can customize the final output using your own HTML::Template template file and specifying it as a parameter for the output() method. The following template variable names are honored by WebInfo:
packageNameβ the name of the packagepackageVersionβ the version of the packagemaintainerNameβ the name of the maintainermaintainerMailβ the e-mail address of the maintainermaintainerPlusβ a"+"separated name/surname for the maintainer (useful for URL searching) πpageCharsetβ the page charset (customizable in theoutput()method)pageStyleβ the CSS file (customizable in theoutput()method)packagefβ the available package files as an array reference, soHTML::Templateshould iterate over the"packagefile"variable.dateβ the date specified by the current locale πdoChecksβ a boolean variable specifying if Linda/Lintian checks were madebriefingβ a boolean variable specifying if abriefing.htmlfile should be included
πΈ EXAMPLES πΈ
π Only a control file π
#!/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" );
minimal. clean. iconic. β¨
π A complete building environment π
#!/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"
);
okay she ATE with "groovy-style.css" honestly. π
π§ Some ideas π§
Well, throw the files generated by your compilations (dpkg-buildpackage, i.e.) in a /var/www/<my package> 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. π«Ά main character energy fr fr.
π AUTHOR π
Jose Parrella (joseparrella@cantv.net) wrote the original code, then modularized and OOed the code.
Thanks go to Christian Sanchez (csanchez@unplug.org.ve) who helped with the original HTML::Template'ing. π
β COPYRIGHT β
Copyright 2006 Jose Parrella. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πͺ
π₯ SEE ALSO π₯
perl(1)HTML::Template
and that's the whole page bestie, you're SO ready πβ¨
cute lil sign-off: this one's from perl v5.32.1, dated 2022-01-06, and yeah β it's Debian::Package::HTML(3pm) all the way down. mwah. ππ
π¦ where this page comes from
- debian bookworm: libdebian-package-html-perl 0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdebian-package-html-perl 0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libdebian-package-html-perl 0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdebian-package-html-perl 0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdebian-package-html-perl 0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdebian-package-html-perl 0.1-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms